142 lines
4.7 KiB
Groff
142 lines
4.7 KiB
Groff
.\" $NetBSD: installboot.8,v 1.2 1996/06/20 19:41:01 leo Exp $
|
|
.\"
|
|
.\" 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 September 29, 1995
|
|
.Dt INSTALLBOOT 8
|
|
.Os
|
|
.Sh NAME
|
|
.Nm installboot
|
|
.Nd install a bootstrap on an FFS filesystem partition
|
|
.Sh SYNOPSIS
|
|
.Nm installboot
|
|
.Op Fl Ntuv
|
|
.Ar device
|
|
.Sh DESCRIPTION
|
|
.Nm installboot
|
|
prepares the
|
|
.Pq 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
|
|
.Po
|
|
see
|
|
.Xr disklabel 8
|
|
.Pc
|
|
before installing the bootstrap.
|
|
.Pp
|
|
The bootstrap is split into two parts: a small first-stage program
|
|
that resides in the
|
|
.Pq physically
|
|
first 512 bytes on the device
|
|
.Pq as specified by Atari Corp. ,
|
|
and a second-stage program that immediately follows the first-stage
|
|
program. 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
|
|
.Dq libsa.a
|
|
to load the kernel from the root-filesystem on the device. The
|
|
prototype code for the first-stage boot program can be found in
|
|
.Pa /usr/mdec/fdboot
|
|
.Pq floppy disk code ,
|
|
.Pa /usr/mdec/sdboot
|
|
.Pq SCSI disk code
|
|
and
|
|
.Pa /usr/mdec/wdboot
|
|
.Pq IDE disk code .
|
|
The second-stage boot program is stored in
|
|
.Pa /usr/mdec/bootxx .
|
|
.Pp
|
|
For backwards compatibility with the vendor specific AHDI disk
|
|
label, a\ special first-stage boot program is provided in
|
|
.Pa /usr/mdec/xxboot.ahdi .
|
|
Together with the general second-stage boot program, it is installed
|
|
in the AHDI partition where the
|
|
.Tn NetBSD
|
|
disk label lives. Furthermore,
|
|
the AHDI specifications require an additional bootstrap, which is
|
|
written into the AHDI root sector
|
|
.Pq disk block zero .
|
|
The prototype code for this AHDI compliant bootstrap can be found in
|
|
.Pa /usr/mdec/sdb00t.ahdi
|
|
and
|
|
.Pa /usr/mdec/wdb00t.ahdi .
|
|
.Pp
|
|
The options are as follows:
|
|
.Bl -tag -width flag
|
|
.It Fl N
|
|
Do not actually write anything on the disk.
|
|
.It Fl t
|
|
Number of tracks per cylinder (IDE disk).
|
|
.It Fl u
|
|
Number of sectors per track (IDE disk).
|
|
.It Fl v
|
|
Verbose mode.
|
|
.El
|
|
.Pp
|
|
The arguments are:
|
|
.Bl -tag -width device
|
|
.It Ar device
|
|
The name of the device on which the bootstrap is to be installed.
|
|
.El
|
|
.Sh EXAMPLES
|
|
The following command will install the first-stage and second-stage
|
|
boot programs in the bootblock area on
|
|
.Dq sd0c :
|
|
.Bd -literal -offset indent
|
|
installboot sd0
|
|
.Ed
|
|
.Sh CAVEATS
|
|
.Nm
|
|
knows too much about kernel internal details, forcing it to
|
|
check the running kernel's release and revision.
|
|
.Pp
|
|
Because neither the floppy disk driver nor
|
|
.Xr disklabel 8
|
|
are capable of creating a disk pack label on a floppy disk,
|
|
.Nm
|
|
has to create a\ fictitious label, that is not used by the kernel.
|
|
.Pp
|
|
Except for installation of the bootcode on floppy,
|
|
.Nm
|
|
automatically sets the boot preference in NVRAM to
|
|
.Tn NetBSD.
|
|
.Sh BUGS
|
|
There is currently no easy way to change the NVRAM preference from within
|
|
.Tn NetBSD.
|
|
.Sh "SEE ALSO"
|
|
.Xr disklabel 8
|
|
.Sh HISTORY
|
|
The
|
|
.Nm
|
|
command first appeared in
|
|
.Nx 1.1
|