xref: /netbsd-src/share/man/man8/boot.8 (revision 99f13c162d27669b6dc9ebb1777726d2c5a5730f)
1.\"	$NetBSD: boot.8,v 1.16 2017/02/18 21:47:11 wiz Exp $
2.\"
3.\" Copyright (c) 1991, 1993
4.\"	The Regents of the University of California.  All rights reserved.
5.\"
6.\" This code is derived from software written and contributed
7.\" to Berkeley by William Jolitz.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\" 3. Neither the name of the University nor the names of its contributors
18.\"    may be used to endorse or promote products derived from this software
19.\"    without specific prior written permission.
20.\"
21.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31.\" SUCH DAMAGE.
32.\"
33.\"     @(#)boot_i386.8	8.2 (Berkeley) 4/19/94
34.\"
35.Dd August 16, 2014
36.Dt BOOT 8
37.Os
38.Sh NAME
39.Nm boot
40.Nd
41system bootstrapping procedures
42.Sh DESCRIPTION
43This document provides information on using common features in the
44.Nx
45boot loader.
46Additional information may be found in
47architecture-specific
48.Xr boot 8
49manual pages.
50.Ss Boot Protocol
51In the native
52.Nx
53boot protocol, options are passed from the boot loader
54to the kernel via flag bits in the
55.Va boothowto
56variable (see
57.Xr boothowto 9 ) .
58Some boot loaders may also support other boot protocols.
59.Ss Menu
60Some boot loaders may present a menu, which may be configured via
61.Xr boot.cfg 5 .
62.Ss Interactive mode
63In interactive mode, the boot loader will present a prompt, allowing
64input of these commands:
65.\" NOTE: much of this text is duplicated in architecture-specific
66.\" man pages (man8/man8.*/*boot*.8);
67.\" please try to keep all relevant files synchronized.
68.Bl -tag -width 04n -offset 04n
69.It Ic boot Oo Va device : Oc Ns Oo Va filename Oc Oo Fl 1234abcdmqsvxz Oc
70The default
71.Va device
72will be set to the disk that the boot loader was
73loaded from.
74To boot from an alternate disk, the full name of the device should
75be given at the prompt.
76.Va device
77is of the form
78.Xo Va xd
79.Op Va N Ns Op Va x
80.Xc
81where
82.Va xd
83is the device from which to boot,
84.Va N
85is the unit number, and
86.Va x
87is the partition letter.
88.Pp
89The following list of supported devices may vary from installation to
90installation:
91.Pp
92.Bl -hang -compact
93.It hd
94Hard disks.
95.It fd
96Floppy drives.
97.El
98.Pp
99The default
100.Va filename
101is
102.Pa netbsd ;
103if the boot loader fails to successfully
104open that image, it then tries
105.Pa netbsd.gz
106(expected to be a kernel image compressed by gzip), followed by
107.Pa netbsd.old ,
108.Pa netbsd.old.gz ,
109.Pa onetbsd ,
110and finally
111.Pa onetbsd.gz .
112Alternate system images can be loaded by just specifying the name of the image.
113.Pp
114Options are:
115.Bl -tag -width xxx
116.It Fl 1
117Sets the machine-dependent flag
118.Sy RB_MD1
119in
120.Va boothowto .
121.It Fl 2
122Sets the machine-dependent flag
123.Sy RB_MD2
124in
125.Va boothowto .
126.It Fl 3
127Sets the machine-dependent flag
128.Sy RB_MD3
129in
130.Va boothowto .
131.It Fl 4
132Sets the machine-dependent flag
133.Sy RB_MD4
134in
135.Va boothowto .
136.It Fl a
137Sets the
138.Sy RB_ASKNAME
139flag in
140.Va boothowto .
141This causes the kernel to prompt for the root file system device,
142the system crash dump device, and the path to
143.Xr init 8 .
144.It Fl b
145Sets the
146.Sy RB_HALT
147flag in
148.Va boothowto .
149This causes subsequent reboot attempts to halt instead of rebooting.
150.It Fl c
151Sets the
152.Sy RB_USERCONF
153flag in
154.Va boothowto .
155This causes the kernel to enter the
156.Xr userconf 4
157device configuration manager as soon as possible during the boot.
158.Xr userconf 4
159allows devices to be enabled or disabled, and allows device locators
160(such as hardware addresses or bus numbers)
161to be modified before the kernel attempts to attach the devices.
162.It Fl d
163Sets the
164.Sy RB_KDB
165flag in
166.Va boothowto .
167Requests the kernel to enter debug mode, in which it
168waits for a connection from a kernel debugger; see
169.Xr ddb 4 .
170.It Fl m
171Sets the
172.Sy RB_MINIROOT
173flag in
174.Va boothowto .
175Informs the kernel that a mini-root file system is present in memory.
176.It Fl q
177Sets the
178.Sy AB_QUIET
179flag in
180.Va boothowto .
181Boot the system in quiet mode.
182.It Fl s
183Sets the
184.Sy RB_SINGLE
185flag in
186.Va boothowto .
187Boot the system in single-user mode.
188.It Fl v
189Sets the
190.Sy AB_VERBOSE
191flag in
192.Va boothowto .
193Boot the system in verbose mode.
194.It Fl x
195Sets the
196.Sy AB_DEBUG
197flag in
198.Va boothowto .
199Boot the system with debug messages enabled.
200.It Fl z
201Sets the
202.Sy AB_SILENT
203flag in
204.Va boothowto .
205Boot the system in silent mode.
206.El
207.It Ic consdev Va dev
208Immediately switch the console to the specified device
209.Va dev
210and reprint the banner.
211.Va dev
212must be one of
213.\" .Bl -item -width com[0123]kbd -offset indent -compact
214.Ar pc , com0 , com1 , com2 ,
215.Ar com3 , com0kbd , com1kbd , com2kbd ,
216.Ar com3kbd ,
217or
218.Ar auto .
219See
220.Sx Console Selection Policy
221in
222.Xr x86/boot_console 8 .
223.It Ic dev Op Va device
224Set the default drive and partition for subsequent filesystem
225operations.
226Without an argument, print the current setting.
227.Va device
228is of the form specified in
229.Cm boot .
230.It Ic help
231Print an overview about commands and arguments.
232.\" .It Ic load Va module Op Va arguments
233.\" [x86 only]
234.It Ic ls Op Pa path
235Print a directory listing of
236.Pa path ,
237containing inode number, filename, and file type.
238.Pa path
239can contain a device specification.
240.\" .It Ic multiboot Va kernel Op Va arguments
241.\" [x86 only]
242.It Ic quit
243Reboot the system.
244.\" .It Ic userconf Va command
245.\" [x86only]
246.El
247.Pp
248In an emergency, the bootstrap methods described in the
249.Nx
250installation notes for the specific architecture
251can be used.
252.Sh FILES
253.Bl -tag -width /usr/mdec/bootxx_fstype -compact
254.It Pa /boot
255boot program code loaded by the primary bootstrap
256.\" .It Pa /boot.cfg
257.\" optional configuration file
258.\" [x86 only]
259.It Pa /netbsd
260system code
261.It Pa /netbsd.gz
262gzip-compressed system code
263.It Pa /usr/mdec/boot
264master copy of the boot program (copy to /boot)
265.It Pa /usr/mdec/bootxx_fstype
266primary bootstrap for filesystem type fstype, copied to the start of
267the
268.Nx
269partition by
270.Xr installboot 8 .
271.El
272.Sh SEE ALSO
273Architecture-specific
274.Xr boot 8
275manual pages (such as
276.Xr emips/boot 8 ,
277.Xr sparc64/boot 8 ,
278.Xr x86/boot 8 ) ,
279.Xr ddb 4 ,
280.Xr userconf 4 ,
281.\" .Xr boot.cfg 5 [x86 only] ,
282.Xr halt 8 ,
283.Xr installboot 8 ,
284.Xr reboot 8 ,
285.Xr rescue 8 ,
286.Xr shutdown 8 ,
287.Xr boothowto 9
288.Sh BUGS
289The kernel file name must be specified before, not after, the boot options.
290Any
291.Ar filename
292specified after the boot options, e.g.:
293.Pp
294.Bd -unfilled -offset indent -compact
295.Cm boot -d netbsd.test
296.Ed
297.Pp
298is ignored, and the default kernel is booted.
299