OpenBSD manual page server

Manual Page Search Parameters
INSTALLBOOT(8) System Manager's Manual (amd64) INSTALLBOOT(8)

installbootinstalls a bootstrap on an FFS disk or partition

installboot [-nv] boot biosboot disk

installboot is used to install a “first-stage” boot program into the boot area of an FFS disk partition. It inserts the block number and offset of the inode of the second-stage boot program boot(8) so that the biosboot(8) program can load it. Various filesystem parameters are also patched into the boot block.

The options are as follows:

Do not actually write anything on the disk.
Be verbose, printing out the data that are stored in biosboot along with lots of other information.

The arguments are:

boot
The name of the second-stage boot program in the mounted file system where the first-stage boot program is to be installed. This should be a full pathname.
biosboot
The name of the prototype file for the first stage boot program, usually /usr/mdec/biosboot.
disk
The name of the disk containing the partition in which the second-stage boot program resides and the first-stage boot program is to be installed. This can either be specified in short form (e.g., ‘sd0’ or ‘wd0’), or as the explicit device node, such as /dev/rsd0c or /dev/rwd0c.

The ‘c’ partition is always used to represent the “entire” disk on amd64.

The typical use is

# cp /usr/mdec/boot /boot
# /usr/mdec/installboot -n -v /boot /usr/mdec/biosboot sd0

And if the information supplied looks right, run the above without the -n flag. If you are upgrading an old system, you may need to perform some additional steps first. For example:

boot the floppy.fs filesystem floppy
# fsck /dev/rsd0a
# mount /dev/sd0a /mnt
# cp /usr/mdec/boot /mnt/boot
# /usr/mdec/installboot -v /mnt/boot /usr/mdec/biosboot sd0

biosboot(8), boot(8), disklabel(8), fdisk(8), init(8)

The disklabel d_type field must be set to a value other than “unknown”.

/boot must be on the drive/partition specified by disk; you cannot perform cross-device installboots.

March 6, 2010 OpenBSD-5.4