| @@ -1,859 +1,863 @@ | | | @@ -1,859 +1,863 @@ |
1 | .\" $NetBSD: installboot.8,v 1.69 2008/09/24 19:28:48 reed Exp $ | | 1 | .\" $NetBSD: installboot.8,v 1.70 2008/10/02 08:51:22 sborrill Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (c) 2002-2003 The NetBSD Foundation, Inc. | | 3 | .\" Copyright (c) 2002-2003 The NetBSD Foundation, Inc. |
4 | .\" All rights reserved. | | 4 | .\" All rights reserved. |
5 | .\" | | 5 | .\" |
6 | .\" This code is derived from software contributed to The NetBSD Foundation | | 6 | .\" This code is derived from software contributed to The NetBSD Foundation |
7 | .\" by Luke Mewburn of Wasabi Systems. | | 7 | .\" by Luke Mewburn of Wasabi Systems. |
8 | .\" | | 8 | .\" |
9 | .\" Redistribution and use in source and binary forms, with or without | | 9 | .\" Redistribution and use in source and binary forms, with or without |
10 | .\" modification, are permitted provided that the following conditions | | 10 | .\" modification, are permitted provided that the following conditions |
11 | .\" are met: | | 11 | .\" are met: |
12 | .\" 1. Redistributions of source code must retain the above copyright | | 12 | .\" 1. Redistributions of source code must retain the above copyright |
13 | .\" notice, this list of conditions and the following disclaimer. | | 13 | .\" notice, this list of conditions and the following disclaimer. |
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 14 | .\" 2. Redistributions in binary form must reproduce the above copyright |
15 | .\" notice, this list of conditions and the following disclaimer in the | | 15 | .\" notice, this list of conditions and the following disclaimer in the |
16 | .\" documentation and/or other materials provided with the distribution. | | 16 | .\" documentation and/or other materials provided with the distribution. |
17 | .\" | | 17 | .\" |
18 | .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS | | 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 | | 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 | | 20 | .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
21 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | | 21 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
22 | .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | | 22 | .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
23 | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | | 23 | .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
24 | .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | | 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 | | 25 | .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
26 | .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | 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 | | 27 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
28 | .\" POSSIBILITY OF SUCH DAMAGE. | | 28 | .\" POSSIBILITY OF SUCH DAMAGE. |
29 | .\" | | 29 | .\" |
30 | .Dd July 5, 2007 | | 30 | .Dd July 5, 2007 |
31 | .Dt INSTALLBOOT 8 | | 31 | .Dt INSTALLBOOT 8 |
32 | .Os | | 32 | .Os |
33 | .Sh NAME | | 33 | .Sh NAME |
34 | .Nm installboot | | 34 | .Nm installboot |
35 | .Nd install disk bootstrap software | | 35 | .Nd install disk bootstrap software |
36 | . | | 36 | . |
37 | .Sh SYNOPSIS | | 37 | .Sh SYNOPSIS |
38 | .Nm | | 38 | .Nm |
39 | .Op Fl fnv | | 39 | .Op Fl fnv |
40 | .Op Fl B Ar s2bno | | 40 | .Op Fl B Ar s2bno |
41 | .Op Fl b Ar s1bno | | 41 | .Op Fl b Ar s1bno |
42 | .Op Fl m Ar machine | | 42 | .Op Fl m Ar machine |
43 | .Op Fl o Ar options | | 43 | .Op Fl o Ar options |
44 | .Op Fl t Ar fstype | | 44 | .Op Fl t Ar fstype |
45 | .Ar filesystem | | 45 | .Ar filesystem |
46 | .Ar primary | | 46 | .Ar primary |
47 | .Op Ar secondary | | 47 | .Op Ar secondary |
48 | .Nm | | 48 | .Nm |
49 | .Fl c | | 49 | .Fl c |
50 | .Op Fl fnv | | 50 | .Op Fl fnv |
51 | .Op Fl m Ar machine | | 51 | .Op Fl m Ar machine |
52 | .Op Fl o Ar options | | 52 | .Op Fl o Ar options |
53 | .Op Fl t Ar fstype | | 53 | .Op Fl t Ar fstype |
54 | .Ar filesystem | | 54 | .Ar filesystem |
55 | .Nm | | 55 | .Nm |
56 | .Fl e | | 56 | .Fl e |
57 | .Op Fl fnv | | 57 | .Op Fl fnv |
58 | .Op Fl m Ar machine | | 58 | .Op Fl m Ar machine |
59 | .Op Fl o Ar options | | 59 | .Op Fl o Ar options |
60 | .Ar bootstrap | | 60 | .Ar bootstrap |
61 | . | | 61 | . |
62 | .Sh DESCRIPTION | | 62 | .Sh DESCRIPTION |
63 | The | | 63 | The |
64 | .Nm | | 64 | .Nm |
65 | utility installs and removes | | 65 | utility installs and removes |
66 | .Nx | | 66 | .Nx |
67 | disk bootstrap software into a file system. | | 67 | disk bootstrap software into a file system. |
68 | .Nm | | 68 | .Nm |
69 | can install | | 69 | can install |
70 | .Ar primary | | 70 | .Ar primary |
71 | into | | 71 | into |
72 | .Ar filesystem , | | 72 | .Ar filesystem , |
73 | or disable an existing bootstrap in | | 73 | or disable an existing bootstrap in |
74 | .Ar filesystem . | | 74 | .Ar filesystem . |
75 | .Pp | | 75 | .Pp |
76 | One some architectures the options of an existing installed bootstrap, | | 76 | One some architectures the options of an existing installed bootstrap, |
77 | or those of a bootstrap file can be changed. | | 77 | or those of a bootstrap file can be changed. |
78 | .Pp | | 78 | .Pp |
79 | Generally, | | 79 | Generally, |
80 | .Nx | | 80 | .Nx |
81 | disk bootstrap software consists of two parts: a | | 81 | disk bootstrap software consists of two parts: a |
82 | .Dq primary | | 82 | .Dq primary |
83 | bootstrap program usually written into the disklabel area of the | | 83 | bootstrap program usually written into the disklabel area of the |
84 | file system by | | 84 | file system by |
85 | .Nm , | | 85 | .Nm , |
86 | and a | | 86 | and a |
87 | .Dq secondary | | 87 | .Dq secondary |
88 | bootstrap program that usually resides as an ordinary file in the file system. | | 88 | bootstrap program that usually resides as an ordinary file in the file system. |
89 | .Pp | | 89 | .Pp |
90 | When booting, the primary bootstrap program is loaded and invoked by | | 90 | When booting, the primary bootstrap program is loaded and invoked by |
91 | the machine's PROM or BIOS. | | 91 | the machine's PROM or BIOS. |
92 | After receiving control of the system it loads and runs the secondary | | 92 | After receiving control of the system it loads and runs the secondary |
93 | bootstrap program, which in turn loads and runs the kernel. | | 93 | bootstrap program, which in turn loads and runs the kernel. |
94 | The secondary bootstrap may allow control over various boot parameters | | 94 | The secondary bootstrap may allow control over various boot parameters |
95 | passed to the kernel. | | 95 | passed to the kernel. |
96 | .Pp | | 96 | .Pp |
97 | Perform the following steps to make a file system bootable: | | 97 | Perform the following steps to make a file system bootable: |
98 | .Bl -enum | | 98 | .Bl -enum |
99 | .It | | 99 | .It |
100 | Copy the secondary bootstrap (usually | | 100 | Copy the secondary bootstrap (usually |
101 | .Pa /usr/mdec/boot. Ns Sy MACHINE | | 101 | .Pa /usr/mdec/boot. Ns Sy MACHINE |
102 | or | | 102 | or |
103 | .Pa /usr/mdec/boot ) | | 103 | .Pa /usr/mdec/boot ) |
104 | to the root directory of the target file system. | | 104 | to the root directory of the target file system. |
105 | .Pp | | 105 | .Pp |
106 | . | | 106 | . |
107 | .It | | 107 | .It |
108 | Use | | 108 | Use |
109 | .Nm | | 109 | .Nm |
110 | to install the primary bootstrap program | | 110 | to install the primary bootstrap program |
111 | (usually | | 111 | (usually |
112 | .Pa /usr/mdec/bootxx_ Ns Sy FSTYPE ) | | 112 | .Pa /usr/mdec/bootxx_ Ns Sy FSTYPE ) |
113 | into | | 113 | into |
114 | .Ar filesystem . | | 114 | .Ar filesystem . |
115 | .Pp | | 115 | .Pp |
116 | The following platforms do not require this step if the primary bootstrap | | 116 | The following platforms do not require this step if the primary bootstrap |
117 | already exists and the secondary bootstrap file is just being updated: | | 117 | already exists and the secondary bootstrap file is just being updated: |
118 | .Sy alpha , | | 118 | .Sy alpha , |
119 | .Sy amd64 , | | 119 | .Sy amd64 , |
120 | .Sy amiga , | | 120 | .Sy amiga , |
121 | .Sy i386 , | | 121 | .Sy i386 , |
122 | .Sy pmax , | | 122 | .Sy pmax , |
123 | .Sy sparc64 , | | 123 | .Sy sparc64 , |
124 | and | | 124 | and |
125 | .Sy vax . | | 125 | .Sy vax . |
126 | .Pp | | 126 | .Pp |
127 | The following platform does not require the first step since a | | 127 | The following platform does not require the first step since a |
128 | single bootstrap file is used. | | 128 | single bootstrap file is used. |
129 | The single bootstrap is installed like the primary bootstrap on | | 129 | The single bootstrap is installed like the primary bootstrap on |
130 | other platforms: | | 130 | other platforms: |
131 | .Sy next68k . | | 131 | .Sy next68k . |
132 | .Pp | | 132 | .Pp |
133 | .El | | 133 | .El |
134 | .Pp | | 134 | .Pp |
135 | The options and arguments recognized by | | 135 | The options and arguments recognized by |
136 | .Nm | | 136 | .Nm |
137 | are as follows: | | 137 | are as follows: |
138 | . | | 138 | . |
139 | .Bl -tag -width "optionsxxx" | | 139 | .Bl -tag -width "optionsxxx" |
140 | . | | 140 | . |
141 | .It Fl B Ar s2bno | | 141 | .It Fl B Ar s2bno |
142 | When hard-coding the blocks of | | 142 | When hard-coding the blocks of |
143 | .Ar secondary | | 143 | .Ar secondary |
144 | into | | 144 | into |
145 | .Ar primary , | | 145 | .Ar primary , |
146 | start from block | | 146 | start from block |
147 | .Ar s2bno | | 147 | .Ar s2bno |
148 | instead of trying to determine the block numbers occupied by | | 148 | instead of trying to determine the block numbers occupied by |
149 | .Ar secondary | | 149 | .Ar secondary |
150 | by examining | | 150 | by examining |
151 | .Ar filesystem . | | 151 | .Ar filesystem . |
152 | If this option is supplied, | | 152 | If this option is supplied, |
153 | .Ar secondary | | 153 | .Ar secondary |
154 | should refer to an actual secondary bootstrap (rather than the | | 154 | should refer to an actual secondary bootstrap (rather than the |
155 | file name of the one present in | | 155 | file name of the one present in |
156 | .Ar filesystem ) | | 156 | .Ar filesystem ) |
157 | so that its size can be determined. | | 157 | so that its size can be determined. |
158 | . | | 158 | . |
159 | .It Fl b Ar s1bno | | 159 | .It Fl b Ar s1bno |
160 | Install | | 160 | Install |
161 | .Ar primary | | 161 | .Ar primary |
162 | at block number | | 162 | at block number |
163 | .Ar s1bno | | 163 | .Ar s1bno |
164 | instead of the default location for the machine and file system type. | | 164 | instead of the default location for the machine and file system type. |
165 | .Sy [ alpha , | | 165 | .Sy [ alpha , |
166 | .Sy pmax , | | 166 | .Sy pmax , |
167 | .Sy vax ] | | 167 | .Sy vax ] |
168 | . | | 168 | . |
169 | .It Fl c | | 169 | .It Fl c |
170 | Clear (remove) any existing bootstrap instead of installing one. | | 170 | Clear (remove) any existing bootstrap instead of installing one. |
171 | . | | 171 | . |
172 | .It Fl e | | 172 | .It Fl e |
173 | Edit the options of an existing bootstrap. | | 173 | Edit the options of an existing bootstrap. |
174 | This can be use to change the options in bootxx_xxxfs files, | | 174 | This can be use to change the options in bootxx_xxxfs files, |
175 | raw disk partitions, and the | | 175 | raw disk partitions, and the |
176 | .Pa pxeboot_ia32.bin | | 176 | .Pa pxeboot_ia32.bin |
177 | file. | | 177 | file. |
178 | .Sy [ amd64 , i386 ] | | 178 | .Sy [ amd64 , i386 ] |
179 | . | | 179 | . |
180 | .It Fl f | | 180 | .It Fl f |
181 | Forces | | 181 | Forces |
182 | .Nm | | 182 | .Nm |
183 | to ignore some errors. | | 183 | to ignore some errors. |
184 | . | | 184 | . |
185 | .It Fl m Ar machine | | 185 | .It Fl m Ar machine |
186 | Use | | 186 | Use |
187 | .Ar machine | | 187 | .Ar machine |
188 | as the target machine type. | | 188 | as the target machine type. |
189 | The default machine is determined from | | 189 | The default machine is determined from |
190 | .Xr uname 3 | | 190 | .Xr uname 3 |
191 | and then | | 191 | and then |
192 | .Ev MACHINE . | | 192 | .Ev MACHINE . |
193 | The following machines are currently supported by | | 193 | The following machines are currently supported by |
194 | .Nm : | | 194 | .Nm : |
195 | .Bd -ragged -offset indent | | 195 | .Bd -ragged -offset indent |
196 | .Sy alpha , | | 196 | .Sy alpha , |
197 | .Sy amd64 , | | 197 | .Sy amd64 , |
198 | .Sy amiga , | | 198 | .Sy amiga , |
199 | .Sy ews4800mips , | | 199 | .Sy ews4800mips , |
200 | .Sy hp300 , | | 200 | .Sy hp300 , |
201 | .Sy hp700 , | | 201 | .Sy hp700 , |
202 | .Sy i386 , | | 202 | .Sy i386 , |
203 | .Sy landisk , | | 203 | .Sy landisk , |
204 | .Sy macppc , | | 204 | .Sy macppc , |
205 | .Sy news68k , | | 205 | .Sy news68k , |
206 | .Sy newsmips , | | 206 | .Sy newsmips , |
207 | .Sy next68k , | | 207 | .Sy next68k , |
208 | .Sy pmax , | | 208 | .Sy pmax , |
209 | .Sy sparc , | | 209 | .Sy sparc , |
210 | .Sy sparc64 , | | 210 | .Sy sparc64 , |
211 | .Sy sun2 , | | 211 | .Sy sun2 , |
212 | .Sy sun3 , | | 212 | .Sy sun3 , |
213 | .Sy vax , | | 213 | .Sy vax , |
214 | .Sy x68k | | 214 | .Sy x68k |
215 | .Ed | | 215 | .Ed |
216 | . | | 216 | . |
217 | . | | 217 | . |
218 | .It Fl n | | 218 | .It Fl n |
219 | Do not write to | | 219 | Do not write to |
220 | .Ar filesystem . | | 220 | .Ar filesystem . |
221 | . | | 221 | . |
222 | .It Fl o Ar options | | 222 | .It Fl o Ar options |
223 | Machine specific | | 223 | Machine specific |
224 | .Nm | | 224 | .Nm |
225 | options, comma separated. | | 225 | options, comma separated. |
226 | .Pp | | 226 | .Pp |
227 | Supported options are (with the machines for they are valid in brackets): | | 227 | Supported options are (with the machines for they are valid in brackets): |
228 | . | | 228 | . |
229 | .Bl -tag -offset indent -width alphasum | | 229 | .Bl -tag -offset indent -width alphasum |
230 | . | | 230 | . |
231 | .It Sy alphasum | | 231 | .It Sy alphasum |
232 | .Sy [ alpha ] | | 232 | .Sy [ alpha ] |
233 | Recalculate and restore the Alpha checksum. | | 233 | Recalculate and restore the Alpha checksum. |
234 | This is the default for | | 234 | This is the default for |
235 | .Nx Ns Tn /alpha . | | 235 | .Nx Ns Tn /alpha . |
236 | . | | 236 | . |
237 | .It Sy append | | 237 | .It Sy append |
238 | .Sy [ alpha , | | 238 | .Sy [ alpha , |
239 | .Sy pmax , | | 239 | .Sy pmax , |
240 | .Sy vax ] | | 240 | .Sy vax ] |
241 | Append | | 241 | Append |
242 | .Ar primary | | 242 | .Ar primary |
243 | to the end of | | 243 | to the end of |
244 | .Ar filesystem , | | 244 | .Ar filesystem , |
245 | which must be a regular file in this case. | | 245 | which must be a regular file in this case. |
246 | . | | 246 | . |
247 | .It Sy command=\*[Lt]boot command\*[Gt] | | 247 | .It Sy command=\*[Lt]boot command\*[Gt] |
248 | .Sy [ amiga ] | | 248 | .Sy [ amiga ] |
249 | Modify the default boot command line. | | 249 | Modify the default boot command line. |
250 | . | | 250 | . |
251 | .It Sy console=\*[Lt]console name\*[Gt] | | 251 | .It Sy console=\*[Lt]console name\*[Gt] |
252 | .Sy [ amd64 , | | 252 | .Sy [ amd64 , |
253 | .Sy i386 ] | | 253 | .Sy i386 ] |
254 | Set the console device, \*[Lt]console name\*[Gt] must be one of: | | 254 | Set the console device, \*[Lt]console name\*[Gt] must be one of: |
255 | pc, com0, com1, com2, com3, com0kbd, com1kbd, com2kbd or com3kbd. | | 255 | pc, com0, com1, com2, com3, com0kbd, com1kbd, com2kbd or com3kbd. |
256 | . | | 256 | . |
257 | .It Sy ioaddr=\*[Lt]ioaddr\*[Gt] | | 257 | .It Sy ioaddr=\*[Lt]ioaddr\*[Gt] |
258 | .Sy [ amd64 , | | 258 | .Sy [ amd64 , |
259 | .Sy i386 ] | | 259 | .Sy i386 ] |
260 | Set the IO address to be used for the console serial port. | | 260 | Set the IO address to be used for the console serial port. |
261 | Defaults to the IO address used by the system BIOS for the specified port. | | 261 | Defaults to the IO address used by the system BIOS for the specified port. |
262 | . | | 262 | . |
263 | .It Sy keymap=\*[Lt]keymap\*[Gt] | | 263 | .It Sy keymap=\*[Lt]keymap\*[Gt] |
264 | .Sy [ amd64 , | | 264 | .Sy [ amd64 , |
265 | .Sy i386 ] | | 265 | .Sy i386 ] |
266 | Set a boot time keyboard translation map. | | 266 | Set a boot time keyboard translation map. |
267 | Each character in \*[Lt]keymap\*[Gt] will be replaced by the one following it. | | 267 | Each character in \*[Lt]keymap\*[Gt] will be replaced by the one following it. |
268 | For example, an argument of | | 268 | For example, an argument of |
269 | .Dq zyz | | 269 | .Dq zyz |
270 | would swap the lowercase letters | | 270 | would swap the lowercase letters |
271 | .Sq y | | 271 | .Sq y |
272 | and | | 272 | and |
273 | .Sq z . | | 273 | .Sq z . |
274 | . | | 274 | . |
275 | .It Sy password=\*[Lt]password\*[Gt] | | 275 | .It Sy password=\*[Lt]password\*[Gt] |
276 | .Sy [ amd64 , | | 276 | .Sy [ amd64 , |
277 | .Sy i386 ] | | 277 | .Sy i386 ] |
278 | Set the password which must be entered before the boot menu can be accessed. | | 278 | Set the password which must be entered before the boot menu can be accessed. |
279 | . | | 279 | . |
280 | .It Sy resetvideo | | 280 | .It Sy resetvideo |
281 | .Sy [ amd64 , | | 281 | .Sy [ amd64 , |
282 | .Sy i386 ] | | 282 | .Sy i386 ] |
283 | Reset the video before booting. | | 283 | Reset the video before booting. |
284 | . | | 284 | . |
285 | .It Sy speed=\*[Lt]baud rate\*[Gt] | | 285 | .It Sy speed=\*[Lt]baud rate\*[Gt] |
286 | .Sy [ amd64 , | | 286 | .Sy [ amd64 , |
287 | .Sy i386 ] | | 287 | .Sy i386 ] |
288 | Set the baud rate for the serial console. | | 288 | Set the baud rate for the serial console. |
289 | If a value of zero is specified, then the current baud rate (set by the | | 289 | If a value of zero is specified, then the current baud rate (set by the |
290 | BIOS) will be used. | | 290 | BIOS) will be used. |
291 | . | | 291 | . |
292 | .It Sy sunsum | | 292 | .It Sy sunsum |
293 | .Sy [ alpha , | | 293 | .Sy [ alpha , |
294 | .Sy pmax , | | 294 | .Sy pmax , |
295 | .Sy vax ] | | 295 | .Sy vax ] |
296 | Recalculate and restore the Sun and | | 296 | Recalculate and restore the Sun and |
297 | .Nx Ns Tn /sparc | | 297 | .Nx Ns Tn /sparc |
298 | compatible checksum. | | 298 | compatible checksum. |
299 | .Em Note : | | 299 | .Em Note : |
300 | The existing | | 300 | The existing |
301 | .Nx Ns Tn /sparc | | 301 | .Nx Ns Tn /sparc |
302 | disklabel should use no more than 4 partitions. | | 302 | disklabel should use no more than 4 partitions. |
303 | . | | 303 | . |
304 | .It Sy timeout=\*[Lt]seconds\*[Gt] | | 304 | .It Sy timeout=\*[Lt]seconds\*[Gt] |
305 | .Sy [ amd64 , | | 305 | .Sy [ amd64 , |
306 | .Sy i386 ] | | 306 | .Sy i386 ] |
307 | Set the timeout before the automatic boot begins to the given number of seconds. | | 307 | Set the timeout before the automatic boot begins to the given number of seconds. |
308 | .El | | 308 | .El |
309 | . | | 309 | . |
310 | .It Fl t Ar fstype | | 310 | .It Fl t Ar fstype |
311 | Use | | 311 | Use |
312 | .Ar fstype | | 312 | .Ar fstype |
313 | as the type of | | 313 | as the type of |
314 | .Ar filesystem . | | 314 | .Ar filesystem . |
315 | The default operation is to attempt to auto-detect this setting. | | 315 | The default operation is to attempt to auto-detect this setting. |
316 | The following file system types are currently supported by | | 316 | The following file system types are currently supported by |
317 | .Nm : | | 317 | .Nm : |
318 | . | | 318 | . |
319 | .Bl -tag -offset indent -width raid | | 319 | .Bl -tag -offset indent -width raid |
320 | . | | 320 | . |
321 | .It Sy ffs | | 321 | .It Sy ffs |
322 | .Bx | | 322 | .Bx |
323 | Fast File System. | | 323 | Fast File System. |
324 | . | | 324 | . |
325 | .It Sy raid | | 325 | .It Sy raid |
326 | Mirrored RAIDframe File System. | | 326 | Mirrored RAIDframe File System. |
327 | . | | 327 | . |
328 | .It Sy raw | | 328 | .It Sy raw |
329 | .Sq Raw | | 329 | .Sq Raw |
330 | image. | | 330 | image. |
331 | Note: if a platform needs to hard-code the block offset of the secondary | | 331 | Note: if a platform needs to hard-code the block offset of the secondary |
332 | bootstrap, it cannot be searched for on this file system type, and must | | 332 | bootstrap, it cannot be searched for on this file system type, and must |
333 | be provided with | | 333 | be provided with |
334 | .Fl B Ar s2bno . | | 334 | .Fl B Ar s2bno . |
335 | .El | | 335 | .El |
336 | . | | 336 | . |
337 | .It Fl v | | 337 | .It Fl v |
338 | Verbose operation. | | 338 | Verbose operation. |
339 | . | | 339 | . |
340 | .It Ar filesystem | | 340 | .It Ar filesystem |
341 | The path name of the device or file system image that | | 341 | The path name of the device or file system image that |
342 | .Nm | | 342 | .Nm |
343 | is to operate on. | | 343 | is to operate on. |
344 | It is not necessary for | | 344 | It is not necessary for |
345 | .Ar filesystem | | 345 | .Ar filesystem |
346 | to be a currently mounted file system. | | 346 | to be a currently mounted file system. |
347 | . | | 347 | . |
348 | .It Ar primary | | 348 | .It Ar primary |
349 | The path name of the | | 349 | The path name of the |
350 | .Dq primary | | 350 | .Dq primary |
351 | boot block to install. | | 351 | boot block to install. |
352 | . | | 352 | . |
353 | .It Ar secondary | | 353 | .It Ar secondary |
354 | The path name of the | | 354 | The path name of the |
355 | .Dq secondary | | 355 | .Dq secondary |
356 | boot block, | | 356 | boot block, |
357 | relative to the top of | | 357 | relative to the top of |
358 | .Ar filesystem . | | 358 | .Ar filesystem . |
359 | Most systems require | | 359 | Most systems require |
360 | .Ar secondary | | 360 | .Ar secondary |
361 | to be in the | | 361 | to be in the |
362 | .Dq root | | 362 | .Dq root |
363 | directory of the file system, so the leading | | 363 | directory of the file system, so the leading |
364 | .Dq Pa / | | 364 | .Dq Pa / |
365 | is not necessary on | | 365 | is not necessary on |
366 | .Ar secondary . | | 366 | .Ar secondary . |
367 | .Pp | | 367 | .Pp |
368 | Only certain combinations of | | 368 | Only certain combinations of |
369 | platform | | 369 | platform |
370 | .Pq Fl m Ar machine | | 370 | .Pq Fl m Ar machine |
371 | and file system type | | 371 | and file system type |
372 | .Pq Fl t Ar fstype | | 372 | .Pq Fl t Ar fstype |
373 | require that the name of the secondary bootstrap is | | 373 | require that the name of the secondary bootstrap is |
374 | supplied as | | 374 | supplied as |
375 | .Ar secondary , | | 375 | .Ar secondary , |
376 | so that information such as the disk block numbers occupied | | 376 | so that information such as the disk block numbers occupied |
377 | by the secondary bootstrap can be stored in the primary bootstrap. | | 377 | by the secondary bootstrap can be stored in the primary bootstrap. |
378 | These are: | | 378 | These are: |
379 | .Bl -column "Platform" "File systems" -offset indent | | 379 | .Bl -column "Platform" "File systems" -offset indent |
380 | .It Sy "Platform" Ta Sy "File systems" | | 380 | .It Sy "Platform" Ta Sy "File systems" |
381 | .It macppc Ta ffs, raw | | 381 | .It macppc Ta ffs, raw |
382 | .It news68k Ta ffs, raw | | 382 | .It news68k Ta ffs, raw |
383 | .It newsmips Ta ffs, raw | | 383 | .It newsmips Ta ffs, raw |
384 | .It sparc Ta ffs, raid, raw | | 384 | .It sparc Ta ffs, raid, raw |
385 | .It sun2 Ta ffs, raw | | 385 | .It sun2 Ta ffs, raw |
386 | .It sun3 Ta ffs, raw | | 386 | .It sun3 Ta ffs, raw |
387 | .El | | 387 | .El |
388 | .El | | 388 | .El |
389 | .Pp | | 389 | .Pp |
390 | .Nm | | 390 | .Nm |
391 | exits 0 on success, and \*[Gt]0 if an error occurs. | | 391 | exits 0 on success, and \*[Gt]0 if an error occurs. |
392 | . | | 392 | . |
393 | .Sh ENVIRONMENT | | 393 | .Sh ENVIRONMENT |
394 | .Nm | | 394 | .Nm |
395 | uses the following environment variables: | | 395 | uses the following environment variables: |
396 | . | | 396 | . |
397 | .Bl -tag -width "MACHINE" | | 397 | .Bl -tag -width "MACHINE" |
398 | . | | 398 | . |
399 | .It Ev MACHINE | | 399 | .It Ev MACHINE |
400 | Default value for | | 400 | Default value for |
401 | .Ar machine , | | 401 | .Ar machine , |
402 | overriding the result from | | 402 | overriding the result from |
403 | .Xr uname 3 . | | 403 | .Xr uname 3 . |
404 | . | | 404 | . |
405 | .El | | 405 | .El |
406 | . | | 406 | . |
407 | .Sh FILES | | 407 | .Sh FILES |
408 | Most | | 408 | Most |
409 | .Nx | | 409 | .Nx |
410 | ports will contain variations of the following files: | | 410 | ports will contain variations of the following files: |
411 | .Pp | | 411 | .Pp |
412 | .Bl -tag -width /usr/mdec/bootxx_ustarfs | | 412 | .Bl -tag -width /usr/mdec/bootxx_ustarfs |
413 | . | | 413 | . |
414 | .It Pa /usr/mdec/bootxx_ Ns Sy FSTYPE | | 414 | .It Pa /usr/mdec/bootxx_ Ns Sy FSTYPE |
415 | Primary bootstrap for file system type | | 415 | Primary bootstrap for file system type |
416 | .Sy FSTYPE . | | 416 | .Sy FSTYPE . |
417 | Installed into the bootstrap area of the file system by | | 417 | Installed into the bootstrap area of the file system by |
418 | .Nm . | | 418 | .Nm . |
419 | . | | 419 | . |
420 | .It Pa /usr/mdec/bootxx_fat16 | | 420 | .It Pa /usr/mdec/bootxx_fat16 |
421 | Primary bootstrap for | | 421 | Primary bootstrap for |
422 | .Tn MS-DOS | | 422 | .Tn MS-DOS |
423 | .Sy FAT16 | | 423 | .Sy FAT16 |
424 | file systems. | | 424 | file systems. |
425 | This differs from | | 425 | This differs from |
426 | .Nm bootxx_msdos | | 426 | .Nm bootxx_msdos |
427 | in that it doesn't require the filesystem to have been initialised with | | 427 | in that it doesn't require the filesystem to have been initialised with |
428 | any | | 428 | any |
429 | .Ql reserved sectors . | | 429 | .Ql reserved sectors . |
430 | It also uses the information in the | | 430 | It also uses the information in the |
431 | .Ql Boot Parameter Block | | 431 | .Ql Boot Parameter Block |
432 | to get the media and filesytem properties. | | 432 | to get the media and filesytem properties. |
433 | . | | 433 | . |
434 | .It Pa /usr/mdec/bootxx_ffsv1 | | 434 | .It Pa /usr/mdec/bootxx_ffsv1 |
435 | Primary bootstrap for | | 435 | Primary bootstrap for |
436 | .Sy FFSv1 | | 436 | .Sy FFSv1 |
437 | file systems | | 437 | file systems |
438 | (the "traditional" | | 438 | (the "traditional" |
439 | .Nx | | 439 | .Nx |
440 | file system). | | 440 | file system). |
441 | . | | 441 | . |
442 | .It Pa /usr/mdec/bootxx_ffsv2 | | 442 | .It Pa /usr/mdec/bootxx_ffsv2 |
443 | Primary bootstrap for | | 443 | Primary bootstrap for |
444 | .Sy FFSv2 | | 444 | .Sy FFSv2 |
445 | file systems. | | 445 | file systems. |
446 | . | | 446 | . |
447 | .It Pa /usr/mdec/bootxx_lfsv1 | | 447 | .It Pa /usr/mdec/bootxx_lfsv1 |
448 | Primary bootstrap for | | 448 | Primary bootstrap for |
449 | .Sy LFSv1 | | 449 | .Sy LFSv1 |
450 | file systems. | | 450 | file systems. |
451 | . | | 451 | . |
452 | .It Pa /usr/mdec/bootxx_lfsv2 | | 452 | .It Pa /usr/mdec/bootxx_lfsv2 |
453 | Primary bootstrap for | | 453 | Primary bootstrap for |
454 | .Sy LFSv2 | | 454 | .Sy LFSv2 |
455 | file systems | | 455 | file systems |
456 | (the default LFS version). | | 456 | (the default LFS version). |
457 | . | | 457 | . |
458 | .It Pa /usr/mdec/bootxx_msdos | | 458 | .It Pa /usr/mdec/bootxx_msdos |
459 | Primary bootstrap for | | 459 | Primary bootstrap for |
460 | .Tn MS-DOS | | 460 | .Tn MS-DOS |
461 | .Sy FAT | | 461 | .Sy FAT |
462 | file systems. | | 462 | file systems. |
463 | . | | 463 | . |
464 | .It Pa /usr/mdec/bootxx_ustarfs | | 464 | .It Pa /usr/mdec/bootxx_ustarfs |
465 | Primary bootstrap for | | 465 | Primary bootstrap for |
466 | .Sy TARFS | | 466 | .Sy TARFS |
467 | boot images. | | 467 | boot images. |
468 | This is used by various install media. | | 468 | This is used by various install media. |
469 | . | | 469 | . |
470 | .It Pa /usr/mdec/boot. Ns Sy MACHINE | | 470 | .It Pa /usr/mdec/boot. Ns Sy MACHINE |
471 | Secondary bootstrap for machine type | | 471 | Secondary bootstrap for machine type |
472 | .Sy MACHINE . | | 472 | .Sy MACHINE . |
473 | This should be installed into the file system before | | 473 | This should be installed into the file system before |
474 | .Nm | | 474 | .Nm |
475 | is run. | | 475 | is run. |
476 | . | | 476 | . |
477 | .It Pa /usr/mdec/boot | | 477 | .It Pa /usr/mdec/boot |
478 | Synonym for | | 478 | Synonym for |
479 | .Pa /usr/mdec/boot. Ns Sy MACHINE | | 479 | .Pa /usr/mdec/boot. Ns Sy MACHINE |
480 | . | | 480 | . |
481 | .It Pa /boot. Ns Sy MACHINE | | 481 | .It Pa /boot. Ns Sy MACHINE |
482 | Installed copy of secondary bootstrap for machine type | | 482 | Installed copy of secondary bootstrap for machine type |
483 | .Sy MACHINE . | | 483 | .Sy MACHINE . |
484 | . | | 484 | . |
485 | .It Pa /boot | | 485 | .It Pa /boot |
486 | Installed copy of secondary bootstrap. | | 486 | Installed copy of secondary bootstrap. |
487 | Searched for by the primary bootstrap if | | 487 | Searched for by the primary bootstrap if |
488 | .Pa /boot. Ns Sy MACHINE | | 488 | .Pa /boot. Ns Sy MACHINE |
489 | is not found. | | 489 | is not found. |
490 | . | | 490 | . |
491 | .El | | 491 | .El |
492 | . | | 492 | . |
493 | .Ss Nx Ns Tn /macppc files | | 493 | .Ss Nx Ns Tn /macppc files |
494 | . | | 494 | . |
495 | .Bl -tag -width /usr/mdec/bootxx_ustarfs | | 495 | .Bl -tag -width /usr/mdec/bootxx_ustarfs |
496 | . | | 496 | . |
497 | .It Pa /usr/mdec/bootxx | | 497 | .It Pa /usr/mdec/bootxx |
498 | .Nx Ns Tn /macppc | | 498 | .Nx Ns Tn /macppc |
499 | primary bootstrap. | | 499 | primary bootstrap. |
500 | . | | 500 | . |
501 | .It Pa /usr/mdec/ofwboot | | 501 | .It Pa /usr/mdec/ofwboot |
502 | .Nx Ns Tn /macppc | | 502 | .Nx Ns Tn /macppc |
503 | secondary bootstrap. | | 503 | secondary bootstrap. |
504 | . | | 504 | . |
505 | .It Pa /ofwboot | | 505 | .It Pa /ofwboot |
506 | Installed copy of | | 506 | Installed copy of |
507 | .Nx Ns Tn /macppc | | 507 | .Nx Ns Tn /macppc |
508 | secondary bootstrap. | | 508 | secondary bootstrap. |
509 | . | | 509 | . |
510 | .El | | 510 | .El |
511 | . | | 511 | . |
512 | .Ss Nx Ns Tn /next68k files | | 512 | .Ss Nx Ns Tn /next68k files |
513 | . | | 513 | . |
514 | .Bl -tag -width /usr/mdec/bootxx_ustarfs | | 514 | .Bl -tag -width /usr/mdec/bootxx_ustarfs |
515 | . | | 515 | . |
516 | .It Pa /usr/mdec/boot | | 516 | .It Pa /usr/mdec/boot |
517 | .Nx Ns Tn /next68k | | 517 | .Nx Ns Tn /next68k |
518 | bootstrap. | | 518 | bootstrap. |
519 | . | | 519 | . |
520 | .El | | 520 | .El |
521 | . | | 521 | . |
522 | .Ss Nx Ns Tn /sparc64 files | | 522 | .Ss Nx Ns Tn /sparc64 files |
523 | . | | 523 | . |
524 | .Bl -tag -width /usr/mdec/bootxx_ustarfs | | 524 | .Bl -tag -width /usr/mdec/bootxx_ustarfs |
525 | . | | 525 | . |
526 | .It Pa /usr/mdec/bootblk | | 526 | .It Pa /usr/mdec/bootblk |
527 | .Nx Ns Tn /sparc64 | | 527 | .Nx Ns Tn /sparc64 |
528 | primary bootstrap. | | 528 | primary bootstrap. |
529 | . | | 529 | . |
530 | .It Pa /usr/mdec/ofwboot | | 530 | .It Pa /usr/mdec/ofwboot |
531 | .Nx Ns Tn /sparc64 | | 531 | .Nx Ns Tn /sparc64 |
532 | secondary bootstrap. | | 532 | secondary bootstrap. |
533 | . | | 533 | . |
534 | .It Pa /ofwboot | | 534 | .It Pa /ofwboot |
535 | Installed copy of | | 535 | Installed copy of |
536 | .Nx Ns Tn /sparc64 | | 536 | .Nx Ns Tn /sparc64 |
537 | secondary bootstrap. | | 537 | secondary bootstrap. |
538 | . | | 538 | . |
539 | .El | | 539 | .El |
540 | . | | 540 | . |
541 | .Sh EXAMPLES | | 541 | .Sh EXAMPLES |
542 | . | | 542 | . |
543 | .Ss common | | 543 | .Ss common |
544 | Verbosely install the Berkeley Fast File System primary bootstrap on to disk | | 544 | Verbosely install the Berkeley Fast File System primary bootstrap on to disk |
545 | .Sq sd0 : | | 545 | .Sq sd0 : |
546 | .Dl Ic installboot -v /dev/rsd0c /usr/mdec/bootxx_ffs | | 546 | .Dl Ic installboot -v /dev/rsd0c /usr/mdec/bootxx_ffs |
547 | Note: the | | 547 | Note: the |
548 | .Dq whole disk | | 548 | .Dq whole disk |
549 | partition (c on some ports, d on others) is used here, since the a partition | | 549 | partition (c on some ports, d on others) is used here, since the a partition |
550 | probably is already opened (mounted as | | 550 | probably is already opened (mounted as |
551 | .Pa / ) , | | 551 | .Pa / ) , |
552 | so | | 552 | so |
553 | .Nm | | 553 | .Nm |
554 | would not be able to access it. | | 554 | would not be able to access it. |
555 | .Pp | | 555 | .Pp |
556 | Remove the primary bootstrap from disk | | 556 | Remove the primary bootstrap from disk |
557 | .Sq sd1 : | | 557 | .Sq sd1 : |
558 | .Dl Ic installboot -c /dev/rsd1c | | 558 | .Dl Ic installboot -c /dev/rsd1c |
559 | . | | 559 | . |
560 | .Ss Nx Ns Tn /amiga | | 560 | .Ss Nx Ns Tn /amiga |
561 | Modify the command line to change the default from "netbsd -ASn2" to | | 561 | Modify the command line to change the default from "netbsd -ASn2" to |
562 | "netbsd -S": | | 562 | "netbsd -S": |
563 | .Dl Ic installboot -m amiga -o command="netbsd -S" /dev/rsd0a /usr/mdec/bootxx_ffs | | 563 | .Dl Ic installboot -m amiga -o command="netbsd -S" /dev/rsd0a /usr/mdec/bootxx_ffs |
564 | . | | 564 | . |
565 | .Ss Nx Ns Tn /ews4800mips | | 565 | .Ss Nx Ns Tn /ews4800mips |
566 | Install the System V Boot File System primary bootstrap on to disk | | 566 | Install the System V Boot File System primary bootstrap on to disk |
567 | .Sq sd0 , | | 567 | .Sq sd0 , |
568 | with the secondary bootstrap | | 568 | with the secondary bootstrap |
569 | .Sq Pa /boot | | 569 | .Sq Pa /boot |
570 | already present in the SysVBFS partition on the disk: | | 570 | already present in the SysVBFS partition on the disk: |
571 | .Dl Ic installboot /dev/rsd0c /usr/mdec/bootxx_bfs | | 571 | .Dl Ic installboot /dev/rsd0c /usr/mdec/bootxx_bfs |
572 | . | | 572 | . |
573 | .Ss Nx Ns Tn /i386 and Nx Ns Tn /amd64 | | 573 | .Ss Nx Ns Tn /i386 and Nx Ns Tn /amd64 |
574 | Install new boot blocks on an existing mounted root file system on | | 574 | Install new boot blocks on an existing mounted root file system on |
575 | .Sq wd0 , | | 575 | .Sq wd0 , |
576 | setting the timeout to five seconds, after copying a new secondary | | 576 | setting the timeout to five seconds, after copying a new secondary |
577 | bootstrap: | | 577 | bootstrap: |
578 | .Dl Ic cp /usr/mdec/boot /boot | | 578 | .Dl Ic cp /usr/mdec/boot /boot |
579 | .Dl Ic installboot -v -o timeout=5 /dev/rwd0a /usr/mdec/bootxx_ffsv1 | | 579 | .Dl Ic installboot -v -o timeout=5 /dev/rwd0a /usr/mdec/bootxx_ffsv1 |
580 | . | | 580 | . |
581 | .Pp | | 581 | .Pp |
582 | Create a bootable CD-ROM with an ISO9660 | | 582 | Create a bootable CD-ROM with an ISO9660 |
583 | file system for an i386 system with a serial console: | | 583 | file system for an i386 system with a serial console: |
584 | .Dl Ic mkdir cdrom | | 584 | .Dl Ic mkdir cdrom |
585 | .Dl Ic cp sys/arch/i386/compile/mykernel/netbsd cdrom/netbsd | | 585 | .Dl Ic cp sys/arch/i386/compile/mykernel/netbsd cdrom/netbsd |
586 | .Dl Ic cp /usr/mdec/boot cdrom/boot | | 586 | .Dl Ic cp /usr/mdec/boot cdrom/boot |
587 | .Dl Ic cp /usr/mdec/bootxx_cd9660 bootxx | | 587 | .Dl Ic cp /usr/mdec/bootxx_cd9660 bootxx |
588 | .Dl Ic installboot -o console=com0,speed=19200 -m i386 -e bootxx | | 588 | .Dl Ic installboot -o console=com0,speed=19200 -m i386 -e bootxx |
589 | .Dl Ic makefs -t cd9660 -o 'bootimage=i386;bootxx,no-emul-boot' boot.iso \ | | 589 | .Dl Ic makefs -t cd9660 -o 'bootimage=i386;bootxx,no-emul-boot' boot.iso \ |
590 | cdrom | | 590 | cdrom |
591 | . | | 591 | . |
592 | .Pp | | 592 | .Pp |
593 | Create a bootable floppy disk with an FFSv1 | | 593 | Create a bootable floppy disk with an FFSv1 |
594 | file system for a small custom kernel (note: bigger kernels needing | | 594 | file system for a small custom kernel (note: bigger kernels needing |
595 | multiple disks are handled with the ustarfs file system): | | 595 | multiple disks are handled with the ustarfs file system): |
596 | .Dl Ic newfs -s 1440k /dev/rfd0a | | 596 | .Dl Ic newfs -s 1440k /dev/rfd0a |
597 | .Bd -ragged -offset indent-two -compact | | 597 | .Bd -ragged -offset indent-two -compact |
598 | .Em Note : | | 598 | .Em Note : |
599 | Ignore the warnings that | | 599 | Ignore the warnings that |
600 | .Xr newfs 8 | | 600 | .Xr newfs 8 |
601 | displays; it can not write a disklabel, | | 601 | displays; it can not write a disklabel, |
602 | which is not a problem for a floppy disk. | | 602 | which is not a problem for a floppy disk. |
603 | .Ed | | 603 | .Ed |
604 | .Dl Ic mount /dev/fd0a /mnt | | 604 | .Dl Ic mount /dev/fd0a /mnt |
605 | .Dl Ic cp /usr/mdec/boot /mnt/boot | | 605 | .Dl Ic cp /usr/mdec/boot /mnt/boot |
606 | .Dl Ic gzip -9 \*[Lt] sys/arch/i386/compile/mykernel/netbsd \*[Gt] /mnt/netbsd.gz | | 606 | .Dl Ic gzip -9 \*[Lt] sys/arch/i386/compile/mykernel/netbsd \*[Gt] /mnt/netbsd.gz |
607 | .Dl Ic umount /mnt | | 607 | .Dl Ic umount /mnt |
608 | .Dl Ic installboot -v /dev/rfd0a /usr/mdec/bootxx_ffsv1 | | 608 | .Dl Ic installboot -v /dev/rfd0a /usr/mdec/bootxx_ffsv1 |
609 | . | | 609 | . |
610 | .Pp | | 610 | .Pp |
611 | Create a bootable FAT file system on | | 611 | Create a bootable FAT file system on |
612 | .Sq wd1a , | | 612 | .Sq wd1a , |
613 | which should have the same offset and size as a FAT primary partition | | 613 | which should have the same offset and size as a FAT primary partition |
614 | in the Master Boot Record (MBR): | | 614 | in the Master Boot Record (MBR): |
615 | .Dl Ic newfs_msdos -r 16 /dev/rwd1a | | 615 | .Dl Ic newfs_msdos -r 16 /dev/rwd1a |
616 | .Bd -ragged -offset indent-two -compact | | 616 | .Bd -ragged -offset indent-two -compact |
617 | .Em Notes : | | 617 | .Em Notes : |
618 | The | | 618 | The |
619 | .Fl r Ar 16 | | 619 | .Fl r Ar 16 |
620 | is to reserve space for the primary bootstrap. | | 620 | is to reserve space for the primary bootstrap. |
621 | .Xr newfs_msdos 8 | | 621 | .Xr newfs_msdos 8 |
622 | will display an | | 622 | will display an |
623 | .Dq MBR type | | 623 | .Dq MBR type |
624 | such as | | 624 | such as |
625 | .Ql 1 , | | 625 | .Ql 1 , |
626 | .Ql 4 , | | 626 | .Ql 4 , |
627 | or | | 627 | or |
628 | .Ql 6 ; | | 628 | .Ql 6 ; |
629 | the MBR partition type of the appropriate primary partition should be | | 629 | the MBR partition type of the appropriate primary partition should be |
630 | changed to this value. | | 630 | changed to this value. |
631 | .Ed | | 631 | .Ed |
632 | .Dl Ic mount -t msdos /dev/wd1a /mnt | | 632 | .Dl Ic mount -t msdos /dev/wd1a /mnt |
633 | .Dl Ic cp /usr/mdec/boot /mnt/boot | | 633 | .Dl Ic cp /usr/mdec/boot /mnt/boot |
634 | .Dl Ic cp path/to/kernel /mnt/netbsd | | 634 | .Dl Ic cp path/to/kernel /mnt/netbsd |
635 | .Dl Ic umount /mnt | | 635 | .Dl Ic umount /mnt |
636 | .Dl Ic installboot -t raw /dev/rwd1a /usr/mdec/bootxx_msdos | | 636 | .Dl Ic installboot -t raw /dev/rwd1a /usr/mdec/bootxx_msdos |
637 | .Pp | | 637 | .Pp |
638 | Make the existing FAT16 filesystem on | | 638 | Make the existing FAT16 filesystem on |
639 | .Sq sd0e | | 639 | .Sq sd0e |
640 | bootable. | | 640 | bootable. |
641 | This can be used to make USB memory bootable provided it has 512 byte | | 641 | This can be used to make USB memory bootable provided it has 512 byte |
642 | sectors and that the manufacturer correctly initialised the file system. | | 642 | sectors and that the manufacturer correctly initialised the file system. |
643 | .Dl Ic mount -t msdos /dev/sd0e /mnt | | 643 | .Dl Ic mount -t msdos /dev/sd0e /mnt |
644 | .Dl Ic cp /usr/mdec/boot /mnt/boot | | 644 | .Dl Ic cp /usr/mdec/boot /mnt/boot |
645 | .Dl Ic cp path/to/kernel /mnt/netbsd | | 645 | .Dl Ic cp path/to/kernel /mnt/netbsd |
646 | .Dl Ic umount /mnt | | 646 | .Dl Ic umount /mnt |
647 | .Dl Ic installboot /dev/rsd0e /usr/mdec/bootxx_fat16 | | 647 | .Dl Ic installboot /dev/rsd0e /usr/mdec/bootxx_fat16 |
648 | It may also be necessary to use | | 648 | It may also be necessary to use |
649 | .Nm fdisk | | 649 | .Nm fdisk |
650 | to make the device itself bootable. | | 650 | to make the device itself bootable. |
651 | . | | 651 | . |
| | | 652 | .Pp |
| | | 653 | Switch the existing installed bootstrap to use a serial console without |
| | | 654 | reinstalling or altering other options such as timeout. |
| | | 655 | .Dl Ic installboot -e -o console=com0 /dev/rwd0a |
652 | .Ss Nx Ns Tn /macppc | | 656 | .Ss Nx Ns Tn /macppc |
653 | Note the | | 657 | Note the |
654 | .Nm | | 658 | .Nm |
655 | utility is only required for macppc machines with OpenFirmware version 2 | | 659 | utility is only required for macppc machines with OpenFirmware version 2 |
656 | to boot. | | 660 | to boot. |
657 | OpenFirmware 3 cannot load bootblocks specified in the Apple partition | | 661 | OpenFirmware 3 cannot load bootblocks specified in the Apple partition |
658 | map. | | 662 | map. |
659 | .Pp | | 663 | .Pp |
660 | Install the Berkeley Fast File System primary bootstrap on to disk | | 664 | Install the Berkeley Fast File System primary bootstrap on to disk |
661 | .Sq wd0 : | | 665 | .Sq wd0 : |
662 | .Dl Ic installboot /dev/rwd0c /usr/mdec/bootxx /ofwboot | | 666 | .Dl Ic installboot /dev/rwd0c /usr/mdec/bootxx /ofwboot |
663 | .Pp | | 667 | .Pp |
664 | The secondary | | 668 | The secondary |
665 | .Nx Ns Tn /macppc | | 669 | .Nx Ns Tn /macppc |
666 | bootstrap is located in | | 670 | bootstrap is located in |
667 | .Pa /usr/mdec/ofwboot . | | 671 | .Pa /usr/mdec/ofwboot . |
668 | .Pp | | 672 | .Pp |
669 | The primary bootstrap requires the raw | | 673 | The primary bootstrap requires the raw |
670 | .Pa ofwboot | | 674 | .Pa ofwboot |
671 | for the secondary bootstrap, not | | 675 | for the secondary bootstrap, not |
672 | .Pa ofwboot.xcf , | | 676 | .Pa ofwboot.xcf , |
673 | which is used for the OpenFirmware to load kernels. | | 677 | which is used for the OpenFirmware to load kernels. |
674 | .Ss Nx Ns Tn /next68k | | 678 | .Ss Nx Ns Tn /next68k |
675 | Install the bootstrap on to disk | | 679 | Install the bootstrap on to disk |
676 | .Sq sd0 : | | 680 | .Sq sd0 : |
677 | .Dl Ic installboot /dev/rsd0c /usr/mdec/boot | | 681 | .Dl Ic installboot /dev/rsd0c /usr/mdec/boot |
678 | .Pp | | 682 | .Pp |
679 | . | | 683 | . |
680 | .Ss Nx Ns Tn /pmax | | 684 | .Ss Nx Ns Tn /pmax |
681 | Install the Berkeley Fast File System primary bootstrap on to disk | | 685 | Install the Berkeley Fast File System primary bootstrap on to disk |
682 | .Sq sd0 : | | 686 | .Sq sd0 : |
683 | .Dl Ic installboot /dev/rsd0c /usr/mdec/bootxx_ffs | | 687 | .Dl Ic installboot /dev/rsd0c /usr/mdec/bootxx_ffs |
684 | .Pp | | 688 | .Pp |
685 | .Nx Ns Tn /pmax | | 689 | .Nx Ns Tn /pmax |
686 | requires that this file system starts at block 0 of the disk. | | 690 | requires that this file system starts at block 0 of the disk. |
687 | .Pp | | 691 | .Pp |
688 | Install the ISO 9660 primary bootstrap in the file | | 692 | Install the ISO 9660 primary bootstrap in the file |
689 | .Pa /tmp/cd-image : | | 693 | .Pa /tmp/cd-image : |
690 | .Dl Ic installboot -m pmax /tmp/cd-image /usr/mdec/bootxx_cd9660 | | 694 | .Dl Ic installboot -m pmax /tmp/cd-image /usr/mdec/bootxx_cd9660 |
691 | .Pp | | 695 | .Pp |
692 | Make an ISO 9660 filesystem in the file | | 696 | Make an ISO 9660 filesystem in the file |
693 | .Pa /tmp/cd-image | | 697 | .Pa /tmp/cd-image |
694 | and install the ISO 9660 primary bootstrap in the filesystem, where the | | 698 | and install the ISO 9660 primary bootstrap in the filesystem, where the |
695 | source directory for the ISO 9660 filesystem contains a kernel, the | | 699 | source directory for the ISO 9660 filesystem contains a kernel, the |
696 | primary bootstrap | | 700 | primary bootstrap |
697 | .Pa bootxx_cd9660 | | 701 | .Pa bootxx_cd9660 |
698 | and the secondary bootstrap | | 702 | and the secondary bootstrap |
699 | .Pa boot.pmax : | | 703 | .Pa boot.pmax : |
700 | .Dl Ic mkisofs -o /tmp/cd-image -a -l -v iso-source-dir | | 704 | .Dl Ic mkisofs -o /tmp/cd-image -a -l -v iso-source-dir |
701 | .Dl ... | | 705 | .Dl ... |
702 | .Dl 48 51 iso-source-dir/bootxx_cd9660 | | 706 | .Dl 48 51 iso-source-dir/bootxx_cd9660 |
703 | .Dl ... | | 707 | .Dl ... |
704 | .Dl Ic installboot -b `expr 48 \e* 4` /tmp/cd-image /usr/mdec/bootxx_cd9660 | | 708 | .Dl Ic installboot -b `expr 48 \e* 4` /tmp/cd-image /usr/mdec/bootxx_cd9660 |
705 | . | | 709 | . |
706 | .Ss Nx Ns Tn /sparc | | 710 | .Ss Nx Ns Tn /sparc |
707 | Install the Berkeley Fast File System primary bootstrap on to disk | | 711 | Install the Berkeley Fast File System primary bootstrap on to disk |
708 | .Sq sd0 , | | 712 | .Sq sd0 , |
709 | with the secondary bootstrap | | 713 | with the secondary bootstrap |
710 | .Sq Pa /boot | | 714 | .Sq Pa /boot |
711 | already present: | | 715 | already present: |
712 | .Dl Ic installboot /dev/rsd0c /usr/mdec/bootxx /boot | | 716 | .Dl Ic installboot /dev/rsd0c /usr/mdec/bootxx /boot |
713 | . | | 717 | . |
714 | .Ss Nx Ns Tn /sparc64 | | 718 | .Ss Nx Ns Tn /sparc64 |
715 | Install the Berkeley Fast File System primary bootstrap on to disk | | 719 | Install the Berkeley Fast File System primary bootstrap on to disk |
716 | .Sq wd0 : | | 720 | .Sq wd0 : |
717 | .Dl Ic installboot /dev/rwd0c /usr/mdec/bootblk | | 721 | .Dl Ic installboot /dev/rwd0c /usr/mdec/bootblk |
718 | .Pp | | 722 | .Pp |
719 | The secondary | | 723 | The secondary |
720 | .Nx Ns Tn /sparc64 | | 724 | .Nx Ns Tn /sparc64 |
721 | bootstrap is located in | | 725 | bootstrap is located in |
722 | .Pa /usr/mdec/ofwboot . | | 726 | .Pa /usr/mdec/ofwboot . |
723 | . | | 727 | . |
724 | .Ss Nx Ns Tn /sun2 and Nx Ns Tn /sun3 | | 728 | .Ss Nx Ns Tn /sun2 and Nx Ns Tn /sun3 |
725 | Install the Berkeley Fast File System primary bootstrap on to disk | | 729 | Install the Berkeley Fast File System primary bootstrap on to disk |
726 | .Sq sd0 , | | 730 | .Sq sd0 , |
727 | with the secondary bootstrap | | 731 | with the secondary bootstrap |
728 | .Sq Pa /boot | | 732 | .Sq Pa /boot |
729 | already present: | | 733 | already present: |
730 | .Dl Ic installboot /dev/rsd0c /usr/mdec/bootxx /boot | | 734 | .Dl Ic installboot /dev/rsd0c /usr/mdec/bootxx /boot |
731 | . | | 735 | . |
732 | .Sh SEE ALSO | | 736 | .Sh SEE ALSO |
733 | .Xr uname 3 , | | 737 | .Xr uname 3 , |
734 | .Xr boot 8 , | | 738 | .Xr boot 8 , |
735 | .Xr disklabel 8 , | | 739 | .Xr disklabel 8 , |
736 | .Xr fdisk 8 , | | 740 | .Xr fdisk 8 , |
737 | .Xr pxeboot 8 | | 741 | .Xr pxeboot 8 |
738 | . | | 742 | . |
739 | .Sh HISTORY | | 743 | .Sh HISTORY |
740 | This implementation of | | 744 | This implementation of |
741 | .Nm | | 745 | .Nm |
742 | appeared in | | 746 | appeared in |
743 | .Nx 1.6 . | | 747 | .Nx 1.6 . |
744 | . | | 748 | . |
745 | .Sh AUTHORS | | 749 | .Sh AUTHORS |
746 | The machine independent portion of this implementation of | | 750 | The machine independent portion of this implementation of |
747 | .Nm | | 751 | .Nm |
748 | was written by Luke Mewburn. | | 752 | was written by Luke Mewburn. |
749 | The following people contributed to the various machine dependent | | 753 | The following people contributed to the various machine dependent |
750 | back-ends: | | 754 | back-ends: |
751 | Simon Burge (pmax), | | 755 | Simon Burge (pmax), |
752 | Chris Demetriou (alpha), | | 756 | Chris Demetriou (alpha), |
753 | Matthew Fredette (sun2, sun3), | | 757 | Matthew Fredette (sun2, sun3), |
754 | Matthew Green (sparc64), | | 758 | Matthew Green (sparc64), |
755 | Ross Harvey (alpha), | | 759 | Ross Harvey (alpha), |
756 | Michael Hitch (amiga), | | 760 | Michael Hitch (amiga), |
757 | Paul Kranenburg (sparc), | | 761 | Paul Kranenburg (sparc), |
758 | David Laight (i386), | | 762 | David Laight (i386), |
759 | Christian Limpach (next68k), | | 763 | Christian Limpach (next68k), |
760 | Luke Mewburn (macppc), | | 764 | Luke Mewburn (macppc), |
761 | Matt Thomas (vax), | | 765 | Matt Thomas (vax), |
762 | Izumi Tsutsui (news68k, newsmips), | | 766 | Izumi Tsutsui (news68k, newsmips), |
763 | and | | 767 | and |
764 | UCHIYAMA Yasushi (ews4800mips). | | 768 | UCHIYAMA Yasushi (ews4800mips). |
765 | . | | 769 | . |
766 | .Sh BUGS | | 770 | .Sh BUGS |
767 | There are not currently primary bootstraps to support all file systems | | 771 | There are not currently primary bootstraps to support all file systems |
768 | types which are capable of being the root file system. | | 772 | types which are capable of being the root file system. |
769 | .Pp | | 773 | .Pp |
770 | If a disk has been converted from | | 774 | If a disk has been converted from |
771 | .Sy FFS | | 775 | .Sy FFS |
772 | to | | 776 | to |
773 | .Sy RAID | | 777 | .Sy RAID |
774 | without the contents of the disk erased, then the original | | 778 | without the contents of the disk erased, then the original |
775 | .Sy FFS | | 779 | .Sy FFS |
776 | installation may be auto-detected instead of the | | 780 | installation may be auto-detected instead of the |
777 | .Sy RAID | | 781 | .Sy RAID |
778 | installation. | | 782 | installation. |
779 | In this case, the | | 783 | In this case, the |
780 | .Fl t Ar raid | | 784 | .Fl t Ar raid |
781 | option must be provided. | | 785 | option must be provided. |
782 | . | | 786 | . |
783 | .Ss Nx Ns Tn /alpha | | 787 | .Ss Nx Ns Tn /alpha |
784 | The | | 788 | The |
785 | .Nx Ns Tn /alpha | | 789 | .Nx Ns Tn /alpha |
786 | primary bootstrap program can only load the secondary bootstrap program | | 790 | primary bootstrap program can only load the secondary bootstrap program |
787 | from file systems starting at the beginning (block 0) of disks. | | 791 | from file systems starting at the beginning (block 0) of disks. |
788 | Similarly, the secondary bootstrap program can only load kernels from | | 792 | Similarly, the secondary bootstrap program can only load kernels from |
789 | file systems starting at the beginning of disks. | | 793 | file systems starting at the beginning of disks. |
790 | .Pp | | 794 | .Pp |
791 | The size of primary bootstrap programs is restricted to 7.5KB, even | | 795 | The size of primary bootstrap programs is restricted to 7.5KB, even |
792 | though some file systems (e.g., ISO 9660) are able to accommodate larger | | 796 | though some file systems (e.g., ISO 9660) are able to accommodate larger |
793 | ones. | | 797 | ones. |
794 | . | | 798 | . |
795 | .Ss Nx Ns Tn /hp300 | | 799 | .Ss Nx Ns Tn /hp300 |
796 | The disk must have a boot partition large enough to hold the bootstrap code. | | 800 | The disk must have a boot partition large enough to hold the bootstrap code. |
797 | Currently the primary bootstrap must be a LIF format file. | | 801 | Currently the primary bootstrap must be a LIF format file. |
798 | . | | 802 | . |
799 | .Ss Nx Ns Tn /i386 and Nx Ns Tn /amd64 | | 803 | .Ss Nx Ns Tn /i386 and Nx Ns Tn /amd64 |
800 | The bootstrap must be installed in the | | 804 | The bootstrap must be installed in the |
801 | .Nx | | 805 | .Nx |
802 | partition that starts at the beginning of the mbr partition. | | 806 | partition that starts at the beginning of the mbr partition. |
803 | If that is a valid filesystem and contains the | | 807 | If that is a valid filesystem and contains the |
804 | .Pa /boot | | 808 | .Pa /boot |
805 | program then it will be used as the root filesystem, otherwise the | | 809 | program then it will be used as the root filesystem, otherwise the |
806 | .Sq a | | 810 | .Sq a |
807 | partition will be booted. | | 811 | partition will be booted. |
808 | .Pp | | 812 | .Pp |
809 | The size of primary bootstrap programs is restricted to 8KB, even | | 813 | The size of primary bootstrap programs is restricted to 8KB, even |
810 | though some file systems (e.g., ISO 9660) are able to accommodate larger | | 814 | though some file systems (e.g., ISO 9660) are able to accommodate larger |
811 | ones. | | 815 | ones. |
812 | . | | 816 | . |
813 | .Ss Nx Ns Tn /macppc | | 817 | .Ss Nx Ns Tn /macppc |
814 | Due to restrictions in | | 818 | Due to restrictions in |
815 | .Nm | | 819 | .Nm |
816 | and the secondary bootstrap implementation, file systems where kernels exist | | 820 | and the secondary bootstrap implementation, file systems where kernels exist |
817 | must start at the beginning of disks. | | 821 | must start at the beginning of disks. |
818 | .Pp | | 822 | .Pp |
819 | Currently, | | 823 | Currently, |
820 | .Nm | | 824 | .Nm |
821 | doesn't recognize an existing Apple partition map on the disk | | 825 | doesn't recognize an existing Apple partition map on the disk |
822 | and always writes a faked map to make disks bootable. | | 826 | and always writes a faked map to make disks bootable. |
823 | .Pp | | 827 | .Pp |
824 | The | | 828 | The |
825 | .Nx Ns Tn /macppc | | 829 | .Nx Ns Tn /macppc |
826 | bootstrap program can't load kernels from | | 830 | bootstrap program can't load kernels from |
827 | .Sy FFSv2 | | 831 | .Sy FFSv2 |
828 | partitions. | | 832 | partitions. |
829 | .Ss Nx Ns Tn /next68k | | 833 | .Ss Nx Ns Tn /next68k |
830 | The size of bootstrap programs is restricted to the free space before | | 834 | The size of bootstrap programs is restricted to the free space before |
831 | the file system at the beginning of the disk minus 8KB. | | 835 | the file system at the beginning of the disk minus 8KB. |
832 | . | | 836 | . |
833 | .Ss Nx Ns Tn /pmax | | 837 | .Ss Nx Ns Tn /pmax |
834 | The | | 838 | The |
835 | .Nx Ns Tn /pmax | | 839 | .Nx Ns Tn /pmax |
836 | secondary bootstrap program can only load kernels from file | | 840 | secondary bootstrap program can only load kernels from file |
837 | systems starting at the beginning of disks. | | 841 | systems starting at the beginning of disks. |
838 | .Pp | | 842 | .Pp |
839 | The size of primary bootstrap programs is restricted to 7.5KB, even | | 843 | The size of primary bootstrap programs is restricted to 7.5KB, even |
840 | though some file systems (e.g., ISO 9660) are able to accommodate larger | | 844 | though some file systems (e.g., ISO 9660) are able to accommodate larger |
841 | ones. | | 845 | ones. |
842 | . | | 846 | . |
843 | .Ss Nx Ns Tn /sun2 and Nx Ns Tn /sun3 | | 847 | .Ss Nx Ns Tn /sun2 and Nx Ns Tn /sun3 |
844 | The | | 848 | The |
845 | .Nx Ns Tn /sun2 | | 849 | .Nx Ns Tn /sun2 |
846 | and | | 850 | and |
847 | .Nx Ns Tn /sun3 | | 851 | .Nx Ns Tn /sun3 |
848 | secondary bootstrap program can only load kernels from file | | 852 | secondary bootstrap program can only load kernels from file |
849 | systems starting at the beginning of disks. | | 853 | systems starting at the beginning of disks. |
850 | . | | 854 | . |
851 | .Ss Nx Ns Tn /vax | | 855 | .Ss Nx Ns Tn /vax |
852 | The | | 856 | The |
853 | .Nx Ns Tn /vax | | 857 | .Nx Ns Tn /vax |
854 | secondary bootstrap program can only load kernels from file systems | | 858 | secondary bootstrap program can only load kernels from file systems |
855 | starting at the beginning of disks. | | 859 | starting at the beginning of disks. |
856 | .Pp | | 860 | .Pp |
857 | The size of primary bootstrap programs is restricted to 7.5KB, even | | 861 | The size of primary bootstrap programs is restricted to 7.5KB, even |
858 | though some file systems (e.g., ISO 9660) are able to accommodate larger | | 862 | though some file systems (e.g., ISO 9660) are able to accommodate larger |
859 | ones. | | 863 | ones. |