1.\"	$OpenBSD: boot_macppc.8,v 1.21 2014/02/14 12:18:27 schwarze Exp $
2.\"
3.\" Copyright (c) 1992, 1993
4.\"	The Regents of the University of California.  All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the University nor the names of its contributors
15.\"    may be used to endorse or promote products derived from this software
16.\"    without specific prior written permission.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28.\" SUCH DAMAGE.
29.\"
30.\"     @(#)boot_macppc.8
31.\"
32.Dd $Mdocdate: February 14 2014 $
33.Dt BOOT_MACPPC 8 macppc
34.Os
35.Sh NAME
36.Nm boot_macppc
37.Nd macppc system bootstrapping procedures
38.Sh DESCRIPTION
39.Ss System startup
40When powered on, after a panic, or if the system is rebooted via
41.Xr reboot 8
42or
43.Xr shutdown 8 ,
44the Open Firmware will proceed to its initialization,
45and will boot an operating system if the
46.Va auto-boot?\&
47variable is set to
48.Dq true ,
49or will wait for interactive commands otherwise.
50.Ss Boot process description
51The Apple Open Firmware will normally load the kernel from the device and
52filename as instructed by the
53.Va boot-device
54and
55.Va boot-file
56variables.
57If the
58.Va boot-file
59variable is empty, the
60.Ox
61bootloader will look for a kernel named
62.Pa bsd ,
63unless a different filename has been specified in the boot command.
64To reset this variable to its default, empty, value, type the following
65at the Open Firmware prompt:
66.Pp
67.Dl set-default boot-device
68.Pp
69The
70.Ox
71bootstrap program is named
72.Dq ofwboot .
73It can be installed either in a HFS partition or in a
74MSDOS partition on the disk.
75If MBR partitioning is chosen for
76the disk, the bootstrap program will be installed automatically during the
77.Ox
78installation procedure.
79For HFS shared disks, the
80.Pa ofwboot
81file must be installed manually.
82The ofwboot program can be loaded from any Open Firmware recognized
83disk or network device.
84.Ss Boot process options
85If invoked manually without parameters, or if the specified kernel could
86not be loaded, the
87.Ox
88bootloader will let the user enter a boot device, kernel
89filename and boot options.
90.Pp
91If the special line
92.Ic exit
93is entered, the bootloader will attempt to restart the machine.
94.Pp
95The file specification used is of the form:
96.Dl promdev:partition/filename options
97where:
98.Dq promdev
99is an optional Open Firmware device name (such as
100.Dq hd
101or
102.Dq ide )
103and
104.Dq partition
105is an optional disk partition number.
106Normal line editing characters can be used when typing the file
107specification.
108.Pp
109The following options are recognized:
110.Pp
111.Bl -tag -width "-XXX" -offset indent -compact
112.It Fl a
113Prompt for the root filesystem and swap devices after the devices have
114been configured.
115.It Fl c
116Enter the
117.Dq User Kernel Config
118mode upon startup
119.Pq see Xr boot_config 8 .
120.It Fl d
121Enter the debugger,
122.Xr ddb 4 ,
123as soon as the kernel console has been initialized.
124.It Fl s
125Boot the system single-user.
126The system will be booted multi-user unless this option is specified.
127.El
128.Ss Abnormal system termination
129In case of system crashes, the kernel will usually enter the kernel
130debugger,
131.Xr ddb 4 ,
132unless it is not present in the kernel, or it is disabled via the
133.Va ddb.panic
134sysctl.
135Upon leaving ddb, or if ddb was not entered, the kernel will halt the system
136if it was still in device configuration phase, or attempt a dump to the
137configured dump device, if possible.
138The crash dump will then be recovered by
139.Xr savecore 8
140during the next multi-user boot cycle.
141It is also possible to force other behaviours from ddb.
142.Ss Accessing the PROM
143The prom can only be accessed during system reset, or at power-up.
144To enter Open Firmware, press and hold
145.Dq Cntrl
146.Dq Cmd
147.Dq o
148.Dq f
149as the machine resets until it enters the Open Firmware debugger.
150.Pp
151On an Xserve using serial console the System Identifier button is used to
152enter Open Firmware instead of the keyboard.
153To enter Open Firmware, hold down the System Identifier button while pressing
154the Power button.
155When the upper LED bank begins lighting up in sequence, repeatedly press
156the System Identifier button until the seventh LED from the right is
157highlighted in the lower bank.
158Now hold the System Identifier button for two seconds, until all the top
159row LEDs light up.
160.Sh FILES
161.Bl -tag -width /usr/mdec/ofwboot -compact
162.It Pa /bsd
163default system kernel
164.It Pa /bsd.rd
165standalone installation kernel, suitable for disaster recovery
166.It Pa /usr/mdec/ofwboot
167system bootstrap (usually installed on a stand-alone FAT partition or an
168Apple HFS partition, to be readable by Open Firmware)
169.El
170.Sh SEE ALSO
171.Xr ddb 4 ,
172.Xr boot_config 8 ,
173.Xr halt 8 ,
174.Xr init 8 ,
175.Xr reboot 8 ,
176.Xr savecore 8 ,
177.Xr shutdown 8
178