INSTALLBOOT(8)

NAME
installboot - install a bootstrap on an FFS filesystem partition

SYNOPSIS
installboot [-Ntuv] device

DESCRIPTION
installboot prepares the (physically) first partition on a device for boot-strapping from the TOS-ROM. The bootstrap is written into the bootblock area on the partition, right in front of the disk pack label, and hence limited in size to LABELOFFSET bytes. A disk pack label should be created ( see disklabel(8)) before installing the bootstrap.

The bootstrap is split into two parts: a small first-stage program that resides in the (physically) first 512 bytes on the device (as specified by Atari Corp.), and a second-stage program that immediately follows the first-stage program. The first-stage program is loaded into memory by the ROM. After receiving control, it loads the second-stage program and the disk label. The second-stage boot program uses the stand-alone filesystem code in “libsa.a” to load the kernel from the root-filesystem on the device. The prototype code for the first-stage boot program can be found in /usr/mdec/fdboot (floppy disk code), /usr/mdec/sdboot (SCSI disk code) and /usr/mdec/wdboot (IDE disk code). The second-stage boot program is stored in /usr/mdec/bootxx.

For backwards compatibility with the vendor specific AHDI disk label, a special first-stage boot program is provided in /usr/mdec/xxboot.ahdi. Together with the general second-stage boot program, it is installed in the AHDI partition where the NetBSD disk label lives. Furthermore, the AHDI specifications require an additional bootstrap, which is written into the AHDI root sector (disk block zero). The prototype code for this AHDI compliant bootstrap can be found in /usr/mdec/sdb00t.ahdi and /usr/mdec/wdb00t.ahdi.

The options are as follows:

-N  Do not actually write anything on the disk.

-t  Number of tracks per cylinder (IDE disk).

-u  Number of sectors per track (IDE disk).

-v  Verbose mode.

The arguments are:

device
    The name of the device on which the bootstrap is to be installed.

EXAMPLES
The following command will install the first-stage and second-stage boot programs in the bootblock area on “sd0c”:

    installboot sd0

CAVEATS
installboot knows too much about kernel internal details, forcing it to check the running kernel's release and revision.

Because neither the floppy disk driver nor disklabel(8) are capable of creating a disk pack label on a floppy disk, installboot has to create a fictitious label, that is not used by the kernel.

Except for installation of the bootcode on floppy, installboot automatically sets the boot preference in NVRAM to NetBSD.

BUGS
There is currently no easy way to change the NVRAM preference from within NetBSD.

SEE ALSO
disklabel(8)

HISTORY
The installboot command first appeared in NetBSD 1.1