xref: /openbsd-src/sys/arch/landisk/stand/boot/boot.8 (revision bf205b9638c7c57bbb1ea133d350e2e30f2ccf83)
1.\"	$OpenBSD: boot.8,v 1.14 2024/11/05 09:42:48 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 landisk
30.Os
31.Sh NAME
32.Nm boot ,
33.Nm boot.conf
34.Nd landisk-specific second-stage bootstrap
35.Sh DESCRIPTION
36The main purpose of this program is to load the system kernel from the
37root file system of the machine.
38.Pp
39This program is loaded by the
40.Xr xxboot 8
41primary bootstrap loader and provides a convenient way to load the kernel.
42This program acts as an enhanced boot monitor for landisk systems, providing
43a common interface for the kernel to start from.
44.Pp
45Basic operations include:
46.Pp
47.Bl -bullet -compact
48.It
49Loading kernels from any device supported by your system firmware.
50.It
51Loading kernels compressed by
52.Xr gzip 1 .
53.It
54Providing an interactive command line.
55.El
56.Pp
57The sequence of its operation is as follows: initialization,
58parsing the configuration file, then an interactive command line.
59While at the command line you have 5 seconds to type any commands, if needed.
60If time expires, the kernel will be loaded according to
61the current variable settings (see the
62.Ic set
63command).
64If the kernel load fails, a second attempt is made with the timeout increased
65by one second.
66The sequence of
67.Nm
68operations is as follows:
69.Bl -enum
70.It
71If the file
72.Pa /etc/boot.conf
73exists on the filesystem
74.Nm
75was loaded from, open and parse it.
76Lines beginning with the
77.Sq #
78character,
79as well as whitespace at the beginning of lines,
80are ignored.
81The file may contain any commands
82.Nm
83accepts at the interactive prompt.
84Though default settings usually suffice, they can be changed here.
85.\" XXX CHECK_SKIP_CONF is not defined...
86.\" .Pa boot.conf
87.\" processing can be skipped by holding down either Control key as
88.\" .Nm
89.\" starts.
90.It
91The header line
92.Pp
93.Dl >> OpenBSD/landisk BOOT [x.xx]
94.Pp
95is displayed to the active console, where
96.Ar x.xx
97is the version number of the
98.Nm
99program, followed by the
100.Pp
101.Dl boot>
102.Pp
103prompt, which means you are in interactive mode and may enter commands.
104If you do not,
105.Nm
106will proceed to load the kernel with the current parameters after the
107timeout period has expired.
108.El
109.Pp
110By default,
111.Nm
112attempts to load the kernel executable
113.Pa /bsd .
114If it fails to find the kernel and no alternative kernel image has
115been specified, the system will be unable to boot.
116.Sh COMMANDS
117The following commands are accepted at the
118.Nm
119prompt:
120.Bl -tag -width shorten
121.It Ic boot Oo Oo Ar device : Oc Ns Ar image Oc Op Fl acds
122Boots the specified kernel image
123with any options given.
124If
125.Ar device
126or
127.Ar image
128are omitted, values from
129.Nm
130variables will be used.
131.Pp
132The only bootable device, at the moment, is the internal IDE device (either a
133compactflash media or an ATA disk drive), and is named
134.Sq cf .
135Therefore, to boot kernel
136.Pa /bsd
137from
138.\" XXX no support for partition different from `a' yet...
139.\" slice
140.\" .Sq a
141.\" on
142the internal drive, specify
143.Dq boot cf:/bsd .
144.Bl -tag -width _a_
145.It Fl a
146Causes the kernel to ask for the
147.Nm root
148device to use.
149.It Fl c
150Causes the kernel to go into
151.Xr boot_config 8
152before performing
153.Xr autoconf 4
154procedures.
155.It Fl d
156Causes the kernel to drop into
157.Xr ddb 4
158at the earliest convenient point.
159.It Fl s
160Causes the kernel to boot single-user.
161.El
162.It Ic echo Op Ar args
163Displays
164.Ar args
165on the console device.
166.It Ic help
167Prints a list of available commands.
168.It Ic hexdump Ar addr size
169Show
170.Ar size
171bytes of memory at address
172.Ar addr .
173.It Ic ls Op Ar directory
174Prints contents of the specified
175.Ar directory
176in long format including: attributes and file type, owner, group,
177size, filename.
178.It Ic reboot
179Reboots the machine by initiating a warm boot procedure.
180.It Ic set Op Ar varname Op Ar value
181If invoked without arguments, prints a list of variables and their values.
182If only
183.Ar varname
184is specified, displays contents of that variable.
185If
186.Ar varname
187and
188.Ar value
189are both specified, sets that variable to the given value.
190Variables include:
191.Pp
192.Bl -tag -compact -width db_console
193.It Ic db_console
194Boolean (0 or 1) to permit entry into the kernel debugger before the
195.Em ddb.console
196sysctl gets effective.
197.It Ic debug
198Debug flag if
199.Nm
200was compiled with DEBUG defined.
201.\" XXX Useless until partitions are supported.
202.\" .It Nm device
203.\" Boot device name (e.g.,
204.\" .Li cf0a ,
205.\" .Li cf0d ) .
206.It Ic howto
207Options to pass to the loaded kernel.
208.It Ic image
209File name containing the kernel image.
210.It Ic timeout
211Number of seconds boot will wait for human intervention before
212booting the default kernel image.
213.It Ic time
214Displays system time and date.
215.El
216.Sh FILES
217.Bl -tag -width /usr/mdec/xxboot -compact
218.It Pa /boot
219system bootstrap
220.It Pa /etc/boot.conf
221system bootstrap's startup file
222.It Pa /bsd
223kernel image
224.It Pa /bsd.rd
225kernel image for installation/recovery
226.It Pa /usr/mdec/xxboot
227first stage bootstrap
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.rd
242in
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 cf:/bsd.rd -c
255.Sh SEE ALSO
256.Xr gzip 1 ,
257.Xr autoconf 4 ,
258.Xr ddb 4 ,
259.Xr boot_config 8 ,
260.Xr fdisk 8 ,
261.Xr reboot 8 ,
262.Xr xxboot 8
263.Sh HISTORY
264This program was written by Michael Shalayeff for
265.Ox 4.1 .
266