INSTALLBOOT(8)

NAME
installboot - install disk bootstrap software

SYNOPSIS
installboot [-nvf] bootfile rawdiskdevice

DESCRIPTION
The installboot utility prepares a disk for bootstrapping.

The NetBSD/i386 disk bootstrap software is split into two parts: a small first-stage boot program that is written into the disklabel area of a disk and a second-stage boot program that resides in a FFS file system on the disk (named /boot). Both parts of the boot are derived from a single object file which is split by installboot during the installation process. The first-stage boot program is loaded into memory by the BIOS. After receiving control of the system, it loads the second-stage boot program from a set of filesystem block numbers that have been hard-coded into it by installboot during execution. The second-stage boot program then locates and loads the kernel.

The options recognized by installboot are as follows:

-n  Do not actually write anything on the disk.

-v  Verbose mode.

-f  Force a write of the boot blocks (with the first stage put at offset zero) even if no disk label is detected. This is useful if there is no disk label (as is often the case with floppy or vnode devices).

The arguments are:

bootfile
    The name of the special object file (typically /usr/mdec/biosboot.sym) where the first and second stage boot programs to be installed reside.

rawdiskdevice
    The name of the raw device corresponding to the partition on which the boot program is to be installed. The partition should start at the beginning of the NetBSD portion of the disk and must contain a FFS filesystem. The installboot program enforces its name to be in the form “/dev/r*” .

EXAMPLES
Assuming the file containing the boot program is in its typical place, and you wished to make /dev/fd0a bootable. To install the boot blocks, one then would issue the command:

    installboot -f /usr/mdec/biosboot.sym /dev/rfd0a

Note that the -f option is needed if the floppy is unlabeled -- see disklabel(8).

BUGS
The NetBSD/i386 boot blocks can only read from the first 1024 cylinders of the disk because they use the BIOS to do their I/O. Thus, it is advisable that “a” partitions reside entirely within the first 1024 cylinders.

The BIOS partition table must reflect the correct location of the NetBSD portion according to disk geometry used by the BIOS. (This is automatically the case if the NetBSD portion is located at the beginning of the disk.)

installboot requires access to the disks' raw partition. That is not allowed with the kernel securelevel variable ( see sysctl(8)) set to a value greater than one, or with securelevel set to one if the “boot” partition is mounted.

SEE ALSO
boot(8), disklabel(8), init(8), sysctl(8), vnd(4)

HISTORY
The NetBSD/i386 installboot command first appeared in NetBSD 1.3.