INSTALLBOOT(8) (ATARI)

INSTALLBOOT(8) | System Manager's Manual (ATARI) | INSTALLBOOT(8)

# NAME

installboot — install a bootstrap on an FFS filesystem partition

# SYNOPSIS

/usr/mdec/installboot | [-Nmtuv] 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 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:

1. Copy the secondary bootstrap (either /usr/mdec/std/boot.atari or /usr/mdec/milan/boot.atari) to the root directory of the target file system.
2. Use 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
  Do not actually write anything on the disk.
-m
  Use Milan boot code.
-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

# SEE ALSO

bootpref(8), disklabel(8)

# HISTORY

The installboot command first appeared in NetBSD 1.1

# BUGS

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.

March 9, 2004 | NetBSD 7.0