xref: /openbsd-src/sys/arch/macppc/stand/boot.8 (revision a295a17c03ed84391b4531de0c720370f91dac31)
1.\"	$OpenBSD: boot.8,v 1.7 2024/11/05 09:45:22 miod Exp $
2.\"
3.\" Copyright (c) 1997-2001 Michael Shalayeff
4.\" 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.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18.\" IN NO EVENT SHALL THE AUTHOR OR HIS RELATIVES BE LIABLE FOR ANY DIRECT,
19.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21.\" SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
25.\" THE POSSIBILITY OF SUCH DAMAGE.
26.\"
27.\"
28.Dd $Mdocdate: November 5 2024 $
29.Dt BOOT 8 macppc
30.Os
31.Sh NAME
32.Nm boot ,
33.Nm boot.conf
34.Nd macppc-specific bootstrap
35.Sh DESCRIPTION
36The main purpose of this program is to load the system kernel.
37.Pp
38As described in
39.Xr boot_macppc 8 ,
40this program is loaded by the
41firmware
42and provides a convenient way to load the kernel.
43This program acts as an enhanced boot monitor for macppc systems, providing
44a common interface for the kernel to start from.
45.Pp
46Basic operations include:
47.Pp
48.Bl -bullet -compact
49.It
50Loading kernels from hard disk.
51.It
52Loading kernels compressed by
53.Xr gzip 1 .
54.It
55Providing an interactive command line.
56.El
57.Pp
58The sequence of its operation is as follows: initialization,
59parsing the configuration file, then an interactive command line.
60While at the command line you have 5 seconds to type any commands, if needed.
61If time expires, the kernel will be loaded according to
62the current variable settings (see the
63.Ic set
64command).
65If the kernel load fails, a second attempt is made with the timeout increased
66by one second.
67The sequence of
68.Nm
69operations is as follows:
70.Bl -enum
71.It
72If the file
73.Pa /etc/boot.conf
74.\" XXX BEWARE! wd0 only, so text change...
75.\" exists on the filesystem
76.\" .Nm
77.\" was loaded from, open and parse it.
78exists on the filesystem in slice
79.Sq a
80on the first disk drive
81.Pq wd0 ,
82open and parse it.
83Lines beginning with the
84.Sq #
85character,
86as well as whitespace at the beginning of lines,
87are ignored.
88The file may contain any commands
89.Nm
90accepts at the interactive prompt.
91Though default settings usually suffice, they can be changed here.
92.\" XXX CHECK_SKIP_CONF is not defined...
93.\" .Pp
94.\" .Pa boot.conf
95.\" processing can be skipped by holding down either Control key as
96.\" .Nm
97.\" starts.
98.It
99The header line
100.Pp
101.Dl >> OpenBSD/macppc BOOT [x.xx]
102.Pp
103is displayed to the active console, where
104.Ar x.xx
105is the version number of the
106.Nm
107program, followed by the
108.Pp
109.Dl boot>
110.Pp
111prompt, which means you are in interactive mode and may enter commands.
112If you do not,
113.Nm
114will proceed to load the kernel with the current parameters after the
115timeout period has expired.
116.El
117.Pp
118By default,
119.Nm
120attempts to load the kernel executable
121.Pa /bsd .
122If it fails to find the kernel and no alternative kernel image has
123been specified, the system will be unable to boot.
124.Sh COMMANDS
125The following commands are accepted at the
126.Nm
127prompt:
128.Bl -tag -width shorten
129.It Ic boot Oo Oo Ar device : Oc Ns Ar image Oc Op Fl acds
130Boots the specified kernel image with any options given.
131If
132.Ar device
133or
134.Ar image
135are omitted, values from the
136.Nm
137variables will be used.
138.Pp
139The only bootable devices, at the moment, are IDE devices connected to
140the internal controller;
141they are detected as
142.Sq hd
143devices.
144Therefore, to boot kernel
145.Pa /bsd
146on the first hard drive,
147specify
148.Dq boot hd:/bsd .
149.Bl -tag -width _a_
150.It Fl a
151Causes the kernel to ask for the
152.Nm root
153device to use.
154.It Fl c
155Causes the kernel to go into
156.Xr boot_config 8
157before performing
158.Xr autoconf 4
159procedures.
160.It Fl d
161Causes the kernel to drop into
162.Xr ddb 4
163at the earliest convenient point.
164.It Fl s
165Causes the kernel to boot single-user.
166.El
167.It Ic echo Op Ar args
168Displays
169.Ar args
170on the console device.
171.It Ic help
172Prints a list of available commands.
173.It Ic hexdump Ar addr size
174Show
175.Ar size
176bytes of memory at address
177.Ar addr .
178.It Ic ls Op Ar directory
179Prints contents of the specified
180.Ar directory
181in long format including: attributes and file type, owner, group,
182size, filename.
183.It Ic reboot
184Reboots the machine by initiating a warm boot procedure.
185.It Ic set Op Ar varname Op Ar value
186If invoked without arguments, prints a list of variables and their values.
187If only
188.Ar varname
189is specified, displays contents of that variable.
190If
191.Ar varname
192and
193.Ar value
194are both specified, sets that variable to the given value.
195Variables include:
196.Pp
197.Bl -tag -compact -width boothow
198.It Ic debug
199Debug flag if
200.Nm
201was compiled with DEBUG defined.
202.It Ic device
203Boot device name (e.g.,
204.Li ide ,
205.Li ide0 ,
206.Li hd ,
207.Li hd1 ) .
208.It Ic howto
209Options to pass to the loaded kernel.
210.It Ic image
211File name containing the kernel image.
212.It Ic timeout
213Number of seconds boot will wait for human intervention before
214booting the default kernel image.
215.It Ic time
216Displays system time and date.
217.El
218.Sh FILES
219.Bl -tag -width /etc/boot.conf -compact
220.It Pa /usr/mdec/boot
221system bootstrap
222.It Pa /etc/boot.conf
223system bootstrap's startup file
224.It Pa /bsd
225kernel image
226.It Pa /bsd.rd
227kernel image for installation/recovery
228.El
229.Sh EXAMPLES
230Boot the default kernel:
231.Pp
232.Dl boot> boot
233.Pp
234Remove the 5 second pause at boot-time permanently, causing
235.Nm
236to load the kernel immediately without prompting:
237.Pp
238.Dl # echo \&"boot\&" > /etc/boot.conf
239.Pp
240Boot the kernel named
241.Pa /bsd
242from the second hard disk in
243.Dq User Kernel Configuration
244mode (see
245.Xr boot_config 8 ) .
246This mechanism allows for the explicit enabling and disabling of devices
247during the current boot sequence, as well as the modification
248of device parameters.
249Once booted, such changes can be made permanent by using
250.Xr config 8 Ns 's
251.Fl e
252option.
253.Pp
254.Dl boot> boot hd:/bsd -c
255.Sh SEE ALSO
256.Xr gzip 1 ,
257.Xr autoconf 4 ,
258.Xr ddb 4 ,
259.Xr boot_config 8 ,
260.Xr boot_macppc 8 ,
261.Xr fdisk 8 ,
262.Xr reboot 8
263.Sh HISTORY
264This program was written by Michael Shalayeff for
265.Ox 2.1
266on the i386 platform, and was later ported to the macppc platform.
267