INSTALLBOOT(8) | System Manager's Manual (atari) | INSTALLBOOT(8) |
installboot
—
/usr/mdec/installboot |
[-Nmtuv ] device |
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 three parts: a small first-stage program that resides in the (physically) first 512 bytes on the device (as specified by Atari Corp.), a second-stage program that immediately follows the first-stage program, and a third-stage program that resides on the root filesystem. 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 third-stage boot program from the root-filesystem on the device. The third-stage boot program then loads the kernel. The prototype code for the first-stage boot program can be found in /usr/mdec/std/fdboot (floppy disk code), /usr/mdec/std/sdboot (SCSI disk code) and /usr/mdec/std/wdboot (IDE disk code). The second-stage boot program is stored in /usr/mdec/std/bootxx. and the third-stage boot program is stored in /usr/mdec/std/boot.atari. The boot code for Milan machines is different from the other machines and the files for the Milan can be found in the directory /usr/mdec/milan. Note that the Milan uses the SCSI disk code for both SCSI and IDE disks.
For backwards compatibility with the vendor specific AHDI disk label, a special first-stage boot program is provided in /usr/mdec/std/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/std/sdb00t.ahdi and /usr/mdec/std/wdb00t.ahdi, or the equivalents in /usr/mdec/milan.
Perform the following steps to make a file system bootable:
installboot
to install the primary and
secondary bootstrap programs (from /usr/mdec/std
or /usr/mdec/milan) into the
filesystem.The options are as follows:
-N
-m
-t
-u
-v
The arguments are:
installboot sd0
installboot
command first appeared in
NetBSD 1.1
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.
February 17, 2017 | NetBSD 9.4 |