summaryrefslogtreecommitdiffstats
path: root/usr.sbin/installboot (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Add parenthesis gcc wants and remove defined but unused label gcckrw2015-10-191-4/+3
| | | | | | complains about. ok deraadt@ on parethesis
* LABELSECTOR is a DEV_BSIZE quantity. So multiply by DEV_BSIZE and notkrw2015-10-191-3/+6
| | | | | | d_secsize when calculating disklabel location. ok jsing@
* Nuke unused variable.krw2015-10-191-2/+2
|
* Fix comments.rpe2015-10-181-3/+3
| | | | OK krw@
* Check file sizes only for regular files. The current code breaks savecoretobias2015-10-161-3/+3
| | | | | | due to its kvm handling. ok deraadt
* Merge nlist out of boundary access fix with other nlist implementations.tobias2015-10-161-31/+55
| | | | | | While at it, merge style and typo fixes back into nlist(3), too. ok deraadt, jsing, millert
* Add an extra argument to bootstrap() to allow for a limited overlap between anmiod2015-10-156-14/+31
| | | | | | | | | | | | | | | | existing partition and the boot blocks span, and update all callers to require an overlap limit of zero sectors (thus not changing their behaviour). Then, add proper support for vax: copy the 2nd-stage boot block to /boot and install the 1st-stage boot block at the beginning of the disk, retaining the disklabel; allow for an overlap of up to 16 sectors, which is perfectly fine as long as your `a' partition is FFS. Note that regular installs will not even have such an overlap, because the default OpenBSD span on a disk on vax starts at sector 16, but installation media use sperific layout which require this. ok krw@
* give up; include stdlib.h from the .h file, sighderaadt2015-10-152-3/+4
|
* worse, need even more includes...deraadt2015-10-141-1/+2
|
* add includes for crc32() and uuid_dec_be() missed in rev 1.11jsg2015-10-142-2/+4
| | | | ok krw@
* Backout last. Breaks sparc64, amoung other dubiousness.krw2015-10-143-35/+7
| | | | requested by deraadt@
* Check that the disk specified on the command line is the disk thatkrw2015-10-123-7/+35
| | | | | | files are copied to. Error out with 'cross-device install' if not. ok millert@, ok deraadt@ & jsing@ for previous version
* needs at least some include love; choosing <stdlib.h>deraadt2015-10-111-1/+3
|
* Refactor fileprefix() and filecopy() to use warn() instead of err()krw2015-10-086-43/+92
| | | | | | | | | to display error message, and to return error indications (NULL and -1 respectively). Use the error indications in write_efisystem() to unwind in the face of more error conditions. In other cases just exit(1) to emulation current behaviour. ok deraadt@
* Add initial support for installing UEFI boot files to a GTP EFI Systemkrw2015-10-073-4/+282
| | | | | | Partition. Further work to be done in-tree. ok deraadt@
* Out, damned whitespace!krw2015-10-051-2/+2
|
* Copy the stage2 file to / in md_installboot().miod2015-10-051-2/+14
|
* Nuke trailing whitespace to avoid cluttering possible upcoming diffs.krw2015-10-035-13/+13
|
* Assign the return value of getopt() to an int, not a char, so that optionsmiod2015-09-101-3/+2
| | | | actually work on unsigned char platforms.
* Adjust <sys/param.h> comments regarding use of use of MAXFRAG, orderaadt2015-01-201-2/+2
| | | | | delete <sys/param.h> if now possible ok guenther
* first batch of cleanup to programs based upon the namespace cleanupsderaadt2015-01-168-18/+22
| | | | | | | in net/pfvar.h sys/proc.h sys/ucred.h arpa/nameser.h change to PATH_MAX, reduce use of MIN() and MAX(), HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc etc ok millert guenther, some review by doug
* use reallocarray() to detect int overflow; ok dougderaadt2014-10-081-4/+3
|
* decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hderaadt2014-07-081-3/+1
| | | | | don't need to be married. ok guenther miod beck jsing kettenis
* Apply/fix OpenBSD tag.tobias2014-06-252-1/+3
| | | | ok jsing@
* Check malloc return value for NULL.tobias2014-06-251-2/+3
| | | | ok jsing@
* Change the installboot file copying process so that it carefullyjsing2014-06-092-19/+13
| | | | | | | | | | | overwrites the existing file, before truncating it to the final length. This means that we will keep the same inode and potentially retain the same disk data block allocation between runs. This will aid users who multiboot since it makes it less likely that the PBR will change, although as before, there is no guarantee. Obviously if the second stage boot loader grows or shrinks then the PBR will change regardless.
* Use calloc() instead of malloc()/memset().jsing2014-06-093-10/+7
| | | | From Benjamin Baier.
* Don't zap disklabel (and next 6 blocks) when installing boot block onkrw2014-04-271-2/+6
| | | | | | | | 4k-sector disk drives. Noted and fix tested by David Vasek via misc@ tweaks & ok jsing@
* Retire hp300, mvme68k and mvme88k ports. These ports have no users, keepingmiod2014-03-182-51/+1
| | | | | | | this hardware alive is becoming increasingly difficult, and I should heed the message sent by the three disks which have died on me over the last few days. Noone sane will mourn these ports anyway. So long, and thanks for the fish.
* Use ${STATIC} not -staticderaadt2014-02-211-2/+2
| | | | ok jsing
* Tweak comment re root prefixes.jsing2014-01-191-2/+2
|
* Do not prefix user specified stages with the root filesystem mount point.jsing2014-01-191-3/+3
|
* When copying files do it in 512 byte blocks so that we're less likely tojsing2014-01-191-2/+2
| | | | | | hit file system allocation issues on install media. Requested by deraadt@
* Rework installboot and use a single directory with a single makefile. Thejsing2014-01-1935-116/+112
| | | | | | | directory per machine model is arguably cleaner, however it does not play well with distrib/special and instbin. Discussed with deraadt@
* sort options;jmc2014-01-181-3/+3
|
* Make installboot(8) easier to use - copy the second stage boot loader tojsing2014-01-185-11/+83
| | | | | the default location used by the given architecture. This eliminates the need to copy it over manually prior to running installboot.
* Add a -r flag that allows for the mount point of the root filesystem to bejsing2014-01-185-8/+75
| | | | specified. This is primarily for use by the installer and defaults to /.
* Build installboot on all architectures.jsing2014-01-181-11/+1
|
* Also make installboot build on macppc.jsing2014-01-181-0/+3
|
* Add missing include.jsing2014-01-181-1/+3
|
* Make installboot(8) build on all architectures, although currently withjsing2014-01-1814-0/+74
| | | | | non-functional stubs for alpha, armish, armv7, aviion, loongson, luna88k, mvme68k, mvme88k, octeon, sgi, socppc, sparc and zaurus.
* Add initial man page for installboot.jsing2014-01-052-5/+80
|
* Actually load the second-stage boot loader so that softraid can store it injsing2013-12-282-7/+20
| | | | the softraid boot area.
* sparc64 uses /ofwboot as the second stage, not /boot.jsing2013-12-281-2/+2
|
* Add installboot support for sparc64.jsing2013-12-285-2/+225
|
* Add installboot support for the remaining `disklabel -B' architecturesjsing2013-12-288-5/+138
| | | | | | (hp300, hppa64 and landisk). hp300 and landisk are untested, however they should "just work" - hopefully someone with access to this hardware can confirm.
* Add installboot support for vax.jsing2013-12-283-2/+48
|
* Round the size of the bootstrap up to a multiple of the disk sector size.jsing2013-12-281-9/+11
| | | | Some bootstraps are already built this way, however others are not.
* Various code clean ups - add a missing header, add a missing prototype,jsing2013-12-284-29/+30
| | | | add some casts, tweak some types and variable names.
* Tweak makefiles so that we pull in source files based on defines.jsing2013-12-284-12/+13
|