151 lines
4.8 KiB
Groff
151 lines
4.8 KiB
Groff
.\" $NetBSD: installboot.8,v 1.1 1997/03/14 02:40:32 perry 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 March 14, 1997
|
|
.Dt INSTALLBOOT 8 i386
|
|
.Os
|
|
.Sh NAME
|
|
.Nm installboot
|
|
.Nd install disk bootstrap software
|
|
.Sh SYNOPSIS
|
|
.Nm installboot
|
|
.Op Fl nvf
|
|
.Ar bootfile
|
|
.Ar rawdiskdevice
|
|
.Sh DESCRIPTION
|
|
The
|
|
.Nm installboot
|
|
utility prepares a disk for bootstrapping.
|
|
.Pp
|
|
The
|
|
.Nx /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
|
|
Note: so that the
|
|
.Pa /boot
|
|
file can be installed on the bootable partition, the partition must be
|
|
mounted before
|
|
.Nm
|
|
is run.
|
|
.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 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 device corresponding to the raw whole-disk partition (the
|
|
.Dq raw partition )
|
|
of the disk on which the first-stage boot program is to be installed.
|
|
.El
|
|
.Sh EXAMPLES
|
|
Assuming the file containing the boot program is in its typical place,
|
|
and you wished to make
|
|
.Pa /dev/fd0a
|
|
bootable. One might first mount
|
|
.Pa /dev/fd0a
|
|
on
|
|
.Pa /mnt ,
|
|
and in the case that there is already a file named
|
|
.Pa boot
|
|
in that directory, remove it.
|
|
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
|
|
The NetBSD/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
|
|
.Nm
|
|
requires simultaneous access to the mounted file system and
|
|
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
|
|
program resides in a file system on the disk's raw partition.
|
|
.Sh "SEE ALSO"
|
|
.Xr boot 8 ,
|
|
.Xr disklabel 8 ,
|
|
.Xr init 8 ,
|
|
.Xr sysctl 8 ,
|
|
.Xr vnd 4
|
|
.Sh HISTORY
|
|
The NetBSD/i386
|
|
.Nm
|
|
command first appeared in
|
|
.Nx 1.3 .
|