178 lines
5.6 KiB
Groff
178 lines
5.6 KiB
Groff
.\" $NetBSD: installboot.8,v 1.6 1998/12/19 19:22:18 he Exp $
|
|
.\"
|
|
.\" Copyright (c) 1997 Perry E. Metzger. All rights reserved.
|
|
.\" Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
|
|
.\" Copyright (c) 1995 Paul Kranenburg. All rights reserved.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
.\" must display the following acknowledgement:
|
|
.\" This product includes software developed by Paul Kranenburg.
|
|
.\" 3. The name of the author may not be used to endorse or promote products
|
|
.\" derived from this software without specific prior written permission
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
.\"
|
|
.Dd June 13, 1997
|
|
.Dt INSTALLBOOT 8 i386
|
|
.Os
|
|
.Sh NAME
|
|
.Nm installboot
|
|
.Nd install disk bootstrap software
|
|
.Sh SYNOPSIS
|
|
.Nm installboot
|
|
.Op Fl nvf
|
|
.Op Fl b Ar bn
|
|
.Ar bootfile
|
|
.Ar rawdiskdevice
|
|
.Sh DESCRIPTION
|
|
The
|
|
.Nm installboot
|
|
utility prepares a disk for bootstrapping.
|
|
.Pp
|
|
The
|
|
.Nx Ns Tn /i386
|
|
disk bootstrap software is split into two parts:
|
|
a small first-stage boot program that is written into the disklabel
|
|
area of a disk and a second-stage boot program that resides in a FFS file
|
|
system on the disk (named
|
|
.Pa /boot ) .
|
|
Both parts of the boot are derived from a single object file
|
|
which is split by
|
|
.Nm
|
|
during the installation process.
|
|
The first-stage boot program is loaded into memory by the BIOS.
|
|
After receiving control of the system, it loads the
|
|
second-stage boot program from a set of filesystem block numbers that
|
|
have been hard-coded into it by
|
|
.Nm
|
|
during execution.
|
|
The second-stage boot program then locates and loads the kernel.
|
|
.Pp
|
|
The options recognized by
|
|
.Nm installboot
|
|
are as follows:
|
|
.Bl -tag -width flag
|
|
.It Fl n
|
|
Do not actually write anything on the disk.
|
|
.It Fl v
|
|
Verbose mode.
|
|
.It Fl b Ar bn
|
|
Ignore the file system type and write the second-stage boot loader
|
|
contigously from internal block number
|
|
.Ar bn .
|
|
.It Fl f
|
|
Force a write of the boot blocks (with the first stage put at offset
|
|
zero) even if no disk label is detected.
|
|
This is useful if there is no disk label (as is often the case with
|
|
floppy or vnode devices).
|
|
.El
|
|
.Pp
|
|
The arguments are:
|
|
.Bl -tag -width rawdiskdevice
|
|
.It Ar bootfile
|
|
The name of the special object file
|
|
(typically
|
|
.Pa /usr/mdec/biosboot.sym )
|
|
where the first and second stage boot programs to be installed reside.
|
|
.It Ar rawdiskdevice
|
|
The name of the raw device corresponding to the partition on which
|
|
the boot program is to be installed. The partition should
|
|
start at the beginning of the
|
|
.Nx
|
|
portion of the disk and must contain a FFS filesystem. The
|
|
.Nm
|
|
program enforces its name to be in the form
|
|
.Dq /dev/r*
|
|
\&.
|
|
.El
|
|
.Sh EXAMPLES
|
|
Assuming the file containing the boot program is in its typical place,
|
|
and you wished to make
|
|
.Pa /dev/fd0a
|
|
bootable. To install the boot blocks, one then would issue the command:
|
|
.Bd -literal -offset indent
|
|
installboot -f /usr/mdec/biosboot.sym /dev/rfd0a
|
|
.Ed
|
|
Note that the -f option is needed if the floppy is unlabeled -- see
|
|
.Xr disklabel 8 .
|
|
.Sh BUGS
|
|
.Pp
|
|
.Nx
|
|
is in transition from using the 386BSD MBR partition-ID of 165 (0xa5),
|
|
to using a new, unique partition-ID of 169 (0xa9).
|
|
.Nx
|
|
versions newer than 1.3.3 will use the new partition-ID if one is
|
|
found, and if not, fall back to the old ID of 165 with a warning. To
|
|
eliminate the warning, update your bootblocks and
|
|
.Nm
|
|
to 1.3.3 or newer, rerun
|
|
.Nm
|
|
on the affected drives, and lastly use
|
|
.Xr fdisk 8
|
|
to change the MBR partition-ID of NetBSD partitions to 169.
|
|
.Pp
|
|
Note that the final step of changing MBR partition-IDs from 165 to 169
|
|
renders a disk unbootable by older
|
|
.Nx
|
|
kernels, which do not recognize the new ID.
|
|
.Pp
|
|
The
|
|
.Nx Ns Tn /i386
|
|
boot blocks can only read from the first 1024
|
|
cylinders of the disk because they use the BIOS to do their I/O. Thus,
|
|
it is advisable that
|
|
.Dq a
|
|
partitions reside entirely within the first 1024 cylinders.
|
|
.Pp
|
|
The BIOS partition
|
|
table must reflect the correct location of the
|
|
.Nx
|
|
portion according to disk geometry used by the BIOS. (This is automatically
|
|
the case if the
|
|
.Nx
|
|
portion is located at the beginning of the disk.)
|
|
.Pp
|
|
.Nm
|
|
requires access to the disks' raw partition.
|
|
That is not allowed with the kernel
|
|
.Dv securelevel
|
|
variable
|
|
.Po
|
|
see
|
|
.Xr sysctl 8
|
|
.Pc
|
|
set to a value greater than one, or with
|
|
.Dv securelevel
|
|
set to one if the
|
|
.Dq boot
|
|
partition is mounted.
|
|
.Sh "SEE ALSO"
|
|
.Xr boot 8 ,
|
|
.Xr disklabel 8 ,
|
|
.Xr init 8 ,
|
|
.Xr sysctl 8 ,
|
|
.Xr vnd 4
|
|
.Sh HISTORY
|
|
The
|
|
.Nx Ns Tn /i386
|
|
.Nm
|
|
command first appeared in
|
|
.Nx 1.3 .
|