1.\" $NetBSD: installboot.8,v 1.10 2001/12/26 01:29:10 wiz Exp $ 2.\" 3.\" Copyright (c) 1996 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to The NetBSD Foundation 7.\" by Paul Kranenburg. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 3. All advertising materials mentioning features or use of this software 18.\" must display the following acknowledgement: 19.\" This product includes software developed by the NetBSD 20.\" Foundation, Inc. and its contributors. 21.\" 4. Neither the name of The NetBSD Foundation nor the names of its 22.\" contributors may be used to endorse or promote products derived 23.\" from this software without specific prior written permission. 24.\" 25.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 26.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 27.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 28.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 29.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35.\" POSSIBILITY OF SUCH DAMAGE. 36.\" 37.Dd September 29, 1995 38.Dt INSTALLBOOT 8 atari 39.Os 40.Sh NAME 41.Nm installboot 42.Nd install a bootstrap on an FFS filesystem partition 43.Sh SYNOPSIS 44.Nm /usr/mdec/installboot 45.Op Fl Ntuv 46.Ar device 47.Sh DESCRIPTION 48.Nm 49prepares the 50.Pq physically 51first partition on a device for boot-strapping from the TOS-ROM. The 52bootstrap is written into the bootblock area on the partition, right 53in front of the disk pack label, and hence limited in size to 54LABELOFFSET bytes. A disk pack label should be created 55.Po 56see 57.Xr disklabel 8 58.Pc 59before installing the bootstrap. 60.Pp 61The bootstrap is split into two parts: a small first-stage program 62that resides in the 63.Pq physically 64first 512 bytes on the device 65.Pq as specified by Atari Corp. , 66and a second-stage program that immediately follows the first-stage 67program. The first-stage program is loaded into memory by the ROM. 68After receiving control, it loads the second-stage program and the 69disk label. The second-stage boot program uses the stand-alone 70filesystem code in 71.Dq libsa.a 72to load the kernel from the root-filesystem on the device. The 73prototype code for the first-stage boot program can be found in 74.Pa /usr/mdec/fdboot 75.Pq floppy disk code , 76.Pa /usr/mdec/sdboot 77.Pq SCSI disk code 78and 79.Pa /usr/mdec/wdboot 80.Pq IDE disk code . 81The second-stage boot program is stored in 82.Pa /usr/mdec/bootxx . 83.Pp 84For backwards compatibility with the vendor specific AHDI disk 85label, a\ special first-stage boot program is provided in 86.Pa /usr/mdec/xxboot.ahdi . 87Together with the general second-stage boot program, it is installed 88in the AHDI partition where the 89.Nx 90disk label lives. Furthermore, 91the AHDI specifications require an additional bootstrap, which is 92written into the AHDI root sector 93.Pq disk block zero . 94The prototype code for this AHDI compliant bootstrap can be found in 95.Pa /usr/mdec/sdb00t.ahdi 96and 97.Pa /usr/mdec/wdb00t.ahdi . 98.Pp 99The options are as follows: 100.Bl -tag -width flag 101.It Fl N 102Do not actually write anything on the disk. 103.It Fl t 104Number of tracks per cylinder (IDE disk). 105.It Fl u 106Number of sectors per track (IDE disk). 107.It Fl v 108Verbose mode. 109.El 110.Pp 111The arguments are: 112.Bl -tag -width device 113.It Ar device 114The name of the device on which the bootstrap is to be installed. 115.El 116.Sh EXAMPLES 117The following command will install the first-stage and second-stage 118boot programs in the bootblock area on 119.Dq sd0c : 120.Bd -literal -offset indent 121installboot sd0 122.Ed 123.Sh SEE ALSO 124.Xr bootpref 8 , 125.Xr disklabel 8 126.Sh HISTORY 127The 128.Nm 129command first appeared in 130.Nx 1.1 131.Sh BUGS 132.Nm 133knows too much about kernel internal details, forcing it to 134check the running kernel's release and revision. 135.Pp 136Because neither the floppy disk driver nor 137.Xr disklabel 8 138are capable of creating a disk pack label on a floppy disk, 139.Nm 140has to create a\ fictitious label, that is not used by the kernel. 141.Pp 142Except for installation of the bootcode on floppy, 143.Nm 144automatically sets the boot preference in NVRAM to 145.Nx . 146