xref: /netbsd-src/share/man/man8/man8.atari/installboot.8 (revision 3af2acdca3027a6c734b99873d418d59b2d8f42a)
1.\"	$NetBSD: installboot.8,v 1.14 2017/02/17 22:30:28 christos 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.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd February 17, 2017
31.Dt INSTALLBOOT 8 atari
32.Os
33.Sh NAME
34.Nm installboot
35.Nd install a bootstrap on an FFS filesystem partition
36.Sh SYNOPSIS
37.Nm /usr/mdec/installboot
38.Op Fl Nmtuv
39.Ar device
40.Sh DESCRIPTION
41.Nm
42prepares the
43.Pq physically
44first partition on a device for boot-strapping from the TOS-ROM.
45The bootstrap is written into the bootblock area on the partition, right
46in front of the disk pack label, and hence limited in size to
47.Dv LABELOFFSET
48bytes.
49A disk pack label should be created
50.Po
51see
52.Xr disklabel 8
53.Pc
54before installing the bootstrap.
55.Pp
56The bootstrap is split into three parts: a small first-stage program
57that resides in the
58.Pq physically
59first 512 bytes on the device
60.Pq as specified by Atari Corp. ,
61a second-stage program that immediately follows the first-stage
62program, and a third-stage program that resides on the root filesystem.
63The first-stage program is loaded into memory by the ROM.
64After receiving control, it loads the second-stage program and the
65disk label.
66The second-stage boot program uses the stand-alone
67filesystem code in
68.Dq libsa.a
69to load the third-stage boot program from the root-filesystem on the device.
70The third-stage boot program then loads the kernel.
71The prototype code for the first-stage boot program can be found in
72.Pa /usr/mdec/std/fdboot
73.Pq floppy disk code ,
74.Pa /usr/mdec/std/sdboot
75.Pq SCSI disk code
76and
77.Pa /usr/mdec/std/wdboot
78.Pq IDE disk code .
79The second-stage boot program is stored in
80.Pa /usr/mdec/std/bootxx .
81and the third-stage boot program is stored in
82.Pa /usr/mdec/std/boot.atari .
83The boot code for Milan machines is different from the other machines and
84the files for the Milan can be found in the directory
85.Pa /usr/mdec/milan .
86Note that the Milan uses the SCSI disk code for both SCSI and IDE disks.
87.Pp
88For backwards compatibility with the vendor specific AHDI disk
89label, a\ special first-stage boot program is provided in
90.Pa /usr/mdec/std/xxboot.ahdi .
91Together with the general second-stage boot program, it is installed
92in the AHDI partition where the
93.Nx
94disk label lives.
95Furthermore,
96the AHDI specifications require an additional bootstrap, which is
97written into the AHDI root sector
98.Pq disk block zero .
99The prototype code for this AHDI compliant bootstrap can be found in
100.Pa /usr/mdec/std/sdb00t.ahdi
101and
102.Pa /usr/mdec/std/wdb00t.ahdi ,
103or the equivalents in
104.Pa /usr/mdec/milan .
105.Pp
106Perform the following steps to make a file system bootable:
107.Bl -enum
108.It
109Copy the secondary bootstrap (either
110.Pa /usr/mdec/std/boot.atari
111or
112.Pa /usr/mdec/milan/boot.atari )
113to the root directory of the target file system.
114.It
115Use
116.Nm
117to install the primary and secondary bootstrap programs
118(from
119.Pa /usr/mdec/std
120or
121.Pa /usr/mdec/milan )
122into the
123.Ar filesystem .
124.El
125.Pp
126The options are as follows:
127.Bl -tag -width flag
128.It Fl N
129Do not actually write anything on the disk.
130.It Fl m
131Use Milan boot code.
132.It Fl t
133Number of tracks per cylinder (IDE disk).
134.It Fl u
135Number of sectors per track (IDE disk).
136.It Fl v
137Verbose mode.
138.El
139.Pp
140The arguments are:
141.Bl -tag -width device
142.It Ar device
143The name of the device on which the bootstrap is to be installed.
144.El
145.Sh EXAMPLES
146The following command will install the first-stage and second-stage
147boot programs in the bootblock area on
148.Dq sd0c :
149.Bd -literal -offset indent
150installboot sd0
151.Ed
152.Sh SEE ALSO
153.Xr atari/bootpref 8 ,
154.Xr disklabel 8
155.Sh HISTORY
156The
157.Nm
158command first appeared in
159.Nx 1.1
160.Sh BUGS
161.Nm
162knows too much about kernel internal details, forcing it to
163check the running kernel's release and revision.
164.Pp
165Because neither the floppy disk driver nor
166.Xr disklabel 8
167are capable of creating a disk pack label on a floppy disk,
168.Nm
169has to create a\ fictitious label, that is not used by the kernel.
170.Pp
171Except for installation of the bootcode on floppy,
172.Nm
173automatically sets the boot preference in NVRAM to
174.Nx .
175