xref: /openbsd/sys/arch/landisk/stand/boot/boot.8 (revision d415bd75)
1.\"	$OpenBSD: boot.8,v 1.13 2023/02/23 19:48: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: February 23 2023 $
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).
64Each time a kernel load fails, the timeout is increased by one second.
65The sequence of
66.Nm
67operations is as follows:
68.Bl -enum
69.It
70If the file
71.Pa /etc/boot.conf
72exists on the filesystem
73.Nm
74was loaded from, open and parse it.
75Lines beginning with the
76.Sq #
77character,
78as well as whitespace at the beginning of lines,
79are ignored.
80The file may contain any commands
81.Nm
82accepts at the interactive prompt.
83Though default settings usually suffice, they can be changed here.
84.\" XXX CHECK_SKIP_CONF is not defined...
85.\" .Pa boot.conf
86.\" processing can be skipped by holding down either Control key as
87.\" .Nm
88.\" starts.
89.It
90The header line
91.Pp
92.Dl >> OpenBSD/landisk BOOT [x.xx]
93.Pp
94is displayed to the active console, where
95.Ar x.xx
96is the version number of the
97.Nm
98program, followed by the
99.Pp
100.Dl boot>
101.Pp
102prompt, which means you are in interactive mode and may enter commands.
103If you do not,
104.Nm
105will proceed to load the kernel with the current parameters after the
106timeout period has expired.
107.El
108.Pp
109By default,
110.Nm
111attempts to load the kernel executable
112.Pa /bsd .
113If it fails to find the kernel and no alternative kernel image has
114been specified, the system will be unable to boot.
115.Sh COMMANDS
116The following commands are accepted at the
117.Nm
118prompt:
119.Bl -tag -width shorten
120.It Ic boot Oo Oo Ar device : Oc Ns Ar image Oc Op Fl acds
121Boots the specified kernel image
122with any options given.
123If
124.Ar device
125or
126.Ar image
127are omitted, values from
128.Nm
129variables will be used.
130.Pp
131The only bootable device, at the moment, is the internal IDE device (either a
132compactflash media or an ATA disk drive), and is named
133.Sq cf .
134Therefore, to boot kernel
135.Pa /bsd
136from
137.\" XXX no support for partition different from `a' yet...
138.\" slice
139.\" .Sq a
140.\" on
141the internal drive, specify
142.Dq boot cf:/bsd .
143.Bl -tag -width _a_
144.It Fl a
145Causes the kernel to ask for the
146.Nm root
147device to use.
148.It Fl c
149Causes the kernel to go into
150.Xr boot_config 8
151before performing
152.Xr autoconf 4
153procedures.
154.It Fl d
155Causes the kernel to drop into
156.Xr ddb 4
157at the earliest convenient point.
158.It Fl s
159Causes the kernel to boot single-user.
160.El
161.It Ic echo Op Ar args
162Displays
163.Ar args
164on the console device.
165.It Ic help
166Prints a list of available commands.
167.It Ic hexdump Ar addr size
168Show
169.Ar size
170bytes of memory at address
171.Ar addr .
172.It Ic ls Op Ar directory
173Prints contents of the specified
174.Ar directory
175in long format including: attributes and file type, owner, group,
176size, filename.
177.It Ic reboot
178Reboots the machine by initiating a warm boot procedure.
179.It Ic set Op Ar varname Op Ar value
180If invoked without arguments, prints a list of variables and their values.
181If only
182.Ar varname
183is specified, displays contents of that variable.
184If
185.Ar varname
186and
187.Ar value
188are both specified, sets that variable to the given value.
189Variables include:
190.Pp
191.Bl -tag -compact -width db_console
192.It Ic db_console
193Boolean (0 or 1) to permit entry into the kernel debugger before the
194.Em ddb.console
195sysctl gets effective.
196.It Ic debug
197Debug flag if
198.Nm
199was compiled with DEBUG defined.
200.\" XXX Useless until partitions are supported.
201.\" .It Nm device
202.\" Boot device name (e.g.,
203.\" .Li cf0a ,
204.\" .Li cf0d ) .
205.It Ic howto
206Options to pass to the loaded kernel.
207.It Ic image
208File name containing the kernel image.
209.It Ic timeout
210Number of seconds boot will wait for human intervention before
211booting the default kernel image.
212.It Ic time
213Displays system time and date.
214.El
215.Sh FILES
216.Bl -tag -width /usr/mdec/xxboot -compact
217.It Pa /boot
218system bootstrap
219.It Pa /etc/boot.conf
220system bootstrap's startup file
221.It Pa /bsd
222kernel image
223.It Pa /bsd.rd
224kernel image for installation/recovery
225.It Pa /usr/mdec/xxboot
226first stage bootstrap
227.El
228.Sh EXAMPLES
229Boot the default kernel:
230.Pp
231.Dl boot> boot
232.Pp
233Remove the 5 second pause at boot-time permanently, causing
234.Nm
235to load the kernel immediately without prompting:
236.Pp
237.Dl # echo \&"boot\&" > /etc/boot.conf
238.Pp
239Boot the kernel named
240.Pa /bsd.rd
241in
242.Dq User Kernel Configuration
243mode (see
244.Xr boot_config 8 ) .
245This mechanism allows for the explicit enabling and disabling of devices
246during the current boot sequence, as well as the modification
247of device parameters.
248Once booted, such changes can be made permanent by using
249.Xr config 8 Ns 's
250.Fl e
251option.
252.Pp
253.Dl boot> boot cf:/bsd.rd -c
254.Sh SEE ALSO
255.Xr gzip 1 ,
256.Xr autoconf 4 ,
257.Xr ddb 4 ,
258.Xr boot_config 8 ,
259.Xr fdisk 8 ,
260.Xr reboot 8 ,
261.Xr xxboot 8
262.Sh HISTORY
263This program was written by Michael Shalayeff for
264.Ox 4.1 .
265