| @@ -1,888 +1,888 @@ | | | @@ -1,888 +1,888 @@ |
1 | .\" $NetBSD: installboot.8,v 1.75 2010/11/21 21:07:46 jym Exp $ | | 1 | .\" $NetBSD: installboot.8,v 1.76 2011/04/25 07:04:50 martin Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (c) 2002-2009 The NetBSD Foundation, Inc. | | 3 | .\" Copyright (c) 2002-2009 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 January 11, 2010 | | 30 | .Dd January 11, 2010 |
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 bootconf | | 247 | .It Sy bootconf |
248 | .Sy [ amd64 , | | 248 | .Sy [ amd64 , |
249 | .Sy i386 ] | | 249 | .Sy i386 ] |
250 | (Don't) read a | | 250 | (Don't) read a |
251 | .Dq boot.cfg | | 251 | .Dq boot.cfg |
252 | file. | | 252 | file. |
253 | . | | 253 | . |
254 | .It Sy command=\*[Lt]boot command\*[Gt] | | 254 | .It Sy command=\*[Lt]boot command\*[Gt] |
255 | .Sy [ amiga ] | | 255 | .Sy [ amiga ] |
256 | Modify the default boot command line. | | 256 | Modify the default boot command line. |
257 | . | | 257 | . |
258 | .It Sy console=\*[Lt]console name\*[Gt] | | 258 | .It Sy console=\*[Lt]console name\*[Gt] |
259 | .Sy [ amd64 , | | 259 | .Sy [ amd64 , |
260 | .Sy i386 ] | | 260 | .Sy i386 ] |
261 | Set the console device, \*[Lt]console name\*[Gt] must be one of: | | 261 | Set the console device, \*[Lt]console name\*[Gt] must be one of: |
262 | pc, com0, com1, com2, com3, com0kbd, com1kbd, com2kbd or com3kbd. | | 262 | pc, com0, com1, com2, com3, com0kbd, com1kbd, com2kbd or com3kbd. |
263 | . | | 263 | . |
264 | .It Sy ioaddr=\*[Lt]ioaddr\*[Gt] | | 264 | .It Sy ioaddr=\*[Lt]ioaddr\*[Gt] |
265 | .Sy [ amd64 , | | 265 | .Sy [ amd64 , |
266 | .Sy i386 ] | | 266 | .Sy i386 ] |
267 | Set the IO address to be used for the console serial port. | | 267 | Set the IO address to be used for the console serial port. |
268 | Defaults to the IO address used by the system BIOS for the specified port. | | 268 | Defaults to the IO address used by the system BIOS for the specified port. |
269 | . | | 269 | . |
270 | .It Sy keymap=\*[Lt]keymap\*[Gt] | | 270 | .It Sy keymap=\*[Lt]keymap\*[Gt] |
271 | .Sy [ amd64 , | | 271 | .Sy [ amd64 , |
272 | .Sy i386 ] | | 272 | .Sy i386 ] |
273 | Set a boot time keyboard translation map. | | 273 | Set a boot time keyboard translation map. |
274 | Each character in \*[Lt]keymap\*[Gt] will be replaced by the one following it. | | 274 | Each character in \*[Lt]keymap\*[Gt] will be replaced by the one following it. |
275 | For example, an argument of | | 275 | For example, an argument of |
276 | .Dq zyz | | 276 | .Dq zyz |
277 | would swap the lowercase letters | | 277 | would swap the lowercase letters |
278 | .Sq y | | 278 | .Sq y |
279 | and | | 279 | and |
280 | .Sq z . | | 280 | .Sq z . |
281 | . | | 281 | . |
282 | .It Sy modules | | 282 | .It Sy modules |
283 | .Sy [ amd64 , | | 283 | .Sy [ amd64 , |
284 | .Sy i386 ] | | 284 | .Sy i386 ] |
285 | (Don't) load kernel modules. | | 285 | (Don't) load kernel modules. |
286 | . | | 286 | . |
287 | .It Sy password=\*[Lt]password\*[Gt] | | 287 | .It Sy password=\*[Lt]password\*[Gt] |
288 | .Sy [ amd64 , | | 288 | .Sy [ amd64 , |
289 | .Sy i386 ] | | 289 | .Sy i386 ] |
290 | Set the password which must be entered before the boot menu can be accessed. | | 290 | Set the password which must be entered before the boot menu can be accessed. |
291 | . | | 291 | . |
292 | .It Sy resetvideo | | 292 | .It Sy resetvideo |
293 | .Sy [ amd64 , | | 293 | .Sy [ amd64 , |
294 | .Sy i386 ] | | 294 | .Sy i386 ] |
295 | Reset the video before booting. | | 295 | Reset the video before booting. |
296 | . | | 296 | . |
297 | .It Sy speed=\*[Lt]baud rate\*[Gt] | | 297 | .It Sy speed=\*[Lt]baud rate\*[Gt] |
298 | .Sy [ amd64 , | | 298 | .Sy [ amd64 , |
299 | .Sy i386 ] | | 299 | .Sy i386 ] |
300 | Set the baud rate for the serial console. | | 300 | Set the baud rate for the serial console. |
301 | If a value of zero is specified, then the current baud rate (set by the | | 301 | If a value of zero is specified, then the current baud rate (set by the |
302 | BIOS) will be used. | | 302 | BIOS) will be used. |
303 | . | | 303 | . |
304 | .It Sy sunsum | | 304 | .It Sy sunsum |
305 | .Sy [ alpha , | | 305 | .Sy [ alpha , |
306 | .Sy pmax , | | 306 | .Sy pmax , |
307 | .Sy vax ] | | 307 | .Sy vax ] |
308 | Recalculate and restore the Sun and | | 308 | Recalculate and restore the Sun and |
309 | .Nx Ns Tn /sparc | | 309 | .Nx Ns Tn /sparc |
310 | compatible checksum. | | 310 | compatible checksum. |
311 | .Em Note : | | 311 | .Em Note : |
312 | The existing | | 312 | The existing |
313 | .Nx Ns Tn /sparc | | 313 | .Nx Ns Tn /sparc |
314 | disklabel should use no more than 4 partitions. | | 314 | disklabel should use no more than 4 partitions. |
315 | . | | 315 | . |
316 | .It Sy timeout=\*[Lt]seconds\*[Gt] | | 316 | .It Sy timeout=\*[Lt]seconds\*[Gt] |
317 | .Sy [ amd64 , | | 317 | .Sy [ amd64 , |
318 | .Sy i386 ] | | 318 | .Sy i386 ] |
319 | Set the timeout before the automatic boot begins to the given number of seconds. | | 319 | Set the timeout before the automatic boot begins to the given number of seconds. |
320 | .El | | 320 | .El |
321 | . | | 321 | . |
322 | .It Fl t Ar fstype | | 322 | .It Fl t Ar fstype |
323 | Use | | 323 | Use |
324 | .Ar fstype | | 324 | .Ar fstype |
325 | as the type of | | 325 | as the type of |
326 | .Ar filesystem . | | 326 | .Ar filesystem . |
327 | The default operation is to attempt to auto-detect this setting. | | 327 | The default operation is to attempt to auto-detect this setting. |
328 | The following file system types are currently supported by | | 328 | The following file system types are currently supported by |
329 | .Nm : | | 329 | .Nm : |
330 | . | | 330 | . |
331 | .Bl -tag -offset indent -width raid | | 331 | .Bl -tag -offset indent -width raid |
332 | . | | 332 | . |
333 | .It Sy ffs | | 333 | .It Sy ffs |
334 | .Bx | | 334 | .Bx |
335 | Fast File System. | | 335 | Fast File System. |
336 | . | | 336 | . |
337 | .It Sy raid | | 337 | .It Sy raid |
338 | Mirrored RAIDframe File System. | | 338 | Mirrored RAIDframe File System. |
339 | . | | 339 | . |
340 | .It Sy raw | | 340 | .It Sy raw |
341 | .Sq Raw | | 341 | .Sq Raw |
342 | image. | | 342 | image. |
343 | Note: if a platform needs to hard-code the block offset of the secondary | | 343 | Note: if a platform needs to hard-code the block offset of the secondary |
344 | bootstrap, it cannot be searched for on this file system type, and must | | 344 | bootstrap, it cannot be searched for on this file system type, and must |
345 | be provided with | | 345 | be provided with |
346 | .Fl B Ar s2bno . | | 346 | .Fl B Ar s2bno . |
347 | .El | | 347 | .El |
348 | . | | 348 | . |
349 | .It Fl v | | 349 | .It Fl v |
350 | Verbose operation. | | 350 | Verbose operation. |
351 | . | | 351 | . |
352 | .It Ar filesystem | | 352 | .It Ar filesystem |
353 | The path name of the device or file system image that | | 353 | The path name of the device or file system image that |
354 | .Nm | | 354 | .Nm |
355 | is to operate on. | | 355 | is to operate on. |
356 | It is not necessary for | | 356 | It is not necessary for |
357 | .Ar filesystem | | 357 | .Ar filesystem |
358 | to be a currently mounted file system. | | 358 | to be a currently mounted file system. |
359 | . | | 359 | . |
360 | .It Ar primary | | 360 | .It Ar primary |
361 | The path name of the | | 361 | The path name of the |
362 | .Dq primary | | 362 | .Dq primary |
363 | boot block to install. | | 363 | boot block to install. |
364 | The path name must refer to a file in a file system that is currently | | 364 | The path name must refer to a file in a file system that is currently |
365 | mounted. | | 365 | mounted. |
366 | . | | 366 | . |
367 | .It Ar secondary | | 367 | .It Ar secondary |
368 | The path name of the | | 368 | The path name of the |
369 | .Dq secondary | | 369 | .Dq secondary |
370 | boot block, relative to the root of | | 370 | boot block, relative to the root of |
371 | the file system in the device or image specified by the | | 371 | the file system in the device or image specified by the |
372 | .Ar filesystem | | 372 | .Ar filesystem |
373 | argument. | | 373 | argument. |
374 | Note that this may refer to a file in a file system that is not mounted. | | 374 | Note that this may refer to a file in a file system that is not mounted. |
375 | Most systems require | | 375 | Most systems require |
376 | .Ar secondary | | 376 | .Ar secondary |
377 | to be in the | | 377 | to be in the |
378 | .Dq root | | 378 | .Dq root |
379 | directory of the file system, so the leading | | 379 | directory of the file system, so the leading |
380 | .Dq Pa / | | 380 | .Dq Pa / |
381 | is not necessary on | | 381 | is not necessary on |
382 | .Ar secondary . | | 382 | .Ar secondary . |
383 | .Pp | | 383 | .Pp |
384 | Only certain combinations of | | 384 | Only certain combinations of |
385 | platform | | 385 | platform |
386 | .Pq Fl m Ar machine | | 386 | .Pq Fl m Ar machine |
387 | and file system type | | 387 | and file system type |
388 | .Pq Fl t Ar fstype | | 388 | .Pq Fl t Ar fstype |
389 | require that the name of the secondary bootstrap is | | 389 | require that the name of the secondary bootstrap is |
390 | supplied as | | 390 | supplied as |
391 | .Ar secondary , | | 391 | .Ar secondary , |
392 | so that information such as the disk block numbers occupied | | 392 | so that information such as the disk block numbers occupied |
393 | by the secondary bootstrap can be stored in the primary bootstrap. | | 393 | by the secondary bootstrap can be stored in the primary bootstrap. |
394 | These are: | | 394 | These are: |
395 | .Bl -column "Platform" "File systems" -offset indent | | 395 | .Bl -column "Platform" "File systems" -offset indent |
396 | .It Sy "Platform" Ta Sy "File systems" | | 396 | .It Sy "Platform" Ta Sy "File systems" |
397 | .It macppc Ta ffs, raw | | 397 | .It macppc Ta ffs, raw |
398 | .It news68k Ta ffs, raw | | 398 | .It news68k Ta ffs, raw |
399 | .It newsmips Ta ffs, raw | | 399 | .It newsmips Ta ffs, raw |
400 | .It sparc Ta ffs, raid, raw | | 400 | .It sparc Ta ffs, raid, raw |
401 | .It sun2 Ta ffs, raw | | 401 | .It sun2 Ta ffs, raw |
402 | .It sun3 Ta ffs, raw | | 402 | .It sun3 Ta ffs, raw |
403 | .El | | 403 | .El |
404 | .El | | 404 | .El |
405 | .Pp | | 405 | .Pp |
406 | .Nm | | 406 | .Nm |
407 | exits 0 on success, and \*[Gt]0 if an error occurs. | | 407 | exits 0 on success, and \*[Gt]0 if an error occurs. |
408 | . | | 408 | . |
409 | .Sh ENVIRONMENT | | 409 | .Sh ENVIRONMENT |
410 | .Nm | | 410 | .Nm |
411 | uses the following environment variables: | | 411 | uses the following environment variables: |
412 | . | | 412 | . |
413 | .Bl -tag -width "MACHINE" | | 413 | .Bl -tag -width "MACHINE" |
414 | . | | 414 | . |
415 | .It Ev MACHINE | | 415 | .It Ev MACHINE |
416 | Default value for | | 416 | Default value for |
417 | .Ar machine , | | 417 | .Ar machine , |
418 | overriding the result from | | 418 | overriding the result from |
419 | .Xr uname 3 . | | 419 | .Xr uname 3 . |
420 | . | | 420 | . |
421 | .El | | 421 | .El |
422 | . | | 422 | . |
423 | .Sh FILES | | 423 | .Sh FILES |
424 | Most | | 424 | Most |
425 | .Nx | | 425 | .Nx |
426 | ports will contain variations of the following files: | | 426 | ports will contain variations of the following files: |
427 | .Pp | | 427 | .Pp |
428 | .Bl -tag -width /usr/mdec/bootxx_ustarfs | | 428 | .Bl -tag -width /usr/mdec/bootxx_ustarfs |
429 | . | | 429 | . |
430 | .It Pa /usr/mdec/bootxx_ Ns Sy FSTYPE | | 430 | .It Pa /usr/mdec/bootxx_ Ns Sy FSTYPE |
431 | Primary bootstrap for file system type | | 431 | Primary bootstrap for file system type |
432 | .Sy FSTYPE . | | 432 | .Sy FSTYPE . |
433 | Installed into the bootstrap area of the file system by | | 433 | Installed into the bootstrap area of the file system by |
434 | .Nm . | | 434 | .Nm . |
435 | . | | 435 | . |
436 | .It Pa /usr/mdec/bootxx_fat16 | | 436 | .It Pa /usr/mdec/bootxx_fat16 |
437 | Primary bootstrap for | | 437 | Primary bootstrap for |
438 | .Tn MS-DOS | | 438 | .Tn MS-DOS |
439 | .Sy FAT16 | | 439 | .Sy FAT16 |
440 | file systems. | | 440 | file systems. |
441 | This differs from | | 441 | This differs from |
442 | .Nm bootxx_msdos | | 442 | .Nm bootxx_msdos |
443 | in that it doesn't require the filesystem to have been initialised with | | 443 | in that it doesn't require the filesystem to have been initialised with |
444 | any | | 444 | any |
445 | .Ql reserved sectors . | | 445 | .Ql reserved sectors . |
446 | It also uses the information in the | | 446 | It also uses the information in the |
447 | .Ql Boot Parameter Block | | 447 | .Ql Boot Parameter Block |
448 | to get the media and filesytem properties. | | 448 | to get the media and filesytem properties. |
449 | . | | 449 | . |
450 | .It Pa /usr/mdec/bootxx_ffsv1 | | 450 | .It Pa /usr/mdec/bootxx_ffsv1 |
451 | Primary bootstrap for | | 451 | Primary bootstrap for |
452 | .Sy FFSv1 | | 452 | .Sy FFSv1 |
453 | file systems | | 453 | file systems |
454 | (the "traditional" | | 454 | (the "traditional" |
455 | .Nx | | 455 | .Nx |
456 | file system). | | 456 | file system). |
457 | Use | | 457 | Use |
458 | .Xr dumpfs 8 | | 458 | .Xr dumpfs 8 |
459 | to confirm the file system format is | | 459 | to confirm the file system format is |
460 | .Sy FFSv1 . | | 460 | .Sy FFSv1 . |
461 | . | | 461 | . |
462 | .It Pa /usr/mdec/bootxx_ffsv2 | | 462 | .It Pa /usr/mdec/bootxx_ffsv2 |
463 | Primary bootstrap for | | 463 | Primary bootstrap for |
464 | .Sy FFSv2 | | 464 | .Sy FFSv2 |
465 | file systems. | | 465 | file systems. |
466 | Use | | 466 | Use |
467 | .Xr dumpfs 8 | | 467 | .Xr dumpfs 8 |
468 | to confirm the file system format is | | 468 | to confirm the file system format is |
469 | .Sy FFSv2 . | | 469 | .Sy FFSv2 . |
470 | . | | 470 | . |
471 | .It Pa /usr/mdec/bootxx_lfsv1 | | 471 | .It Pa /usr/mdec/bootxx_lfsv1 |
472 | Primary bootstrap for | | 472 | Primary bootstrap for |
473 | .Sy LFSv1 | | 473 | .Sy LFSv1 |
474 | file systems. | | 474 | file systems. |
475 | . | | 475 | . |
476 | .It Pa /usr/mdec/bootxx_lfsv2 | | 476 | .It Pa /usr/mdec/bootxx_lfsv2 |
477 | Primary bootstrap for | | 477 | Primary bootstrap for |
478 | .Sy LFSv2 | | 478 | .Sy LFSv2 |
479 | file systems | | 479 | file systems |
480 | (the default LFS version). | | 480 | (the default LFS version). |
481 | . | | 481 | . |
482 | .It Pa /usr/mdec/bootxx_msdos | | 482 | .It Pa /usr/mdec/bootxx_msdos |
483 | Primary bootstrap for | | 483 | Primary bootstrap for |
484 | .Tn MS-DOS | | 484 | .Tn MS-DOS |
485 | .Sy FAT | | 485 | .Sy FAT |
486 | file systems. | | 486 | file systems. |
487 | . | | 487 | . |
488 | .It Pa /usr/mdec/bootxx_ustarfs | | 488 | .It Pa /usr/mdec/bootxx_ustarfs |
489 | Primary bootstrap for | | 489 | Primary bootstrap for |
490 | .Sy TARFS | | 490 | .Sy TARFS |
491 | boot images. | | 491 | boot images. |
492 | This is used by various install media. | | 492 | This is used by various install media. |
493 | . | | 493 | . |
494 | .It Pa /usr/mdec/boot. Ns Sy MACHINE | | 494 | .It Pa /usr/mdec/boot. Ns Sy MACHINE |
495 | Secondary bootstrap for machine type | | 495 | Secondary bootstrap for machine type |
496 | .Sy MACHINE . | | 496 | .Sy MACHINE . |
497 | This should be installed into the file system before | | 497 | This should be installed into the file system before |
498 | .Nm | | 498 | .Nm |
499 | is run. | | 499 | is run. |
500 | . | | 500 | . |
501 | .It Pa /usr/mdec/boot | | 501 | .It Pa /usr/mdec/boot |
502 | Synonym for | | 502 | Synonym for |
503 | .Pa /usr/mdec/boot. Ns Sy MACHINE | | 503 | .Pa /usr/mdec/boot. Ns Sy MACHINE |
504 | . | | 504 | . |
505 | .It Pa /boot. Ns Sy MACHINE | | 505 | .It Pa /boot. Ns Sy MACHINE |
506 | Installed copy of secondary bootstrap for machine type | | 506 | Installed copy of secondary bootstrap for machine type |
507 | .Sy MACHINE . | | 507 | .Sy MACHINE . |
508 | . | | 508 | . |
509 | .It Pa /boot | | 509 | .It Pa /boot |
510 | Installed copy of secondary bootstrap. | | 510 | Installed copy of secondary bootstrap. |
511 | Searched for by the primary bootstrap if | | 511 | Searched for by the primary bootstrap if |
512 | .Pa /boot. Ns Sy MACHINE | | 512 | .Pa /boot. Ns Sy MACHINE |
513 | is not found. | | 513 | is not found. |
514 | . | | 514 | . |
515 | .El | | 515 | .El |
516 | . | | 516 | . |
517 | .Ss Nx Ns Tn /macppc files | | 517 | .Ss Nx Ns Tn /macppc files |
518 | . | | 518 | . |
519 | .Bl -tag -width /usr/mdec/bootxx_ustarfs | | 519 | .Bl -tag -width /usr/mdec/bootxx_ustarfs |
520 | . | | 520 | . |
521 | .It Pa /usr/mdec/bootxx | | 521 | .It Pa /usr/mdec/bootxx |
522 | .Nx Ns Tn /macppc | | 522 | .Nx Ns Tn /macppc |
523 | primary bootstrap. | | 523 | primary bootstrap. |
524 | . | | 524 | . |
525 | .It Pa /usr/mdec/ofwboot | | 525 | .It Pa /usr/mdec/ofwboot |
526 | .Nx Ns Tn /macppc | | 526 | .Nx Ns Tn /macppc |
527 | secondary bootstrap. | | 527 | secondary bootstrap. |
528 | . | | 528 | . |
529 | .It Pa /ofwboot | | 529 | .It Pa /ofwboot |
530 | Installed copy of | | 530 | Installed copy of |
531 | .Nx Ns Tn /macppc | | 531 | .Nx Ns Tn /macppc |
532 | secondary bootstrap. | | 532 | secondary bootstrap. |
533 | . | | 533 | . |
534 | .El | | 534 | .El |
535 | . | | 535 | . |
536 | .Ss Nx Ns Tn /next68k files | | 536 | .Ss Nx Ns Tn /next68k files |
537 | . | | 537 | . |
538 | .Bl -tag -width /usr/mdec/bootxx_ustarfs | | 538 | .Bl -tag -width /usr/mdec/bootxx_ustarfs |
539 | . | | 539 | . |
540 | .It Pa /usr/mdec/boot | | 540 | .It Pa /usr/mdec/boot |
541 | .Nx Ns Tn /next68k | | 541 | .Nx Ns Tn /next68k |
542 | bootstrap. | | 542 | bootstrap. |
543 | . | | 543 | . |
544 | .El | | 544 | .El |
545 | . | | 545 | . |
546 | .Ss Nx Ns Tn /sparc64 files | | 546 | .Ss Nx Ns Tn /sparc64 files |
547 | . | | 547 | . |
548 | .Bl -tag -width /usr/mdec/bootxx_ustarfs | | 548 | .Bl -tag -width /usr/mdec/bootxx_ustarfs |
549 | . | | 549 | . |
550 | .It Pa /usr/mdec/bootblk | | 550 | .It Pa /usr/mdec/bootblk |
551 | .Nx Ns Tn /sparc64 | | 551 | .Nx Ns Tn /sparc64 |
552 | primary bootstrap. | | 552 | primary bootstrap. |
553 | . | | 553 | . |
554 | .It Pa /usr/mdec/ofwboot | | 554 | .It Pa /usr/mdec/ofwboot |
555 | .Nx Ns Tn /sparc64 | | 555 | .Nx Ns Tn /sparc64 |
556 | secondary bootstrap. | | 556 | secondary bootstrap. |
557 | . | | 557 | . |
558 | .It Pa /ofwboot | | 558 | .It Pa /ofwboot |
559 | Installed copy of | | 559 | Installed copy of |
560 | .Nx Ns Tn /sparc64 | | 560 | .Nx Ns Tn /sparc64 |
561 | secondary bootstrap. | | 561 | secondary bootstrap. |
562 | . | | 562 | . |
563 | .El | | 563 | .El |
564 | . | | 564 | . |
565 | .Sh EXAMPLES | | 565 | .Sh EXAMPLES |
566 | . | | 566 | . |
567 | .Ss common | | 567 | .Ss common |
568 | Verbosely install the Berkeley Fast File System primary bootstrap on to disk | | 568 | Verbosely install the Berkeley Fast File System primary bootstrap on to disk |
569 | .Sq sd0 : | | 569 | .Sq sd0 : |
570 | .Dl Ic installboot -v /dev/rsd0c /usr/mdec/bootxx_ffs | | 570 | .Dl Ic installboot -v /dev/rsd0c /usr/mdec/bootxx_ffs |
571 | Note: the | | 571 | Note: the |
572 | .Dq whole disk | | 572 | .Dq whole disk |
573 | partition (c on some ports, d on others) is used here, since the a partition | | 573 | partition (c on some ports, d on others) is used here, since the a partition |
574 | probably is already opened (mounted as | | 574 | probably is already opened (mounted as |
575 | .Pa / ) , | | 575 | .Pa / ) , |
576 | so | | 576 | so |
577 | .Nm | | 577 | .Nm |
578 | would not be able to access it. | | 578 | would not be able to access it. |
579 | .Pp | | 579 | .Pp |
580 | Remove the primary bootstrap from disk | | 580 | Remove the primary bootstrap from disk |
581 | .Sq sd1 : | | 581 | .Sq sd1 : |
582 | .Dl Ic installboot -c /dev/rsd1c | | 582 | .Dl Ic installboot -c /dev/rsd1c |
583 | . | | 583 | . |
584 | .Ss Nx Ns Tn /amiga | | 584 | .Ss Nx Ns Tn /amiga |
585 | Modify the command line to change the default from "netbsd -ASn2" to | | 585 | Modify the command line to change the default from "netbsd -ASn2" to |
586 | "netbsd -S": | | 586 | "netbsd -S": |
587 | .Dl Ic installboot -m amiga -o command="netbsd -S" /dev/rsd0a /usr/mdec/bootxx_ffs | | 587 | .Dl Ic installboot -m amiga -o command="netbsd -S" /dev/rsd0a /usr/mdec/bootxx_ffs |
588 | . | | 588 | . |
589 | .Ss Nx Ns Tn /ews4800mips | | 589 | .Ss Nx Ns Tn /ews4800mips |
590 | Install the System V Boot File System primary bootstrap on to disk | | 590 | Install the System V Boot File System primary bootstrap on to disk |
591 | .Sq sd0 , | | 591 | .Sq sd0 , |
592 | with the secondary bootstrap | | 592 | with the secondary bootstrap |
593 | .Sq Pa /boot | | 593 | .Sq Pa /boot |
594 | already present in the SysVBFS partition on the disk: | | 594 | already present in the SysVBFS partition on the disk: |
595 | .Dl Ic installboot /dev/rsd0c /usr/mdec/bootxx_bfs | | 595 | .Dl Ic installboot /dev/rsd0c /usr/mdec/bootxx_bfs |
596 | . | | 596 | . |
597 | .Ss Nx Ns Tn /i386 and Nx Ns Tn /amd64 | | 597 | .Ss Nx Ns Tn /i386 and Nx Ns Tn /amd64 |
598 | Install new boot blocks on an existing mounted root file system on | | 598 | Install new boot blocks on an existing mounted root file system on |
599 | .Sq wd0 , | | 599 | .Sq wd0 , |
600 | setting the timeout to five seconds, after copying a new secondary | | 600 | setting the timeout to five seconds, after copying a new secondary |
601 | bootstrap: | | 601 | bootstrap: |
602 | .Dl Ic cp /usr/mdec/boot /boot | | 602 | .Dl Ic cp /usr/mdec/boot /boot |
603 | .Dl Ic installboot -v -o timeout=5 /dev/rwd0a /usr/mdec/bootxx_ffsv1 | | 603 | .Dl Ic installboot -v -o timeout=5 /dev/rwd0a /usr/mdec/bootxx_ffsv1 |
604 | . | | 604 | . |
605 | .Pp | | 605 | .Pp |
606 | Create a bootable CD-ROM with an ISO9660 | | 606 | Create a bootable CD-ROM with an ISO9660 |
607 | file system for an i386 system with a serial console: | | 607 | file system for an i386 system with a serial console: |
608 | .Dl Ic mkdir cdrom | | 608 | .Dl Ic mkdir cdrom |
609 | .Dl Ic cp sys/arch/i386/compile/mykernel/netbsd cdrom/netbsd | | 609 | .Dl Ic cp sys/arch/i386/compile/mykernel/netbsd cdrom/netbsd |
610 | .Dl Ic cp /usr/mdec/boot cdrom/boot | | 610 | .Dl Ic cp /usr/mdec/boot cdrom/boot |
611 | .Dl Ic cp /usr/mdec/bootxx_cd9660 bootxx | | 611 | .Dl Ic cp /usr/mdec/bootxx_cd9660 bootxx |
612 | .Dl Ic installboot -o console=com0,speed=19200 -m i386 -e bootxx | | 612 | .Dl Ic installboot -o console=com0,speed=19200 -m i386 -e bootxx |
613 | .Dl Ic makefs -t cd9660 -o 'bootimage=i386;bootxx,no-emul-boot' boot.iso \ | | 613 | .Dl Ic makefs -t cd9660 -o 'bootimage=i386;bootxx,no-emul-boot' boot.iso \ |
614 | cdrom | | 614 | cdrom |
615 | . | | 615 | . |
616 | .Pp | | 616 | .Pp |
617 | Create a bootable floppy disk with an FFSv1 | | 617 | Create a bootable floppy disk with an FFSv1 |
618 | file system for a small custom kernel (note: bigger kernels needing | | 618 | file system for a small custom kernel (note: bigger kernels needing |
619 | multiple disks are handled with the ustarfs file system): | | 619 | multiple disks are handled with the ustarfs file system): |
620 | .Dl Ic newfs -s 1440k /dev/rfd0a | | 620 | .Dl Ic newfs -s 1440k /dev/rfd0a |
621 | .Bd -ragged -offset indent-two -compact | | 621 | .Bd -ragged -offset indent-two -compact |
622 | .Em Note : | | 622 | .Em Note : |
623 | Ignore the warnings that | | 623 | Ignore the warnings that |
624 | .Xr newfs 8 | | 624 | .Xr newfs 8 |
625 | displays; it can not write a disklabel, | | 625 | displays; it can not write a disklabel, |
626 | which is not a problem for a floppy disk. | | 626 | which is not a problem for a floppy disk. |
627 | .Ed | | 627 | .Ed |
628 | .Dl Ic mount /dev/fd0a /mnt | | 628 | .Dl Ic mount /dev/fd0a /mnt |
629 | .Dl Ic cp /usr/mdec/boot /mnt/boot | | 629 | .Dl Ic cp /usr/mdec/boot /mnt/boot |
630 | .Dl Ic gzip -9 \*[Lt] sys/arch/i386/compile/mykernel/netbsd \*[Gt] /mnt/netbsd.gz | | 630 | .Dl Ic gzip -9 \*[Lt] sys/arch/i386/compile/mykernel/netbsd \*[Gt] /mnt/netbsd.gz |
631 | .Dl Ic umount /mnt | | 631 | .Dl Ic umount /mnt |
632 | .Dl Ic installboot -v /dev/rfd0a /usr/mdec/bootxx_ffsv1 | | 632 | .Dl Ic installboot -v /dev/rfd0a /usr/mdec/bootxx_ffsv1 |
633 | . | | 633 | . |
634 | .Pp | | 634 | .Pp |
635 | Create a bootable FAT file system on | | 635 | Create a bootable FAT file system on |
636 | .Sq wd1a , | | 636 | .Sq wd1a , |
637 | which should have the same offset and size as a FAT primary partition | | 637 | which should have the same offset and size as a FAT primary partition |
638 | in the Master Boot Record (MBR): | | 638 | in the Master Boot Record (MBR): |
639 | .Dl Ic newfs_msdos -r 16 /dev/rwd1a | | 639 | .Dl Ic newfs_msdos -r 16 /dev/rwd1a |
640 | .Bd -ragged -offset indent-two -compact | | 640 | .Bd -ragged -offset indent-two -compact |
641 | .Em Notes : | | 641 | .Em Notes : |
642 | The | | 642 | The |
643 | .Fl r Ar 16 | | 643 | .Fl r Ar 16 |
644 | is to reserve space for the primary bootstrap. | | 644 | is to reserve space for the primary bootstrap. |
645 | .Xr newfs_msdos 8 | | 645 | .Xr newfs_msdos 8 |
646 | will display an | | 646 | will display an |
647 | .Dq MBR type | | 647 | .Dq MBR type |
648 | such as | | 648 | such as |
649 | .Ql 1 , | | 649 | .Ql 1 , |
650 | .Ql 4 , | | 650 | .Ql 4 , |
651 | or | | 651 | or |
652 | .Ql 6 ; | | 652 | .Ql 6 ; |
653 | the MBR partition type of the appropriate primary partition should be | | 653 | the MBR partition type of the appropriate primary partition should be |
654 | changed to this value. | | 654 | changed to this value. |
655 | .Ed | | 655 | .Ed |
656 | .Dl Ic mount -t msdos /dev/wd1a /mnt | | 656 | .Dl Ic mount -t msdos /dev/wd1a /mnt |
657 | .Dl Ic cp /usr/mdec/boot /mnt/boot | | 657 | .Dl Ic cp /usr/mdec/boot /mnt/boot |
658 | .Dl Ic cp path/to/kernel /mnt/netbsd | | 658 | .Dl Ic cp path/to/kernel /mnt/netbsd |
659 | .Dl Ic umount /mnt | | 659 | .Dl Ic umount /mnt |
660 | .Dl Ic installboot -t raw /dev/rwd1a /usr/mdec/bootxx_msdos | | 660 | .Dl Ic installboot -t raw /dev/rwd1a /usr/mdec/bootxx_msdos |
661 | .Pp | | 661 | .Pp |
662 | Make the existing FAT16 filesystem on | | 662 | Make the existing FAT16 filesystem on |
663 | .Sq sd0e | | 663 | .Sq sd0e |
664 | bootable. | | 664 | bootable. |
665 | This can be used to make USB memory bootable provided it has 512 byte | | 665 | This can be used to make USB memory bootable provided it has 512 byte |
666 | sectors and that the manufacturer correctly initialised the file system. | | 666 | sectors and that the manufacturer correctly initialised the file system. |
667 | .Dl Ic mount -t msdos /dev/sd0e /mnt | | 667 | .Dl Ic mount -t msdos /dev/sd0e /mnt |
668 | .Dl Ic cp /usr/mdec/boot /mnt/boot | | 668 | .Dl Ic cp /usr/mdec/boot /mnt/boot |
669 | .Dl Ic cp path/to/kernel /mnt/netbsd | | 669 | .Dl Ic cp path/to/kernel /mnt/netbsd |
670 | .Dl Ic umount /mnt | | 670 | .Dl Ic umount /mnt |
671 | .Dl Ic installboot /dev/rsd0e /usr/mdec/bootxx_fat16 | | 671 | .Dl Ic installboot /dev/rsd0e /usr/mdec/bootxx_fat16 |
672 | It may also be necessary to use | | 672 | It may also be necessary to use |
673 | .Nm fdisk | | 673 | .Nm fdisk |
674 | to make the device itself bootable. | | 674 | to make the device itself bootable. |
675 | . | | 675 | . |
676 | .Pp | | 676 | .Pp |
677 | Switch the existing installed bootstrap to use a serial console without | | 677 | Switch the existing installed bootstrap to use a serial console without |
678 | reinstalling or altering other options such as timeout. | | 678 | reinstalling or altering other options such as timeout. |
679 | .Dl Ic installboot -e -o console=com0 /dev/rwd0a | | 679 | .Dl Ic installboot -e -o console=com0 /dev/rwd0a |
680 | .Ss Nx Ns Tn /macppc | | 680 | .Ss Nx Ns Tn /macppc |
681 | Note the | | 681 | Note the |
682 | .Nm | | 682 | .Nm |
683 | utility is only required for macppc machines with OpenFirmware version 2 | | 683 | utility is only required for macppc machines with OpenFirmware version 2 |
684 | to boot. | | 684 | to boot. |
685 | OpenFirmware 3 cannot load bootblocks specified in the Apple partition | | 685 | OpenFirmware 3 cannot load bootblocks specified in the Apple partition |
686 | map. | | 686 | map. |
687 | .Pp | | 687 | .Pp |
688 | Install the Berkeley Fast File System primary bootstrap on to disk | | 688 | Install the Berkeley Fast File System primary bootstrap on to disk |
689 | .Sq wd0 : | | 689 | .Sq wd0 : |
690 | .Dl Ic installboot /dev/rwd0c /usr/mdec/bootxx /ofwboot | | 690 | .Dl Ic installboot /dev/rwd0c /usr/mdec/bootxx /ofwboot |
691 | .Pp | | 691 | .Pp |
692 | The secondary | | 692 | The secondary |
693 | .Nx Ns Tn /macppc | | 693 | .Nx Ns Tn /macppc |
694 | bootstrap is located in | | 694 | bootstrap is located in |
695 | .Pa /usr/mdec/ofwboot . | | 695 | .Pa /usr/mdec/ofwboot . |
696 | .Pp | | 696 | .Pp |
697 | The primary bootstrap requires the raw | | 697 | The primary bootstrap requires the raw |
698 | .Pa ofwboot | | 698 | .Pa ofwboot |
699 | for the secondary bootstrap, not | | 699 | for the secondary bootstrap, not |
700 | .Pa ofwboot.xcf , | | 700 | .Pa ofwboot.xcf , |
701 | which is used for the OpenFirmware to load kernels. | | 701 | which is used for the OpenFirmware to load kernels. |
702 | .Ss Nx Ns Tn /next68k | | 702 | .Ss Nx Ns Tn /next68k |
703 | Install the bootstrap on to disk | | 703 | Install the bootstrap on to disk |
704 | .Sq sd0 : | | 704 | .Sq sd0 : |
705 | .Dl Ic installboot /dev/rsd0c /usr/mdec/boot | | 705 | .Dl Ic installboot /dev/rsd0c /usr/mdec/boot |
706 | .Pp | | 706 | .Pp |
707 | . | | 707 | . |
708 | .Ss Nx Ns Tn /pmax | | 708 | .Ss Nx Ns Tn /pmax |
709 | Install the Berkeley Fast File System primary bootstrap on to disk | | 709 | Install the Berkeley Fast File System primary bootstrap on to disk |
710 | .Sq sd0 : | | 710 | .Sq sd0 : |
711 | .Dl Ic installboot /dev/rsd0c /usr/mdec/bootxx_ffs | | 711 | .Dl Ic installboot /dev/rsd0c /usr/mdec/bootxx_ffs |
712 | .Pp | | 712 | .Pp |
713 | .Nx Ns Tn /pmax | | 713 | .Nx Ns Tn /pmax |
714 | requires that this file system starts at block 0 of the disk. | | 714 | requires that this file system starts at block 0 of the disk. |
715 | .Pp | | 715 | .Pp |
716 | Install the ISO 9660 primary bootstrap in the file | | 716 | Install the ISO 9660 primary bootstrap in the file |
717 | .Pa /tmp/cd-image : | | 717 | .Pa /tmp/cd-image : |
718 | .Dl Ic installboot -m pmax /tmp/cd-image /usr/mdec/bootxx_cd9660 | | 718 | .Dl Ic installboot -m pmax /tmp/cd-image /usr/mdec/bootxx_cd9660 |
719 | .Pp | | 719 | .Pp |
720 | Make an ISO 9660 filesystem in the file | | 720 | Make an ISO 9660 filesystem in the file |
721 | .Pa /tmp/cd-image | | 721 | .Pa /tmp/cd-image |
722 | and install the ISO 9660 primary bootstrap in the filesystem, where the | | 722 | and install the ISO 9660 primary bootstrap in the filesystem, where the |
723 | source directory for the ISO 9660 filesystem contains a kernel, the | | 723 | source directory for the ISO 9660 filesystem contains a kernel, the |
724 | primary bootstrap | | 724 | primary bootstrap |
725 | .Pa bootxx_cd9660 | | 725 | .Pa bootxx_cd9660 |
726 | and the secondary bootstrap | | 726 | and the secondary bootstrap |
727 | .Pa boot.pmax : | | 727 | .Pa boot.pmax : |
728 | .Dl Ic mkisofs -o /tmp/cd-image -a -l -v iso-source-dir | | 728 | .Dl Ic mkisofs -o /tmp/cd-image -a -l -v iso-source-dir |
729 | .Dl ... | | 729 | .Dl ... |
730 | .Dl 48 51 iso-source-dir/bootxx_cd9660 | | 730 | .Dl 48 51 iso-source-dir/bootxx_cd9660 |
731 | .Dl ... | | 731 | .Dl ... |
732 | .Dl Ic installboot -b `expr 48 \e* 4` /tmp/cd-image /usr/mdec/bootxx_cd9660 | | 732 | .Dl Ic installboot -b `expr 48 \e* 4` /tmp/cd-image /usr/mdec/bootxx_cd9660 |
733 | . | | 733 | . |
734 | .Ss Nx Ns Tn /sparc | | 734 | .Ss Nx Ns Tn /sparc |
735 | Install the Berkeley Fast File System primary bootstrap on to disk | | 735 | Install the Berkeley Fast File System primary bootstrap on to disk |
736 | .Sq sd0 , | | 736 | .Sq sd0 , |
737 | with the secondary bootstrap | | 737 | with the secondary bootstrap |
738 | .Sq Pa /boot | | 738 | .Sq Pa /boot |
739 | already present: | | 739 | already present: |
740 | .Dl Ic installboot /dev/rsd0c /usr/mdec/bootxx /boot | | 740 | .Dl Ic installboot /dev/rsd0c /usr/mdec/bootxx /boot |
741 | . | | 741 | . |
742 | .Ss Nx Ns Tn /sparc64 | | 742 | .Ss Nx Ns Tn /sparc64 |
743 | Install the Berkeley Fast File System primary bootstrap on to disk | | 743 | Install the Berkeley Fast File System primary bootstrap on to disk |
744 | .Sq wd0 : | | 744 | .Sq wd0 : |
745 | .Dl Ic installboot /dev/rwd0c /usr/mdec/bootblk | | 745 | .Dl Ic installboot /dev/rsd0c /usr/mdec/bootblk |
746 | .Pp | | 746 | .Pp |
747 | The secondary | | 747 | The secondary |
748 | .Nx Ns Tn /sparc64 | | 748 | .Nx Ns Tn /sparc64 |
749 | bootstrap is located in | | 749 | bootstrap is located in |
750 | .Pa /usr/mdec/ofwboot . | | 750 | .Pa /usr/mdec/ofwboot . |
751 | . | | 751 | . |
752 | .Ss Nx Ns Tn /sun2 and Nx Ns Tn /sun3 | | 752 | .Ss Nx Ns Tn /sun2 and Nx Ns Tn /sun3 |
753 | Install the Berkeley Fast File System primary bootstrap on to disk | | 753 | Install the Berkeley Fast File System primary bootstrap on to disk |
754 | .Sq sd0 , | | 754 | .Sq sd0 , |
755 | with the secondary bootstrap | | 755 | with the secondary bootstrap |
756 | .Sq Pa /boot | | 756 | .Sq Pa /boot |
757 | already present: | | 757 | already present: |
758 | .Dl Ic installboot /dev/rsd0c /usr/mdec/bootxx /boot | | 758 | .Dl Ic installboot /dev/rsd0c /usr/mdec/bootxx /boot |
759 | . | | 759 | . |
760 | .Sh SEE ALSO | | 760 | .Sh SEE ALSO |
761 | .Xr uname 3 , | | 761 | .Xr uname 3 , |
762 | .Xr boot 8 , | | 762 | .Xr boot 8 , |
763 | .Xr disklabel 8 , | | 763 | .Xr disklabel 8 , |
764 | .Xr dumpfs 8 , | | 764 | .Xr dumpfs 8 , |
765 | .Xr fdisk 8 , | | 765 | .Xr fdisk 8 , |
766 | .Xr pxeboot 8 | | 766 | .Xr pxeboot 8 |
767 | . | | 767 | . |
768 | .Sh HISTORY | | 768 | .Sh HISTORY |
769 | This implementation of | | 769 | This implementation of |
770 | .Nm | | 770 | .Nm |
771 | appeared in | | 771 | appeared in |
772 | .Nx 1.6 . | | 772 | .Nx 1.6 . |
773 | . | | 773 | . |
774 | .Sh AUTHORS | | 774 | .Sh AUTHORS |
775 | The machine independent portion of this implementation of | | 775 | The machine independent portion of this implementation of |
776 | .Nm | | 776 | .Nm |
777 | was written by Luke Mewburn. | | 777 | was written by Luke Mewburn. |
778 | The following people contributed to the various machine dependent | | 778 | The following people contributed to the various machine dependent |
779 | back-ends: | | 779 | back-ends: |
780 | Simon Burge (pmax), | | 780 | Simon Burge (pmax), |
781 | Chris Demetriou (alpha), | | 781 | Chris Demetriou (alpha), |
782 | Matthew Fredette (sun2, sun3), | | 782 | Matthew Fredette (sun2, sun3), |
783 | Matthew Green (sparc64), | | 783 | Matthew Green (sparc64), |
784 | Ross Harvey (alpha), | | 784 | Ross Harvey (alpha), |
785 | Michael Hitch (amiga), | | 785 | Michael Hitch (amiga), |
786 | Paul Kranenburg (sparc), | | 786 | Paul Kranenburg (sparc), |
787 | David Laight (i386), | | 787 | David Laight (i386), |
788 | Christian Limpach (next68k), | | 788 | Christian Limpach (next68k), |
789 | Luke Mewburn (macppc), | | 789 | Luke Mewburn (macppc), |
790 | Matt Thomas (vax), | | 790 | Matt Thomas (vax), |
791 | Izumi Tsutsui (news68k, newsmips), | | 791 | Izumi Tsutsui (news68k, newsmips), |
792 | and | | 792 | and |
793 | UCHIYAMA Yasushi (ews4800mips). | | 793 | UCHIYAMA Yasushi (ews4800mips). |
794 | . | | 794 | . |
795 | .Sh BUGS | | 795 | .Sh BUGS |
796 | There are not currently primary bootstraps to support all file systems | | 796 | There are not currently primary bootstraps to support all file systems |
797 | types which are capable of being the root file system. | | 797 | types which are capable of being the root file system. |
798 | .Pp | | 798 | .Pp |
799 | If a disk has been converted from | | 799 | If a disk has been converted from |
800 | .Sy FFS | | 800 | .Sy FFS |
801 | to | | 801 | to |
802 | .Sy RAID | | 802 | .Sy RAID |
803 | without the contents of the disk erased, then the original | | 803 | without the contents of the disk erased, then the original |
804 | .Sy FFS | | 804 | .Sy FFS |
805 | installation may be auto-detected instead of the | | 805 | installation may be auto-detected instead of the |
806 | .Sy RAID | | 806 | .Sy RAID |
807 | installation. | | 807 | installation. |
808 | In this case, the | | 808 | In this case, the |
809 | .Fl t Ar raid | | 809 | .Fl t Ar raid |
810 | option must be provided. | | 810 | option must be provided. |
811 | . | | 811 | . |
812 | .Ss Nx Ns Tn /alpha | | 812 | .Ss Nx Ns Tn /alpha |
813 | The | | 813 | The |
814 | .Nx Ns Tn /alpha | | 814 | .Nx Ns Tn /alpha |
815 | primary bootstrap program can only load the secondary bootstrap program | | 815 | primary bootstrap program can only load the secondary bootstrap program |
816 | from file systems starting at the beginning (block 0) of disks. | | 816 | from file systems starting at the beginning (block 0) of disks. |
817 | Similarly, the secondary bootstrap program can only load kernels from | | 817 | Similarly, the secondary bootstrap program can only load kernels from |
818 | file systems starting at the beginning of disks. | | 818 | file systems starting at the beginning of disks. |
819 | .Pp | | 819 | .Pp |
820 | The size of primary bootstrap programs is restricted to 7.5KB, even | | 820 | The size of primary bootstrap programs is restricted to 7.5KB, even |
821 | though some file systems (e.g., ISO 9660) are able to accommodate larger | | 821 | though some file systems (e.g., ISO 9660) are able to accommodate larger |
822 | ones. | | 822 | ones. |
823 | . | | 823 | . |
824 | .Ss Nx Ns Tn /hp300 | | 824 | .Ss Nx Ns Tn /hp300 |
825 | The disk must have a boot partition large enough to hold the bootstrap code. | | 825 | The disk must have a boot partition large enough to hold the bootstrap code. |
826 | Currently the primary bootstrap must be a LIF format file. | | 826 | Currently the primary bootstrap must be a LIF format file. |
827 | . | | 827 | . |
828 | .Ss Nx Ns Tn /i386 and Nx Ns Tn /amd64 | | 828 | .Ss Nx Ns Tn /i386 and Nx Ns Tn /amd64 |
829 | The bootstrap must be installed in the | | 829 | The bootstrap must be installed in the |
830 | .Nx | | 830 | .Nx |
831 | partition that starts at the beginning of the mbr partition. | | 831 | partition that starts at the beginning of the mbr partition. |
832 | If that is a valid filesystem and contains the | | 832 | If that is a valid filesystem and contains the |
833 | .Pa /boot | | 833 | .Pa /boot |
834 | program then it will be used as the root filesystem, otherwise the | | 834 | program then it will be used as the root filesystem, otherwise the |
835 | .Sq a | | 835 | .Sq a |
836 | partition will be booted. | | 836 | partition will be booted. |
837 | .Pp | | 837 | .Pp |
838 | The size of primary bootstrap programs is restricted to 8KB, even | | 838 | The size of primary bootstrap programs is restricted to 8KB, even |
839 | though some file systems (e.g., ISO 9660) are able to accommodate larger | | 839 | though some file systems (e.g., ISO 9660) are able to accommodate larger |
840 | ones. | | 840 | ones. |
841 | . | | 841 | . |
842 | .Ss Nx Ns Tn /macppc | | 842 | .Ss Nx Ns Tn /macppc |
843 | Due to restrictions in | | 843 | Due to restrictions in |
844 | .Nm | | 844 | .Nm |
845 | and the secondary bootstrap implementation, file systems where kernels exist | | 845 | and the secondary bootstrap implementation, file systems where kernels exist |
846 | must start at the beginning of disks. | | 846 | must start at the beginning of disks. |
847 | .Pp | | 847 | .Pp |
848 | Currently, | | 848 | Currently, |
849 | .Nm | | 849 | .Nm |
850 | doesn't recognize an existing Apple partition map on the disk | | 850 | doesn't recognize an existing Apple partition map on the disk |
851 | and always writes a faked map to make disks bootable. | | 851 | and always writes a faked map to make disks bootable. |
852 | .Pp | | 852 | .Pp |
853 | The | | 853 | The |
854 | .Nx Ns Tn /macppc | | 854 | .Nx Ns Tn /macppc |
855 | bootstrap program can't load kernels from | | 855 | bootstrap program can't load kernels from |
856 | .Sy FFSv2 | | 856 | .Sy FFSv2 |
857 | partitions. | | 857 | partitions. |
858 | .Ss Nx Ns Tn /next68k | | 858 | .Ss Nx Ns Tn /next68k |
859 | The size of bootstrap programs is restricted to the free space before | | 859 | The size of bootstrap programs is restricted to the free space before |
860 | the file system at the beginning of the disk minus 8KB. | | 860 | the file system at the beginning of the disk minus 8KB. |
861 | . | | 861 | . |
862 | .Ss Nx Ns Tn /pmax | | 862 | .Ss Nx Ns Tn /pmax |
863 | The | | 863 | The |
864 | .Nx Ns Tn /pmax | | 864 | .Nx Ns Tn /pmax |
865 | secondary bootstrap program can only load kernels from file | | 865 | secondary bootstrap program can only load kernels from file |
866 | systems starting at the beginning of disks. | | 866 | systems starting at the beginning of disks. |
867 | .Pp | | 867 | .Pp |
868 | The size of primary bootstrap programs is restricted to 7.5KB, even | | 868 | The size of primary bootstrap programs is restricted to 7.5KB, even |
869 | though some file systems (e.g., ISO 9660) are able to accommodate larger | | 869 | though some file systems (e.g., ISO 9660) are able to accommodate larger |
870 | ones. | | 870 | ones. |
871 | . | | 871 | . |
872 | .Ss Nx Ns Tn /sun2 and Nx Ns Tn /sun3 | | 872 | .Ss Nx Ns Tn /sun2 and Nx Ns Tn /sun3 |
873 | The | | 873 | The |
874 | .Nx Ns Tn /sun2 | | 874 | .Nx Ns Tn /sun2 |
875 | and | | 875 | and |
876 | .Nx Ns Tn /sun3 | | 876 | .Nx Ns Tn /sun3 |
877 | secondary bootstrap program can only load kernels from file | | 877 | secondary bootstrap program can only load kernels from file |
878 | systems starting at the beginning of disks. | | 878 | systems starting at the beginning of disks. |
879 | . | | 879 | . |
880 | .Ss Nx Ns Tn /vax | | 880 | .Ss Nx Ns Tn /vax |
881 | The | | 881 | The |
882 | .Nx Ns Tn /vax | | 882 | .Nx Ns Tn /vax |
883 | secondary bootstrap program can only load kernels from file systems | | 883 | secondary bootstrap program can only load kernels from file systems |
884 | starting at the beginning of disks. | | 884 | starting at the beginning of disks. |
885 | .Pp | | 885 | .Pp |
886 | The size of primary bootstrap programs is restricted to 7.5KB, even | | 886 | The size of primary bootstrap programs is restricted to 7.5KB, even |
887 | though some file systems (e.g., ISO 9660) are able to accommodate larger | | 887 | though some file systems (e.g., ISO 9660) are able to accommodate larger |
888 | ones. | | 888 | ones. |