xref: /openbsd/sys/arch/landisk/stand/boot/boot.8 (revision ff5a8bab)
1.\"	$OpenBSD: boot.8,v 1.9 2019/01/02 21:20:41 anton 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: January 2 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 ls Op Ar directory
168Prints contents of the specified
169.Ar directory
170in long format including: attributes and file type, owner, group,
171size, filename.
172.It Ic reboot
173Reboots the machine by initiating a warm boot procedure.
174.It Ic set Op Ar varname Op Ar value
175If invoked without arguments, prints a list of variables and their values.
176If only
177.Ar varname
178is specified, displays contents of that variable.
179If
180.Ar varname
181and
182.Ar value
183are both specified, sets that variable to the given value.
184Variables include:
185.Pp
186.Bl -tag -compact -width boothow
187.It Ic addr
188Address at which to load the kernel.
189.It Ic debug
190Debug flag if
191.Nm
192was compiled with DEBUG defined.
193.\" XXX Useless until partitions are supported.
194.\" .It Nm device
195.\" Boot device name (e.g.,
196.\" .Li cf0a ,
197.\" .Li cf0d ) .
198.It Ic howto
199Options to pass to the loaded kernel.
200.It Ic image
201File name containing the kernel image.
202.It Ic timeout
203Number of seconds boot will wait for human intervention before
204booting the default kernel image.
205.\" .It Nm tty
206.\" Active console device name (e.g.,
207.\" .Li scif0 ) .
208.El
209.\" XXX although implemented, better leave it undocumented for now -- miod
210.\" .It stty Op Ar device Op Ar speed
211.\" Displays or sets the
212.\" .Ar speed
213.\" for a console
214.\" .Ar device .
215.\" If changing the baudrate for the currently active console,
216.\" .Nm
217.\" offers you five seconds of grace time before committing the change
218.\" to allow you to change your terminal's speed to match.
219.\" If changing speed
220.\" .Em not
221.\" for the active console, the baudrate is set for the
222.\" .Em next
223.\" time you switch to a serial console.
224.\" .Pp
225.\" The default baudrate is 9600bps.
226.It Ic time
227Displays system time and date.
228.El
229.Sh FILES
230.Bl -tag -width /usr/mdec/xxboot -compact
231.It Pa /boot
232system bootstrap
233.It Pa /etc/boot.conf
234system bootstrap's startup file
235.It Pa /bsd
236kernel image
237.It Pa /bsd.rd
238kernel image for installation/recovery
239.It Pa /usr/mdec/xxboot
240first stage bootstrap
241.El
242.Sh EXAMPLES
243Boot the default kernel:
244.Pp
245.Dl boot> boot
246.Pp
247Remove the 5 second pause at boot-time permanently, causing
248.Nm
249to load the kernel immediately without prompting:
250.Pp
251.Dl # echo \&"boot\&" > /etc/boot.conf
252.Pp
253Boot the kernel named
254.Pa /bsd.rd
255in
256.Dq User Kernel Configuration
257mode (see
258.Xr boot_config 8 ) .
259This mechanism allows for the explicit enabling and disabling of devices
260during the current boot sequence, as well as the modification
261of device parameters.
262Once booted, such changes can be made permanent by using
263.Xr config 8 Ns 's
264.Fl e
265option.
266.Pp
267.Dl boot> boot cf:/bsd.rd -c
268.Sh SEE ALSO
269.Xr gzip 1 ,
270.Xr autoconf 4 ,
271.Xr ddb 4 ,
272.Xr boot_config 8 ,
273.Xr fdisk 8 ,
274.Xr reboot 8 ,
275.Xr xxboot 8
276.Sh HISTORY
277This program was written by Michael Shalayeff for
278.Ox 4.1 .
279