xref: /netbsd-src/share/man/man8/man8.macppc/boot.8 (revision 4baa9a4e9a8b56fc94b3d3ffcf8261a183367db4)
1*4baa9a4eSrillig.\" $NetBSD: boot.8,v 1.9 2024/09/07 19:13:29 rillig Exp $
2d6209b12Smbw.\"
3d6209b12Smbw.\" Copyright (c) 2003 The NetBSD Foundation, Inc.
4d6209b12Smbw.\" All rights reserved.
5d6209b12Smbw.\"
6d6209b12Smbw.\" This code is derived from software contributed to The NetBSD Foundation
7d6209b12Smbw.\" by Michael Wolfson and Erik E. Fair.
8d6209b12Smbw.\"
9d6209b12Smbw.\" Redistribution and use in source and binary forms, with or without
10d6209b12Smbw.\" modification, are permitted provided that the following conditions
11d6209b12Smbw.\" are met:
12d6209b12Smbw.\" 1. Redistributions of source code must retain the above copyright
13d6209b12Smbw.\"    notice, this list of conditions and the following disclaimer.
14d6209b12Smbw.\" 2. Redistributions in binary form must reproduce the above copyright
15d6209b12Smbw.\"    notice, this list of conditions and the following disclaimer in the
16d6209b12Smbw.\"    documentation and/or other materials provided with the distribution.
17d6209b12Smbw.\"
1818b61e61Smartin.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
1918b61e61Smartin.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
2018b61e61Smartin.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
2118b61e61Smartin.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
2218b61e61Smartin.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2318b61e61Smartin.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2418b61e61Smartin.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2518b61e61Smartin.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2618b61e61Smartin.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2718b61e61Smartin.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2818b61e61Smartin.\" POSSIBILITY OF SUCH DAMAGE.
29d6209b12Smbw.\"
303af2acdcSchristos.Dd February 17, 2017
31d6209b12Smbw.Dt BOOT 8 macppc
32d6209b12Smbw.Os
33d6209b12Smbw.Sh NAME
34d6209b12Smbw.Nm boot
35d6209b12Smbw.Nd Macppc system bootstrapping procedures
36d6209b12Smbw.Sh DESCRIPTION
37d6209b12Smbw.Ss Power fail and crash recovery
38d6209b12SmbwNormally, the system will reboot itself at power-up or after crashes.
39d6209b12SmbwAn automatic consistency check of the file systems will be performed
40d6209b12Smbwas described in
41d6209b12Smbw.Xr fsck 8 ,
42d6209b12Smbwand unless this fails, the system will resume multi-user operations.
43d6209b12Smbw.Ss Cold starts
44d6209b12SmbwThe boot ROM performs a Power On Self Test (POST) then loads Open
4507c1fe57SfairFirmware.
4607c1fe57SfairDepending on the Open Firmware variable
47d6209b12Smbw.Sq Ev auto-boot?
48d6209b12Smbwit will either stop at the Open Firmware
4907c1fe57Sfairprompt or attempt to boot an operating system.
5007c1fe57SfairDepending on the contents
51d6209b12Smbwof the
52d6209b12Smbw.Sq Ev use-nvramrc? ,
53d6209b12Smbw.Sq Ev boot-command ,
54d6209b12Smbw.Sq Ev boot-device ,
55d6209b12Smbwand
56d6209b12Smbw.Sq Ev boot-file
57d6209b12SmbwOpen Firmware variables, it will attempt to boot
58d6209b12Smbw.Tn MacOS ,
59d6209b12Smbw.Tn "MacOS X" ,
60d6209b12Smbwor
61d6209b12Smbw.Nx .
62d6209b12Smbw.Pp
63d6209b12SmbwTo boot
64d6209b12Smbw.Nx ,
65d6209b12SmbwOpen Firmware loads the bootloader
663af2acdcSchristos.Xr macppc/ofwboot 8
67d6209b12Smbwfrom the specified
68d6209b12Smbw.Sq Ev boot-device .
69d6209b12SmbwThe bootloader then loads the kernel from the
70d6209b12Smbw.Sq Ev boot-file ,
7107c1fe57Sfair.Pq if it exists .
7207c1fe57SfairOtherwise, it tries to load (in the following order):
7360e31ba3Swiz.Pa netbsd , netbsd.gz ,
7460e31ba3Swizor
7560e31ba3Swiz.Pa netbsd.macppc
76d6209b12Smbwon the
77d6209b12Smbw.Dq a
78d6209b12Smbwpartition of the same device that had the bootloader.
79d6209b12Smbw.Ss "Open Firmware Commands"
80d6209b12SmbwAn essential but incomplete list of Open Firmware commands follows.
81d6209b12SmbwA more thorough list is contained in the FAQ.
82*4baa9a4eSrillig.Lk https://www.NetBSD.org/ports/macppc/faq.html#ofw-use
83d6209b12Smbw.Pp
84d6209b12Smbw.Ic boot
85d6209b12Smbw.Op Ar boot-device Op Ar boot-file
86d6209b12Smbw.Op Ar options
87d6209b12Smbw.Pp
88d6209b12SmbwBoot an operating system.
89d6209b12SmbwThe default arguments for this command are taken from the Open Firmware
90d6209b12Smbwenvironment variables:
91d6209b12Smbw.Bl -tag -width boot-device -compact
92d6209b12Smbw.It Ar boot-device
93d6209b12Smbwprimary bootloader location
94d6209b12Smbw.It Ar boot-file
95d6209b12Smbwkernel location
96d6209b12Smbw.It Ar options
97d6209b12Smbwflags passed to the kernel
98d6209b12Smbw.El
99d6209b12Smbw.Pp
100d6209b12Smbw.Ic reset-all
101d6209b12Smbw.Pp
102d6209b12SmbwReset the system, and proceed as specified by the
103d6209b12Smbw.Sq Ev use-nvramrc?
104d6209b12Smbwand
105d6209b12Smbw.Sq Ev auto-boot?
10607c1fe57Sfairvariables.
10707c1fe57SfairIf
108d6209b12Smbw.Sq Ev use-nvramrc?
109d6209b12Smbwis set to
110d6209b12Smbw.Sq Ev true ,
111d6209b12Smbwthen the system will attempt to execute the commands stored in the
112d6209b12Smbw.Sq Ev nvramrc
11307c1fe57Sfairvariable.
11407c1fe57SfairIf
115d6209b12Smbw.Sq Ev auto-boot?
116d6209b12Smbwis set to
117d6209b12Smbw.Sq Ev true ,
118d6209b12Smbwthe system will attempt to use the values stored in
119d6209b12Smbw.Sq Ev boot-command ,
120d6209b12Smbw.Sq Ev boot-device ,
121d6209b12Smbwand
122d6209b12Smbw.Sq Ev boot-file
12307c1fe57Sfairto boot the system.
12407c1fe57SfairIf
125d6209b12Smbw.Sq Ev auto-boot?
126d6209b12Smbwis set to
127d6209b12Smbw.Sq Ev false ,
128d6209b12Smbwthe system will halt at the Open Firmware prompt.
129d6209b12Smbw.Pp
130d6209b12Smbw.Ic shut-down
131d6209b12Smbw.Pp
132d6209b12SmbwPower off the system.
133d6209b12Smbw.Pp
134d6209b12Smbw.Ic setenv Ar variable Ar value
135d6209b12Smbw.Pp
136d6209b12SmbwSet an Open Firmware variable, e.g.,
137d6209b12Smbw.Bd -literal -offset indent
138d6209b12Smbwsetenv auto-boot? false
139d6209b12Smbwsetenv boot-device hd:,\eofwboot.xcf
140d6209b12Smbwsetenv boot-file netbsd-GENERIC.gz
141d6209b12Smbw.Ed
142d6209b12Smbw.Pp
143d6209b12Smbw.Ic set-default Ar variable
144d6209b12Smbw.Pp
145d6209b12SmbwSet an Open Firmware variable to its default value.
146d6209b12Smbw.Pp
147d6209b12Smbw.Ic printenv Op Ar variable
148d6209b12Smbw.Pp
149d6209b12SmbwShow Open Firmware variables and values.
150d6209b12Smbw.Pp
151d6209b12Smbw.Ic eject fd
152d6209b12Smbw.Pp
153d6209b12SmbwEject floppy disk on systems with on-board floppy drives.
154d6209b12Smbw.Pp
155d6209b12Smbw.Ic mac-boot
156d6209b12Smbw.Pp
157d6209b12SmbwAttempt to boot
158d6209b12Smbw.Tn MacOS
159d6209b12Smbwon an Open Firmware 3 system.
160d6209b12Smbw.Pp
161d6209b12Smbw.Ic bye
162d6209b12Smbw.Pp
163d6209b12SmbwAttempt to boot
164d6209b12Smbw.Tn MacOS
165d6209b12Smbwon an Open Firmware 1.0.5, 2.0.x, or 2.4 system.
166d6209b12Smbw.Ss "Open Firmware Variables"
167d6209b12SmbwAn essential but incomplete list of Open Firmware variables follows.
168d6209b12SmbwA more thorough list is contained in the FAQ.
169*4baa9a4eSrillig.Lk https://www.NetBSD.org/ports/macppc/faq.html#ofw-variables
170d6209b12Smbw.Bl -tag -width "ew*0_protocols"
171d6209b12Smbw.It Ev auto-boot?
172d6209b12SmbwWhat Open Firmware will do at system startup or reset:
173d6209b12Smbw.Bl -tag -width false
174d6209b12Smbw.It Ar true
175d6209b12Smbwautomatically bootstrap an operating system using values from the
176d6209b12Smbw.Sq Ev boot-command ,
177d6209b12Smbw.Sq Ev boot-device ,
178d6209b12Smbwand
179d6209b12Smbw.Sq Ev boot-file
180d6209b12Smbwvariables.
181d6209b12Smbw.It Ar false
182d6209b12Smbwstop at the Open Firmware prompt.
183d6209b12Smbw.El
184d6209b12Smbw.Pp
185d6209b12Smbw.It Ev use-nvramrc?
186d6209b12SmbwIf
187d6209b12Smbw.Sq Ev true
188d6209b12Smbwruns commands in variable
189d6209b12Smbw.Sq Ev nvramrc .
190d6209b12Smbw.Pp
191d6209b12Smbw.It Ev real-base
192d6209b12SmbwKernel memory location.
193d6209b12Smbw.Em "Do not modify this value on Open Firmware 3 systems \(em you may"
194d6209b12Smbw.Em "damage your computer" .
195d6209b12SmbwAll other Open Firmware versions should use
196d6209b12Smbw.Li F00000 .
197d6209b12Smbw.Pp
198d6209b12Smbw.It Ev load-base
199d6209b12SmbwBootloader memory location.
200d6209b12Smbw.Em "Do not modify this value on Open Firmware 3 systems \(em you may"
201d6209b12Smbw.Em "damage your computer" .
202d6209b12SmbwAll other Open Firmware versions should use
203d6209b12Smbw.Li 600000 .
204d6209b12Smbw.Pp
205d6209b12Smbw.It Ev boot-command
20607c1fe57SfairThe command to use for booting.
20707c1fe57SfairTypically, the default of
208d6209b12Smbw.Sq Ev boot
209d6209b12Smbwis used.
210d6209b12Smbw.Pp
211d6209b12Smbw.It Ev boot-device
21207c1fe57SfairDevice from which to load primary bootloader.
21307c1fe57SfairValue depends on a variety of factors.
21407c1fe57SfairSee
2153af2acdcSchristos.Xr macppc/ofwboot 8 .
216d6209b12Smbw.It Ev boot-file
21707c1fe57SfairKernel location.
21807c1fe57SfairValue depends on a variety of factors.
21907c1fe57SfairSee
2203af2acdcSchristos.Xr macppc/ofwboot 8 .
221d6209b12Smbw.Pp
222d6209b12Smbw.It Ev input-device
22307c1fe57SfairWhat type of console input device
22407c1fe57Sfair.Po
22507c1fe57Sfair.Tn ADB
22607c1fe57Sfairkeyboard,
22707c1fe57Sfair.Tn USB
22807c1fe57Sfairkeyboard, or serial port
22907c1fe57Sfair.Pc .
230d6209b12Smbw.Bl -tag -width ttya
231d6209b12Smbw.It Ar kbd
23207c1fe57Sfair.Tn ADB
23307c1fe57Sfairkeyboard on models with
23407c1fe57Sfair.Tn ADB ,
23507c1fe57Sfair.Tn USB
23607c1fe57Sfairkeyboard on models with
23707c1fe57Sfair.Tn USB ,
23807c1fe57Sfairand built-in keyboard on laptops.
23907c1fe57SfairThis is the default on some Open Firmware
240d6209b12Smbw2.0.x machines and all Open Firmware 2.4 and 3 machines.
241d6209b12Smbw.It Ar ttya
242d6209b12Smbw.Sq Modem
24307c1fe57Sfairserial port on machines with serial ports.
24407c1fe57SfairProperties are 38400 bps, 8 bits, no parity, 1 stop bit, no handshaking.
24507c1fe57SfairThis is the default on all
246d6209b12SmbwOpen Firmware 1.0.5 systems and some Open Firmware 2.0.x systems.
247d6209b12Smbw.It Ar ttyb
248d6209b12Smbw.Sq Printer
24907c1fe57Sfairserial port on machines with serial ports.
25007c1fe57SfairProperties are the same as the
251d6209b12Smbw.Sq Modem
252d6209b12Smbwport.
253d6209b12Smbw.It Ar scca
25407c1fe57SfairSerial port on Xserve models.
25507c1fe57SfairProperties are 57600 bps, 8 bits, no
256d6209b12Smbwparity, 1 stop bit, no handshaking.
257d6209b12Smbw.El
258d6209b12Smbw.Pp
259d6209b12Smbw.It output-device
260d6209b12SmbwWhat type of console output device (On-board video, AGP video, PCI video,
261d6209b12Smbwbuilt-in LCD, or serial console).
26207c1fe57SfairValue depends on a variety of factors.
26307c1fe57SfairSee
2643af2acdcSchristos.Xr macppc/ofwboot 8
265d6209b12Smbwand
266*4baa9a4eSrillig.Lk https://www.NetBSD.org/ports/macppc/faq.html#ofw-input-output-devices
267d6209b12Smbw.Pp
268d6209b12Smbw.It nvramrc
269d6209b12SmbwIf
270d6209b12Smbw.Sq Ev use-nvramrc?
271d6209b12Smbwis set to true, these
272d6209b12Smbw.Tn FORTH
273d6209b12Smbwcommands will be run when the computer is reset
274d6209b12Smbw.Pp
275d6209b12Smbw.El
276d6209b12Smbw.Ss "Normal Operation"
277d6209b12SmbwWhen Open Firmware loads the primary bootloader, it will print something
278d6209b12Smbwlike the following:
279d6209b12Smbw.Bd -unfilled -offset indent
280d6209b12Smbw loading XCOFF
281d6209b12Smbw tsize=CC50 dsize=14AC bsize=2668 entry=640000
282d6209b12Smbw SECTIONS:
283d6209b12Smbw .text    00640000 00640000 0000CC50 000000E0
284d6209b12Smbw .data    0064D000 0064D000 000014AC 0000CD30
285d6209b12Smbw .bss     0064E4B0 0064E4B0 00002668 00000000
286d6209b12Smbw loading .text, done..
287d6209b12Smbw loading .data, done..
288d6209b12Smbw clearing .bss, done..
289d6209b12Smbw.Ed
290d6209b12Smbw.Pp
291d6209b12SmbwWhen
2923af2acdcSchristos.Xr macppc/ofwboot 8
293d6209b12Smbwis started, it prints something like the following:
294d6209b12Smbw.Bd -unfilled -offset indent
29501869ca4Swiz >> NetBSD/macppc OpenFirmware Boot, Revision 1.7
29601869ca4Swiz >> (autobuild@tgm.daemon.org, Thu Feb  6 17:50:27 UTC 2003)
297d6209b12Smbw.Ed
298d6209b12Smbw.Pp
299d6209b12SmbwWhen
3003af2acdcSchristos.Xr macppc/ofwboot 8
301d6209b12Smbwis loading the kernel, it prints something like the following:
302d6209b12Smbw.Bd -unfilled -offset indent
303d6209b12Smbw 4395364+254568 [220144+193803]=0x4d477c
304d6209b12Smbw  start=0x100000
305d6209b12Smbw.Ed
306d6209b12Smbw.Pp
307d6209b12SmbwWhen the
308d6209b12Smbw.Nx
309d6209b12Smbwkernel has started it prints a banner similar to the following:
31060e31ba3Swiz.Bd -literal -offset indent
311d6209b12Smbw Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
312d6209b12Smbw     The NetBSD Foundation, Inc.  All rights reserved.
313d6209b12Smbw Copyright (c) 1982, 1986, 1989, 1991, 1993
314d6209b12Smbw     The Regents of the University of California.  All rights reserved.
315d6209b12Smbw
316d6209b12Smbw NetBSD 1.6ZC (GENERIC) #0: Tue Sep 30 13:09:10 UTC 2003
317baf3076aSkeihan        autobuild@tgm.NetBSD.org:/autobuild/HEAD/macppc/OBJ/autobuild/HEAD/src/sys/arch/macppc/compile/GENERIC
318d6209b12Smbw.Ed
319d6209b12Smbw.Ss "After bootstrap"
320d6209b12SmbwOnce the
321d6209b12Smbw.Nx Ns Tn /macppc
322d6209b12Smbwkernel is booted normally
323d6209b12Smbwit initializes itself and proceeds to start the system.
324d6209b12SmbwAn automatic consistency check of the file systems takes place,
325d6209b12Smbwand unless this fails, the system comes up to multi-user operation.
326d6209b12Smbw.Pp
327d6209b12SmbwThe proper way to shut the system down is with the
328d6209b12Smbw.Xr shutdown 8
329d6209b12Smbwcommand.
330d6209b12Smbw.Pp
331d6209b12SmbwIf the system crashes, it will enter the kernel debugger,
332d6209b12Smbw.Xr ddb 4 ,
333d6209b12Smbwif it is configured in the kernel.
334d6209b12SmbwIf the crash occurred during initialization and the debugger is
335d6209b12Smbwnot present or is exited, the kernel will halt the system.
336d6209b12Smbw.Pp
337d6209b12SmbwIf the crash occurred during normal operation and the debugger
338d6209b12Smbwis not present or is exited, the system will attempt a dump to the
339d6209b12Smbwconfigured dump device (which will be automatically recovered with
340d6209b12Smbw.Xr savecore 8
341d6209b12Smbwduring the next bootstrap cycle), and after the dump is complete (successful
342d6209b12Smbwor not) the kernel will attempt a reboot.
343d6209b12Smbw.Sh FILES
344d6209b12Smbw.Bl -tag -width /usr/mdec/bootxx_cd9660 -compact
345d6209b12Smbw.It Pa /boot
346d6209b12Smbw.Nx
347d6209b12Smbwsecondary bootstrap program (Open Firmware 1.x and 2.x)
348d6209b12Smbw.It Pa /netbsd
349d6209b12Smbwdefault
350d6209b12Smbw.Nx
351d6209b12Smbwsystem kernel
352d6209b12Smbw.It Pa /usr/mdec/bootxx
353d6209b12Smbw.Nx
354d6209b12Smbwprimary bootstrap program (Open Firmware 1.x and 2.x) a.k.a.
355d6209b12Smbw.Dq "partition zero"
356d6209b12Smbwbootloader
357d6209b12Smbw.It Pa /usr/mdec/ofwboot
358d6209b12Smbw.Nx
359d6209b12Smbwsecondary bootstrap program (Open Firmware 1.x and 2.x)
360d6209b12Smbw.It Pa /usr/mdec/ofwboot.xcf
361d6209b12Smbwprimary bootstrap for netboot and
362d6209b12Smbw.Dq cd9660
363d6209b12Smbw.Pq Tn ISO 9660 ,
364d6209b12Smbw.Dq MS-DOS ,
365d6209b12Smbw.Dq HFS ,
366d6209b12Smbwand
367d6209b12Smbw.Dq HFS+
368d6209b12Smbwfile systems.
369d6209b12Smbw.El
370d6209b12Smbw.Sh SEE ALSO
371d6209b12Smbw.Xr ddb 4 ,
37207c1fe57Sfair.Xr intro 4 ,
373d6209b12Smbw.Xr diskless 8 ,
374d6209b12Smbw.Xr halt 8 ,
375d6209b12Smbw.Xr init 8 ,
376d6209b12Smbw.Xr installboot 8 ,
3773af2acdcSchristos.Xr macppc/ofwboot 8 ,
378d6209b12Smbw.Xr rc 8 ,
379d6209b12Smbw.Xr reboot 8 ,
380d6209b12Smbw.Xr savecore 8 ,
381d6209b12Smbw.Xr shutdown 8
382d6209b12Smbw.Pp
383*4baa9a4eSrillig.Lk https://www.NetBSD.org/ports/macppc/faq.html
384d6209b12Smbw.br
385*4baa9a4eSrillig.Lk https://www.NetBSD.org/docs/network/netboot/
386d6209b12Smbw.Sh STANDARDS
38760e31ba3Swiz.St -ieee1275-94
388d6209b12Smbw.Lk http://playground.sun.com/1275/home.html
389d6209b12Smbw.Sh BUGS
390d6209b12SmbwThe device names used by
391d6209b12Smbw.Nx Ns Tn /macppc
392d6209b12Smbwand Open Firmware often have no relation to each other.
393d6209b12Smbw.Pp
39407c1fe57SfairApple Computer's Open Firmware implementation is easily confused.
39507c1fe57SfairIt is best to reboot your computer
396d6209b12Smbwafter a failed boot attempt,
397d6209b12Smbw.Ic halt ,
398d6209b12Smbwor
399d6209b12Smbw.Ic "shutdown -h" .
400d6209b12SmbwUse the Open Firmware
401d6209b12Smbw.Ic reset-all
402d6209b12Smbwcommand.
403d6209b12Smbw.Pp
40407c1fe57SfairApple Computer's Open Firmware implementation is notoriously bad.
40507c1fe57SfairThorough instructions for installing and booting
406d6209b12Smbw.Nx
407d6209b12Smbware in the install notes
40860e31ba3Swiz.Pq Pa INSTALL.html
409d6209b12Smbwincluded with every release of
410d6209b12Smbw.Nx .
411