xref: /netbsd-src/share/man/man8/boot.8 (revision 99f13c162d27669b6dc9ebb1777726d2c5a5730f)
1*99f13c16Swiz.\"	$NetBSD: boot.8,v 1.16 2017/02/18 21:47:11 wiz Exp $
26a55f622Selad.\"
36a55f622Selad.\" Copyright (c) 1991, 1993
46a55f622Selad.\"	The Regents of the University of California.  All rights reserved.
56a55f622Selad.\"
66a55f622Selad.\" This code is derived from software written and contributed
76a55f622Selad.\" to Berkeley by William Jolitz.
86a55f622Selad.\"
96a55f622Selad.\" Redistribution and use in source and binary forms, with or without
106a55f622Selad.\" modification, are permitted provided that the following conditions
116a55f622Selad.\" are met:
126a55f622Selad.\" 1. Redistributions of source code must retain the above copyright
136a55f622Selad.\"    notice, this list of conditions and the following disclaimer.
146a55f622Selad.\" 2. Redistributions in binary form must reproduce the above copyright
156a55f622Selad.\"    notice, this list of conditions and the following disclaimer in the
166a55f622Selad.\"    documentation and/or other materials provided with the distribution.
176a55f622Selad.\" 3. Neither the name of the University nor the names of its contributors
186a55f622Selad.\"    may be used to endorse or promote products derived from this software
196a55f622Selad.\"    without specific prior written permission.
206a55f622Selad.\"
216a55f622Selad.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
226a55f622Selad.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
236a55f622Selad.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
246a55f622Selad.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
256a55f622Selad.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
266a55f622Selad.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
276a55f622Selad.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
286a55f622Selad.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
296a55f622Selad.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
306a55f622Selad.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
316a55f622Selad.\" SUCH DAMAGE.
326a55f622Selad.\"
336a55f622Selad.\"     @(#)boot_i386.8	8.2 (Berkeley) 4/19/94
346a55f622Selad.\"
35f80fae76Sapb.Dd August 16, 2014
364ed89c84Sapb.Dt BOOT 8
37997634feSjoerg.Os
386a55f622Selad.Sh NAME
396a55f622Selad.Nm boot
406a55f622Selad.Nd
416a55f622Seladsystem bootstrapping procedures
426a55f622Selad.Sh DESCRIPTION
436a55f622SeladThis document provides information on using common features in the
446a55f622Selad.Nx
456a55f622Seladboot loader.
464ed89c84SapbAdditional information may be found in
474ed89c84Sapbarchitecture-specific
484ed89c84Sapb.Xr boot 8
494ed89c84Sapbmanual pages.
50e73191e1Sapb.Ss Boot Protocol
51c0429081SapbIn the native
52c0429081Sapb.Nx
53c0429081Sapbboot protocol, options are passed from the boot loader
54c0429081Sapbto the kernel via flag bits in the
55c0429081Sapb.Va boothowto
56a9dda51fSapbvariable (see
57a9dda51fSapb.Xr boothowto 9 ) .
58e73191e1SapbSome boot loaders may also support other boot protocols.
59e73191e1Sapb.Ss Menu
60e73191e1SapbSome boot loaders may present a menu, which may be configured via
61e73191e1Sapb.Xr boot.cfg 5 .
626a55f622Selad.Ss Interactive mode
636a55f622SeladIn interactive mode, the boot loader will present a prompt, allowing
646a55f622Seladinput of these commands:
654ed89c84Sapb.\" NOTE: much of this text is duplicated in architecture-specific
664ed89c84Sapb.\" man pages (man8/man8.*/*boot*.8);
674ed89c84Sapb.\" please try to keep all relevant files synchronized.
686a55f622Selad.Bl -tag -width 04n -offset 04n
69f80fae76Sapb.It Ic boot Oo Va device : Oc Ns Oo Va filename Oc Oo Fl 1234abcdmqsvxz Oc
706a55f622SeladThe default
716a55f622Selad.Va device
726a55f622Seladwill be set to the disk that the boot loader was
736a55f622Seladloaded from.
746a55f622SeladTo boot from an alternate disk, the full name of the device should
756a55f622Seladbe given at the prompt.
766a55f622Selad.Va device
776a55f622Seladis of the form
786a55f622Selad.Xo Va xd
796a55f622Selad.Op Va N Ns Op Va x
806a55f622Selad.Xc
816a55f622Seladwhere
826a55f622Selad.Va xd
836a55f622Seladis the device from which to boot,
846a55f622Selad.Va N
856a55f622Seladis the unit number, and
866a55f622Selad.Va x
876a55f622Seladis the partition letter.
886a55f622Selad.Pp
896a55f622SeladThe following list of supported devices may vary from installation to
906a55f622Seladinstallation:
916a55f622Selad.Pp
926a55f622Selad.Bl -hang -compact
936a55f622Selad.It hd
946a55f622SeladHard disks.
956a55f622Selad.It fd
966a55f622SeladFloppy drives.
976a55f622Selad.El
986a55f622Selad.Pp
996a55f622SeladThe default
1006a55f622Selad.Va filename
1016a55f622Seladis
1026a55f622Selad.Pa netbsd ;
1036a55f622Seladif the boot loader fails to successfully
1046a55f622Seladopen that image, it then tries
1056a55f622Selad.Pa netbsd.gz
1066a55f622Selad(expected to be a kernel image compressed by gzip), followed by
1076a55f622Selad.Pa netbsd.old ,
1086a55f622Selad.Pa netbsd.old.gz ,
1096a55f622Selad.Pa onetbsd ,
1106a55f622Seladand finally
1116a55f622Selad.Pa onetbsd.gz .
1126a55f622SeladAlternate system images can be loaded by just specifying the name of the image.
1136a55f622Selad.Pp
1146a55f622SeladOptions are:
1156a55f622Selad.Bl -tag -width xxx
116c0429081Sapb.It Fl 1
117c0429081SapbSets the machine-dependent flag
118c0429081Sapb.Sy RB_MD1
119c0429081Sapbin
120c0429081Sapb.Va boothowto .
121c0429081Sapb.It Fl 2
122c0429081SapbSets the machine-dependent flag
123c0429081Sapb.Sy RB_MD2
124c0429081Sapbin
125c0429081Sapb.Va boothowto .
126c0429081Sapb.It Fl 3
127c0429081SapbSets the machine-dependent flag
128c0429081Sapb.Sy RB_MD3
129c0429081Sapbin
130c0429081Sapb.Va boothowto .
131c0429081Sapb.It Fl 4
132c0429081SapbSets the machine-dependent flag
133c0429081Sapb.Sy RB_MD4
134c0429081Sapbin
135c0429081Sapb.Va boothowto .
1366a55f622Selad.It Fl a
137c0429081SapbSets the
138c0429081Sapb.Sy RB_ASKNAME
139c0429081Sapbflag in
140c0429081Sapb.Va boothowto .
141c0429081SapbThis causes the kernel to prompt for the root file system device,
142c0429081Sapbthe system crash dump device, and the path to
1436a55f622Selad.Xr init 8 .
144c0429081Sapb.It Fl b
145c0429081SapbSets the
146c0429081Sapb.Sy RB_HALT
147c0429081Sapbflag in
148c0429081Sapb.Va boothowto .
149c0429081SapbThis causes subsequent reboot attempts to halt instead of rebooting.
1506a55f622Selad.It Fl c
151c0429081SapbSets the
152c0429081Sapb.Sy RB_USERCONF
153c0429081Sapbflag in
154c0429081Sapb.Va boothowto .
155b6f5a7e6SapbThis causes the kernel to enter the
156b6f5a7e6Sapb.Xr userconf 4
157b6f5a7e6Sapbdevice configuration manager as soon as possible during the boot.
158b6f5a7e6Sapb.Xr userconf 4
159b6f5a7e6Sapballows devices to be enabled or disabled, and allows device locators
160b6f5a7e6Sapb(such as hardware addresses or bus numbers)
161b6f5a7e6Sapbto be modified before the kernel attempts to attach the devices.
1626a55f622Selad.It Fl d
163c0429081SapbSets the
164c0429081Sapb.Sy RB_KDB
165c0429081Sapbflag in
166c0429081Sapb.Va boothowto .
167c0429081SapbRequests the kernel to enter debug mode, in which it
168c0429081Sapbwaits for a connection from a kernel debugger; see
1696a55f622Selad.Xr ddb 4 .
170c0429081Sapb.It Fl m
171c0429081SapbSets the
172c0429081Sapb.Sy RB_MINIROOT
173c0429081Sapbflag in
174c0429081Sapb.Va boothowto .
175c0429081SapbInforms the kernel that a mini-root file system is present in memory.
1766a55f622Selad.It Fl q
177c0429081SapbSets the
178c0429081Sapb.Sy AB_QUIET
179c0429081Sapbflag in
180c0429081Sapb.Va boothowto .
1816a55f622SeladBoot the system in quiet mode.
1826a55f622Selad.It Fl s
183c0429081SapbSets the
184c0429081Sapb.Sy RB_SINGLE
185c0429081Sapbflag in
186c0429081Sapb.Va boothowto .
187c0429081SapbBoot the system in single-user mode.
1886a55f622Selad.It Fl v
189c0429081SapbSets the
190c0429081Sapb.Sy AB_VERBOSE
191c0429081Sapbflag in
192c0429081Sapb.Va boothowto .
1936a55f622SeladBoot the system in verbose mode.
194ec441ebbSjmcneill.It Fl x
195c0429081SapbSets the
196c0429081Sapb.Sy AB_DEBUG
197c0429081Sapbflag in
198c0429081Sapb.Va boothowto .
199ec441ebbSjmcneillBoot the system with debug messages enabled.
20090727c99Sjmcneill.It Fl z
201c0429081SapbSets the
202c0429081Sapb.Sy AB_SILENT
203c0429081Sapbflag in
204c0429081Sapb.Va boothowto .
20590727c99SjmcneillBoot the system in silent mode.
2066a55f622Selad.El
2076a55f622Selad.It Ic consdev Va dev
2086a55f622SeladImmediately switch the console to the specified device
2096a55f622Selad.Va dev
2106a55f622Seladand reprint the banner.
2116a55f622Selad.Va dev
2126a55f622Seladmust be one of
2136a55f622Selad.\" .Bl -item -width com[0123]kbd -offset indent -compact
2146a55f622Selad.Ar pc , com0 , com1 , com2 ,
2156a55f622Selad.Ar com3 , com0kbd , com1kbd , com2kbd ,
2166a55f622Selad.Ar com3kbd ,
2176a55f622Selador
2186a55f622Selad.Ar auto .
2196a55f622SeladSee
2206a55f622Selad.Sx Console Selection Policy
2216a55f622Seladin
222*99f13c16Swiz.Xr x86/boot_console 8 .
2236a55f622Selad.It Ic dev Op Va device
2246a55f622SeladSet the default drive and partition for subsequent filesystem
2252a3af1daSwizoperations.
2262a3af1daSwizWithout an argument, print the current setting.
2276a55f622Selad.Va device
2286a55f622Seladis of the form specified in
2296a55f622Selad.Cm boot .
2306a55f622Selad.It Ic help
2316a55f622SeladPrint an overview about commands and arguments.
232c0429081Sapb.\" .It Ic load Va module Op Va arguments
233e73191e1Sapb.\" [x86 only]
2346a55f622Selad.It Ic ls Op Pa path
2356a55f622SeladPrint a directory listing of
2366a55f622Selad.Pa path ,
2372a3af1daSwizcontaining inode number, filename, and file type.
2386a55f622Selad.Pa path
2396a55f622Seladcan contain a device specification.
240c0429081Sapb.\" .It Ic multiboot Va kernel Op Va arguments
241e73191e1Sapb.\" [x86 only]
2426a55f622Selad.It Ic quit
2436a55f622SeladReboot the system.
244e73191e1Sapb.\" .It Ic userconf Va command
245e73191e1Sapb.\" [x86only]
2466a55f622Selad.El
2476a55f622Selad.Pp
2486a55f622SeladIn an emergency, the bootstrap methods described in the
2496a55f622Selad.Nx
2506a55f622Seladinstallation notes for the specific architecture
2516a55f622Seladcan be used.
2526a55f622Selad.Sh FILES
2536a55f622Selad.Bl -tag -width /usr/mdec/bootxx_fstype -compact
2546a55f622Selad.It Pa /boot
2556a55f622Seladboot program code loaded by the primary bootstrap
2564ed89c84Sapb.\" .It Pa /boot.cfg
2574ed89c84Sapb.\" optional configuration file
258e73191e1Sapb.\" [x86 only]
2596a55f622Selad.It Pa /netbsd
2606a55f622Seladsystem code
2616a55f622Selad.It Pa /netbsd.gz
2626a55f622Seladgzip-compressed system code
2636a55f622Selad.It Pa /usr/mdec/boot
2646a55f622Seladmaster copy of the boot program (copy to /boot)
2656a55f622Selad.It Pa /usr/mdec/bootxx_fstype
2666a55f622Seladprimary bootstrap for filesystem type fstype, copied to the start of
2672a3af1daSwizthe
2682a3af1daSwiz.Nx
2692a3af1daSwizpartition by
2706a55f622Selad.Xr installboot 8 .
2716a55f622Selad.El
2726a55f622Selad.Sh SEE ALSO
2734ed89c84SapbArchitecture-specific
2744ed89c84Sapb.Xr boot 8
2757138b5e9Sapbmanual pages (such as
2767138b5e9Sapb.Xr emips/boot 8 ,
2777138b5e9Sapb.Xr sparc64/boot 8 ,
2787138b5e9Sapb.Xr x86/boot 8 ) ,
2796a55f622Selad.Xr ddb 4 ,
2806a55f622Selad.Xr userconf 4 ,
281e73191e1Sapb.\" .Xr boot.cfg 5 [x86 only] ,
2826a55f622Selad.Xr halt 8 ,
2836a55f622Selad.Xr installboot 8 ,
2846a55f622Selad.Xr reboot 8 ,
285ddd1724fSlukem.Xr rescue 8 ,
286a9dda51fSapb.Xr shutdown 8 ,
287a9dda51fSapb.Xr boothowto 9
2884ed89c84Sapb.Sh BUGS
289c0429081SapbThe kernel file name must be specified before, not after, the boot options.
2906a55f622SeladAny
2916a55f622Selad.Ar filename
2926a55f622Seladspecified after the boot options, e.g.:
2936a55f622Selad.Pp
2946a55f622Selad.Bd -unfilled -offset indent -compact
2956a55f622Selad.Cm boot -d netbsd.test
2966a55f622Selad.Ed
2976a55f622Selad.Pp
2986a55f622Seladis ignored, and the default kernel is booted.
299