1 .\" $NetBSD: boot.8,v 1.5 2007/12/14 21:16:01 pavel Exp $
3 .\" Copyright (c) 2003 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" This code is derived from software contributed to The NetBSD Foundation
7 .\" by Michael Wolfson and Erik E. Fair.
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
18 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 .\" POSSIBILITY OF SUCH DAMAGE.
35 .Nd Macppc system bootstrapping procedures
37 .Ss Power fail and crash recovery
38 Normally, the system will reboot itself at power-up or after crashes.
39 An automatic consistency check of the file systems will be performed
42 and unless this fails, the system will resume multi-user operations.
44 The boot ROM performs a Power On Self Test (POST) then loads Open
46 Depending on the Open Firmware variable
48 it will either stop at the Open Firmware
49 prompt or attempt to boot an operating system.
50 Depending on the contents
57 Open Firmware variables, it will attempt to boot
65 Open Firmware loads the bootloader
69 The bootloader then loads the kernel from the
72 Otherwise, it tries to load (in the following order):
73 .Pa netbsd , netbsd.gz ,
78 partition of the same device that had the bootloader.
79 .Ss "Open Firmware Commands"
80 An essential but incomplete list of Open Firmware commands follows.
81 A more thorough list is contained in the FAQ.
82 .Lk http://www.NetBSD.org/ports/macppc/faq.html#ofw-use
85 .Op Ar boot-device Op Ar boot-file
88 Boot an operating system.
89 The default arguments for this command are taken from the Open Firmware
90 environment variables:
91 .Bl -tag -width boot-device -compact
93 primary bootloader location
97 flags passed to the kernel
102 Reset the system, and proceed as specified by the
111 then the system will attempt to execute the commands stored in the
118 the system will attempt to use the values stored in
119 .Sq Ev boot-command ,
128 the system will halt at the Open Firmware prompt.
132 Power off the system.
134 .Ic setenv Ar variable Ar value
136 Set an Open Firmware variable, e.g.,
137 .Bd -literal -offset indent
138 setenv auto-boot? false
139 setenv boot-device hd:,\eofwboot.xcf
140 setenv boot-file netbsd-GENERIC.gz
143 .Ic set-default Ar variable
145 Set an Open Firmware variable to its default value.
147 .Ic printenv Op Ar variable
149 Show Open Firmware variables and values.
153 Eject floppy disk on systems with on-board floppy drives.
159 on an Open Firmware 3 system.
165 on an Open Firmware 1.0.5, 2.0.x, or 2.4 system.
166 .Ss "Open Firmware Variables"
167 An essential but incomplete list of Open Firmware variables follows.
168 A more thorough list is contained in the FAQ.
169 .Lk http://www.NetBSD.org/ports/macppc/faq.html#ofw-variables
170 .Bl -tag -width "ew*0_protocols"
172 What Open Firmware will do at system startup or reset:
173 .Bl -tag -width false
175 automatically bootstrap an operating system using values from the
176 .Sq Ev boot-command ,
182 stop at the Open Firmware prompt.
188 runs commands in variable
192 Kernel memory location.
193 .Em "Do not modify this value on Open Firmware 3 systems \(em you may"
194 .Em "damage your computer" .
195 All other Open Firmware versions should use
199 Bootloader memory location.
200 .Em "Do not modify this value on Open Firmware 3 systems \(em you may"
201 .Em "damage your computer" .
202 All other Open Firmware versions should use
206 The command to use for booting.
207 Typically, the default of
212 Device from which to load primary bootloader.
213 Value depends on a variety of factors.
218 Value depends on a variety of factors.
223 What type of console input device
228 keyboard, or serial port
233 keyboard on models with
236 keyboard on models with
238 and built-in keyboard on laptops.
239 This is the default on some Open Firmware
240 2.0.x machines and all Open Firmware 2.4 and 3 machines.
243 serial port on machines with serial ports.
244 Properties are 38400 bps, 8 bits, no parity, 1 stop bit, no handshaking.
245 This is the default on all
246 Open Firmware 1.0.5 systems and some Open Firmware 2.0.x systems.
249 serial port on machines with serial ports.
250 Properties are the same as the
254 Serial port on Xserve models.
255 Properties are 57600 bps, 8 bits, no
256 parity, 1 stop bit, no handshaking.
260 What type of console output device (On-board video, AGP video, PCI video,
261 built-in LCD, or serial console).
262 Value depends on a variety of factors.
266 .Lk http://www.NetBSD.org/ports/macppc/faq.html#ofw-input-output-devices
271 is set to true, these
273 commands will be run when the computer is reset
276 .Ss "Normal Operation"
277 When Open Firmware loads the primary bootloader, it will print something
279 .Bd -unfilled -offset indent
281 tsize=CC50 dsize=14AC bsize=2668 entry=640000
283 .text 00640000 00640000 0000CC50 000000E0
284 .data 0064D000 0064D000 000014AC 0000CD30
285 .bss 0064E4B0 0064E4B0 00002668 00000000
286 loading .text, done..
287 loading .data, done..
288 clearing .bss, done..
293 is started, it prints something like the following:
294 .Bd -unfilled -offset indent
295 \*[Gt]\*[Gt] NetBSD/macppc OpenFirmware Boot, Revision 1.7
296 \*[Gt]\*[Gt] (autobuild@tgm.daemon.org, Thu Feb 6 17:50:27 UTC 2003)
301 is loading the kernel, it prints something like the following:
302 .Bd -unfilled -offset indent
303 4395364+254568 [220144+193803]=0x4d477c
309 kernel has started it prints a banner similar to the following:
310 .Bd -literal -offset indent
311 Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
312 The NetBSD Foundation, Inc. All rights reserved.
313 Copyright (c) 1982, 1986, 1989, 1991, 1993
314 The Regents of the University of California. All rights reserved.
316 NetBSD 1.6ZC (GENERIC) #0: Tue Sep 30 13:09:10 UTC 2003
317 autobuild@tgm.NetBSD.org:/autobuild/HEAD/macppc/OBJ/autobuild/HEAD/src/sys/arch/macppc/compile/GENERIC
319 .Ss "After bootstrap"
322 kernel is booted normally
323 it initializes itself and proceeds to start the system.
324 An automatic consistency check of the file systems takes place,
325 and unless this fails, the system comes up to multi-user operation.
327 The proper way to shut the system down is with the
331 If the system crashes, it will enter the kernel debugger,
333 if it is configured in the kernel.
334 If the crash occurred during initialization and the debugger is
335 not present or is exited, the kernel will halt the system.
337 If the crash occurred during normal operation and the debugger
338 is not present or is exited, the system will attempt a dump to the
339 configured dump device (which will be automatically recovered with
341 during the next bootstrap cycle), and after the dump is complete (successful
342 or not) the kernel will attempt a reboot.
344 .Bl -tag -width /usr/mdec/bootxx_cd9660 -compact
347 secondary bootstrap program (Open Firmware 1.x and 2.x)
352 .It Pa /usr/mdec/bootxx
354 primary bootstrap program (Open Firmware 1.x and 2.x) a.k.a.
357 .It Pa /usr/mdec/ofwboot
359 secondary bootstrap program (Open Firmware 1.x and 2.x)
360 .It Pa /usr/mdec/ofwboot.xcf
361 primary bootstrap for netboot and
383 .Lk http://www.NetBSD.org/ports/macppc/faq.html
385 .Lk http://www.NetBSD.org/docs/network/netboot/
388 .Lk http://playground.sun.com/1275/home.html
390 The device names used by
392 and Open Firmware often have no relation to each other.
394 Apple Computer's Open Firmware implementation is easily confused.
395 It is best to reboot your computer
396 after a failed boot attempt,
400 Use the Open Firmware
404 Apple Computer's Open Firmware implementation is notoriously bad.
405 Thorough instructions for installing and booting
407 are in the install notes
409 included with every release of