NetBSD/share/man/man8/man8.atari/installboot.8
wiz d42596d1c8 Another new sentence on a new line.
Remove unnecessary .Pp.
2004-03-09 20:29:05 +00:00

182 lines
5.8 KiB
Groff

.\" $NetBSD: installboot.8,v 1.12 2004/03/09 20:29:05 wiz Exp $
.\"
.\" Copyright (c) 1996 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by Paul Kranenburg.
.\"
.\" 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 the NetBSD
.\" Foundation, Inc. and its contributors.
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
.\" contributors may be used to endorse or promote products derived
.\" from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``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 FOUNDATION OR CONTRIBUTORS
.\" 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 9, 2004
.Dt INSTALLBOOT 8 atari
.Os
.Sh NAME
.Nm installboot
.Nd install a bootstrap on an FFS filesystem partition
.Sh SYNOPSIS
.Nm /usr/mdec/installboot
.Op Fl Nmtuv
.Ar device
.Sh DESCRIPTION
.Nm
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
.Dv 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 three parts: a small first-stage program
that resides in the
.Pq physically
first 512 bytes on the device
.Pq 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
.Dq 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
.Pa /usr/mdec/std/fdboot
.Pq floppy disk code ,
.Pa /usr/mdec/std/sdboot
.Pq SCSI disk code
and
.Pa /usr/mdec/std/wdboot
.Pq IDE disk code .
The second-stage boot program is stored in
.Pa /usr/mdec/std/bootxx .
and the third-stage boot program is stored in
.Pa /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
.Pa /usr/mdec/milan .
Note that the Milan uses the SCSI disk code for both SCSI and IDE disks.
.Pp
For backwards compatibility with the vendor specific AHDI disk
label, a\ special first-stage boot program is provided in
.Pa /usr/mdec/std/xxboot.ahdi .
Together with the general second-stage boot program, it is installed
in the AHDI partition where the
.Nx
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/std/sdb00t.ahdi
and
.Pa /usr/mdec/std/wdb00t.ahdi ,
or the equivalents in
.Pa /usr/mdec/milan .
.Pp
Perform the following steps to make a file system bootable:
.Bl -enum
.It
Copy the secondary bootstrap (either
.Pa /usr/mdec/std/boot.atari
or
.Pa /usr/mdec/milan/boot.atari )
to the root directory of the target file system.
.It
Use
.Nm
to install the primary and secondary bootstrap programs
(from
.Pa /usr/mdec/std
or
.Pa /usr/mdec/milan )
into the
.Ar filesystem .
.El
.Pp
The options are as follows:
.Bl -tag -width flag
.It Fl N
Do not actually write anything on the disk.
.It Fl m
Use Milan boot code.
.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 SEE ALSO
.Xr bootpref 8 ,
.Xr disklabel 8
.Sh HISTORY
The
.Nm
command first appeared in
.Nx 1.1
.Sh BUGS
.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
.Nx .