INSTALLBOOT(8)      OpenBSD System Manager's Manual (i386)      INSTALLBOOT(8)

NAME
     installboot - install a bootstrap on a FFS disk or partition

SYNOPSIS
     installboot [-n] [-v] [-s sectors-per-track] [-h tracks-per-cyl] boot
                 biosboot disk

DESCRIPTION
     installboot is used to install a ``first-stage'' boot program into the
     boot area of a FFS disk partition, and initialize the table of block num-
     bers the biosboot program uses to load the second-stage boot program.

     The options are as follows:

     -n        Do not actually write anything on the disk.

     -v        Be verbose, printing out the CHS (Cylinder, Head, Sector)
               triples that are stored in biosboot along with lots of other
               information.

     -s sectors-per-track
               Used to specify the sectors-per-track value if the drive has
               sector translation activated, and installboot is unable to de-
               termine the translated geometry.  If not specified, this de-
               faults to the value retrieved from the BIOS at boot time,
               available via sysctl(8).

     -h tracks-per-cyl
               Used to specify the tracks-per-cylinder value if the drive has
               sector translation activated, and installboot is unable to de-
               termine the translated geometry.  If not specified, this de-
               faults to the value retrieved from the BIOS at boot time,
               available via sysctl(8).

     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 pro-
               gram, usually /usr/mdec/biosboot.

     disk      The name of the disk containing the partition in which the sec-
               ond-stage boot program resides and the first-stage boot program
               is to be installed.  This can either be specified in short form
               (i.e., `sd0' or `wd0'), or as the explicit device node, such as
               /dev/rsd0c or /dev/rwd0c.

               Note that you must be in single-user mode or have your kernel
               in insecure mode (see the sysctl(8) kern.securelevel variable
               or /etc/rc.securelevel) to enable access to the raw partition
               of a mounted disk.

               The `c' partition is always used to represent the ``entire''
               disk on i386.

EXAMPLE
     The typical use is

           # cp /usr/mdec/boot /boot
           # /usr/mdec/installboot -v -n /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 preface the
     above steps with some more steps... and do the following:

           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

     If you need to find the BIOS geometry of the disk for -s and -h you can
     use the boot block command:

           boot> machine diskinfo

BUGS
     The disklabel d_type field must be set to a value other than ``unknown''.

     You cannot run installboot for a drive/partition other than the one you
     want the /boot to be loaded from.

SEE ALSO
     biosboot(8), disklabel(8), fdisk(8), init(8)

OpenBSD 2.9                    September 1, 1997                             2
