xref: /openbsd/sys/arch/landisk/stand/boot/boot.8 (revision 8f2953bf)
1.\"	$OpenBSD: boot.8,v 1.12 2019/12/23 12:44:34 bluhm 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: December 23 2019 $
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 addr
193Address at which to load the kernel.
194.It Ic db_console
195Boolean (0 or 1) to permit entry into the kernel debugger before the
196.Em ddb.console
197sysctl gets effective.
198.It Ic debug
199Debug flag if
200.Nm
201was compiled with DEBUG defined.
202.\" XXX Useless until partitions are supported.
203.\" .It Nm device
204.\" Boot device name (e.g.,
205.\" .Li cf0a ,
206.\" .Li cf0d ) .
207.It Ic howto
208Options to pass to the loaded kernel.
209.It Ic image
210File name containing the kernel image.
211.It Ic timeout
212Number of seconds boot will wait for human intervention before
213booting the default kernel image.
214.\" .It Nm tty
215.\" Active console device name (e.g.,
216.\" .Li scif0 ) .
217.El
218.\" XXX although implemented, better leave it undocumented for now -- miod
219.\" .It stty Op Ar device Op Ar speed
220.\" Displays or sets the
221.\" .Ar speed
222.\" for a console
223.\" .Ar device .
224.\" If changing the baudrate for the currently active console,
225.\" .Nm
226.\" offers you five seconds of grace time before committing the change
227.\" to allow you to change your terminal's speed to match.
228.\" If changing speed
229.\" .Em not
230.\" for the active console, the baudrate is set for the
231.\" .Em next
232.\" time you switch to a serial console.
233.\" .Pp
234.\" The default baudrate is 9600bps.
235.It Ic time
236Displays system time and date.
237.El
238.Sh FILES
239.Bl -tag -width /usr/mdec/xxboot -compact
240.It Pa /boot
241system bootstrap
242.It Pa /etc/boot.conf
243system bootstrap's startup file
244.It Pa /bsd
245kernel image
246.It Pa /bsd.rd
247kernel image for installation/recovery
248.It Pa /usr/mdec/xxboot
249first stage bootstrap
250.El
251.Sh EXAMPLES
252Boot the default kernel:
253.Pp
254.Dl boot> boot
255.Pp
256Remove the 5 second pause at boot-time permanently, causing
257.Nm
258to load the kernel immediately without prompting:
259.Pp
260.Dl # echo \&"boot\&" > /etc/boot.conf
261.Pp
262Boot the kernel named
263.Pa /bsd.rd
264in
265.Dq User Kernel Configuration
266mode (see
267.Xr boot_config 8 ) .
268This mechanism allows for the explicit enabling and disabling of devices
269during the current boot sequence, as well as the modification
270of device parameters.
271Once booted, such changes can be made permanent by using
272.Xr config 8 Ns 's
273.Fl e
274option.
275.Pp
276.Dl boot> boot cf:/bsd.rd -c
277.Sh SEE ALSO
278.Xr gzip 1 ,
279.Xr autoconf 4 ,
280.Xr ddb 4 ,
281.Xr boot_config 8 ,
282.Xr fdisk 8 ,
283.Xr reboot 8 ,
284.Xr xxboot 8
285.Sh HISTORY
286This program was written by Michael Shalayeff for
287.Ox 4.1 .
288