installboot(8) - NetBSD Manual Pages

Command: Section: Arch: Collection:  
INSTALLBOOT(8)          NetBSD System Manager's Manual          INSTALLBOOT(8)


NAME
installboot - install disk bootstrap software
SYNOPSIS
installboot [-nv] [-m machine] [-o options] [-t fstype] [-b s1bno] [-B s2bno] filesystem primary [secondary] installboot -c [-nv] [-m machine] [-o options] [-t fstype] filesystem
DESCRIPTION
The installboot utility installs and removes NetBSD disk bootstrap soft- ware into a file system. installboot can install primary into filesystem, or disable an existing bootstrap in filesystem. Generally, NetBSD disk bootstrap software consists of two parts: a ``primary'' bootstrap program usually written into the disklabel area of the file system by installboot, and a ``secondary'' bootstrap program that usually resides as an ordinary file in the file system. When booting, the primary bootstrap program is loaded and invoked by the machine's PROM or BIOS. After receiving control of the system it loads and runs the secondary bootstrap program, which in turn loads and runs the kernel. The secondary bootstrap may allow control over various boot parameters passed to the kernel. Some platform (-m machine) and file system type (-t fstype) combinations require that the name of the secondary bootstrap is supplied as secondary, so that information such as the disk block numbers occupied by the secondary bootstrap can be stored in the primary bootstrap. These are: Platform File systems macppc ffs, raw news68k ffs, raw newsmips ffs, raw sparc ffs, raw sun2 ffs, raw sun3 ffs, raw Perform the following steps to make a file system bootable: 1. Copy the secondary bootstrap (usually /usr/mdec/boot.MACHINE or /usr/mdec/boot) to the root directory of the target file system. 2. Use installboot to install the primary bootstrap program (usually /usr/mdec/bootxx_FSTYPE) into filesystem. The following platforms do not require this step if the primary bootstrap already exists and the secondary bootstrap file is just being updated: alpha, pmax, sparc64, and vax. The options recognized by installboot are as follows: -b s1bno Install primary at block number s1bno instead of the default location for the machine and file system type. [alpha, pmax, vax] -B s2bno When hard-coding the blocks of secondary into primary, start from block s2bno instead of trying to determine the block numbers occupied by secondary by examining filesystem. If this option is supplied, secondary should refer to an actual secondary bootstrap (rather than the file name of the one present in filesystem) so that its size can be determined. -c Clear (remove) any existing bootstrap instead of installing one. -m machine Use machine as the target machine type. The default machine is determined from uname(3) and then MACHINE. The following machines are currently supported by installboot: alpha, macppc, news68k, newsmips, pmax, sparc, sparc64, sun2, sun3, vax -n Do not write to filesystem. -o options Machine specific installboot options, comma separated. Supported options are (with the machines for they are valid in brackets): alphasum [alpha] Recalculate and restore the Alpha checksum. This is the default for NetBSD/alpha. append [pmax, vax] Append primary to the end of filesystem, which must be a regular file in this case. sunsum [pmax, vax] Recalculate and restore the Sun and NetBSD/sparc compatible checksum. Note: The existing NetBSD/sparc disklabel should use no more than 4 partitions. -t fstype Use fstype as the type of filesystem. The default operation is to attempt to auto-detect this setting. The following file system types are currently supported by installboot: ffs BSD Fast File System. raw `Raw' image. Note: if a platform needs to hard- code the block offset of the secondary bootstrap, it cannot be searched for on this file system type, and must be provided with -B s2bno. -v Verbose operation. installboot exits 0 on success, and >0 if an error occurs.
ENVIRONMENT
installboot uses the following environment variables: MACHINE Default value for machine, overriding the result from uname(3).
FILES
Most NetBSD ports will contain variations of the following files: /usr/mdec/bootxx_FSTYPE Primary bootstrap for file system type FSTYPE. Installed into the bootstrap area of the file system by installboot. /usr/mdec/boot.MACHINE Secondary bootstrap for machine type MACHINE. This should be installed into the file system before installboot is run. /boot.MACHINE Installed copy of secondary bootstrap for ma- chine type MACHINE. /boot Installed copy of secondary bootstrap. Searched for by the primary bootstrap if /boot.MACHINE is not found. NetBSD/sparc64 files /usr/mdec/bootblk NetBSD/sparc64 primary bootstrap. /usr/mdec/ofwboot NetBSD/sparc64 secondary bootstrap. /ofwboot Installed copy of NetBSD/sparc64 secondary boot- strap.
EXAMPLES
common Verbosely install the Berkeley Fast File System primary bootstrap on to disk `sd0': installboot -v /dev/rsd0c /usr/mdec/bootxx_ffs Remove the primary bootstrap from disk `sd1': installboot -c /dev/rsd1c NetBSD/pmax Install the Berkeley Fast File System primary bootstrap on to disk `sd0': installboot /dev/rsd0c /usr/mdec/bootxx_ffs NetBSD/pmax requires that this file system starts at block 0 of the disk. Install the ISO 9660 primary bootstrap in the file /tmp/cd-image: installboot -m pmax /tmp/cd-image /usr/mdec/bootxx_cd9660 Make an ISO 9660 filesystem in the file /tmp/cd-image and install the ISO 9660 primary bootstrap in the filesystem, where the source directory for the ISO 9660 filesystem contains a kernel, the primary bootstrap bootxx_cd9660 and the secondary bootstrap boot.pmax: mkisofs -o /tmp/cd-image -a -l -v iso-source-dir ... 48 51 iso-source-dir/bootxx_cd9660 ... installboot -b `expr 48 \* 4` /tmp/cd-image /usr/mdec/bootxx_cd9660 NetBSD/sparc Install the Berkeley Fast File System primary bootstrap on to disk `sd0', with the secondary bootstrap `/boot' already present: installboot /dev/rsd0c /usr/mdec/bootxx /boot NetBSD/sparc64 Install the Berkeley Fast File System primary bootstrap on to disk `wd0': installboot /dev/rwd0c /usr/mdec/bootblk The secondary NetBSD/sparc64 bootstrap is located in /usr/mdec/ofwboot. NetBSD/sun2 and NetBSD/sun3 Install the Berkeley Fast File System primary bootstrap on to disk `sd0', with the secondary bootstrap `/boot' already present: installboot /dev/rsd0c /usr/mdec/bootxx /boot
SEE ALSO
uname(3), boot(8), disklabel(8)
HISTORY
This implementation of installboot appeared in NetBSD 1.6.
AUTHORS
The machine independent portion of this implementation of installboot was written by Luke Mewburn. The following people contributed to the various machine dependent back-ends: Simon Burge (pmax), Chris Demetriou (alpha), Matthew Fredette (sun2, sun3), Matthew Green (sparc64), Ross Harvey (al- pha), Paul Kranenburg (sparc), Luke Mewburn (macppc), Matt Thomas (vax), and Izumi Tsutsui (news68k, newsmips).
BUGS
There are not currently primary bootstraps to support all file systems types which are capable of being the root file system. NetBSD/alpha The NetBSD/alpha primary bootstrap program can only load the secondary bootstrap program from file systems starting at the beginning (block 0) of disks. Similarly, the secondary bootstrap program can only load ker- nels from file systems starting at the beginning of disks. The size of primary bootstrap programs is restricted to 7.5KB, even though some file systems (e.g. ISO 9660) are able to accommodate larger ones. NetBSD/pmax The NetBSD/pmax secondary bootstrap program can only load kernels from file systems starting at the beginning of disks. The size of primary bootstrap programs is restricted to 7.5KB, even though some file systems (e.g. ISO 9660) are able to accommodate larger ones. NetBSD/sun2 and NetBSD/sun3 The NetBSD/sun2 and NetBSD/sun3 secondary bootstrap program can only load kernels from file systems starting at the beginning of disks. NetBSD/vax The NetBSD/vax secondary bootstrap program can only load kernels from file systems starting at the beginning of disks. The size of primary bootstrap programs is restricted to 7.5KB, even though some file systems (e.g. ISO 9660) are able to accommodate larger ones. NetBSD 1.6 June 30, 2002 4
Powered by man-cgi (2024-03-20). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.