xref: /freebsd/sbin/reboot/boot_i386.8 (revision 8dfcea8cc10e234fa62966dc11f54b72ee03d05e)
18fae3551SRodney W. Grimes.\" Copyright (c) 1991, 1993
28fae3551SRodney W. Grimes.\"	The Regents of the University of California.  All rights reserved.
38fae3551SRodney W. Grimes.\"
48fae3551SRodney W. Grimes.\" This code is derived from software written and contributed
58fae3551SRodney W. Grimes.\" to Berkeley by William Jolitz.
68fae3551SRodney W. Grimes.\"
7d16b647eSJoerg Wunsch.\" Almost completely rewritten for FreeBSD 2.1 by Joerg Wunsch.
8d16b647eSJoerg Wunsch.\"
98fae3551SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without
108fae3551SRodney W. Grimes.\" modification, are permitted provided that the following conditions
118fae3551SRodney W. Grimes.\" are met:
128fae3551SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright
138fae3551SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer.
148fae3551SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright
158fae3551SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer in the
168fae3551SRodney W. Grimes.\"    documentation and/or other materials provided with the distribution.
178fae3551SRodney W. Grimes.\" 3. All advertising materials mentioning features or use of this software
188fae3551SRodney W. Grimes.\"    must display the following acknowledgement:
198fae3551SRodney W. Grimes.\"	This product includes software developed by the University of
208fae3551SRodney W. Grimes.\"	California, Berkeley and its contributors.
218fae3551SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors
228fae3551SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
238fae3551SRodney W. Grimes.\"    without specific prior written permission.
248fae3551SRodney W. Grimes.\"
258fae3551SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
268fae3551SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
278fae3551SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
288fae3551SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
298fae3551SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
308fae3551SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
318fae3551SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
328fae3551SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
338fae3551SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
348fae3551SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
358fae3551SRodney W. Grimes.\" SUCH DAMAGE.
368fae3551SRodney W. Grimes.\"
378fae3551SRodney W. Grimes.\"     @(#)boot_i386.8	8.2 (Berkeley) 4/19/94
388fae3551SRodney W. Grimes.\"
398dfcea8cSRobert Nordier.\" $Id: boot_i386.8,v 1.15 1999/01/06 14:19:09 rnordier Exp $
40d16b647eSJoerg Wunsch.\"
418fae3551SRodney W. Grimes.Dd April 19, 1994
428fae3551SRodney W. Grimes.Dt BOOT 8 i386
438fae3551SRodney W. Grimes.Os
448fae3551SRodney W. Grimes.Sh NAME
458fae3551SRodney W. Grimes.Nm boot
468fae3551SRodney W. Grimes.Nd
478fae3551SRodney W. Grimessystem bootstrapping procedures
488fae3551SRodney W. Grimes.Sh DESCRIPTION
498fae3551SRodney W. Grimes.Sy Power fail and crash recovery.
508fae3551SRodney W. GrimesNormally, the system will reboot itself at power-up or after crashes.
518fae3551SRodney W. GrimesAn automatic consistency check of the file systems will be performed,
528fae3551SRodney W. Grimesand unless this fails, the system will resume multi-user operations.
538fae3551SRodney W. Grimes.Pp
548fae3551SRodney W. Grimes.Sy Cold starts.
558dfcea8cSRobert NordierMost i386 PCs attempt to boot first from floppy disk drive 0 (sometimes
568dfcea8cSRobert Nordierknown as drive A:) and, failing that, from hard disk drive 0 (sometimes
578dfcea8cSRobert Nordierknown as drive C:, or as drive 0x80 to the BIOS).  Some BIOSes allow
588dfcea8cSRobert Nordieryou to change this default sequence, and may also include a CD-ROM
59c65c062fSBruce Evansdrive as a boot device.
6089aeb8ceSRobert Nordier.Pp
6189aeb8ceSRobert NordierBy default, a three-stage bootstrap is employed, and control is
6289aeb8ceSRobert Nordierautomatically passed from the boot blocks (bootstrap stages one and
6389aeb8ceSRobert Nordiertwo) to a separate third-stage bootstrap program,
6489aeb8ceSRobert Nordier.Pa /boot/loader .
658dfcea8cSRobert NordierThis third stage provides more sophisticated control over the booting
668dfcea8cSRobert Nordierprocess than it is possible to achieve in the boot blocks, which are
678dfcea8cSRobert Nordierconstrained by occupying limited fixed space on a given disk or slice.
6889aeb8ceSRobert Nordier.Pp
6989aeb8ceSRobert NordierHowever, it is possible to dispense with the third stage altogether,
7089aeb8ceSRobert Nordiereither by specifying a kernel name in the boot block parameter
7189aeb8ceSRobert Nordierfile,
7289aeb8ceSRobert Nordier.Pa /boot.config ,
7389aeb8ceSRobert Nordieror by hitting a key during a brief pause (while one of the characters
7489aeb8ceSRobert Nordier.Dv - ,
7589aeb8ceSRobert Nordier.Dv \e ,
7689aeb8ceSRobert Nordier.Dv \&| ,
7789aeb8ceSRobert Nordieror
7889aeb8ceSRobert Nordier.Dv /
7989aeb8ceSRobert Nordieris displayed) before
8089aeb8ceSRobert Nordier.Pa /boot/loader
8189aeb8ceSRobert Nordieris invoked.  Booting will also be attempted at stage two, if the
8289aeb8ceSRobert Nordierthird stage cannot be loaded.
8389aeb8ceSRobert Nordier.Pp
8489aeb8ceSRobert NordierThe remainder of this subsection deals only with the boot blocks.
8589aeb8ceSRobert NordierAt present, documentation of the third stage is chiefly
868dfcea8cSRobert Nordieravailable through online help in the
8789aeb8ceSRobert Nordier.Pa /boot/loader
8889aeb8ceSRobert Nordierprogram itself.
8989aeb8ceSRobert Nordier.Pp
90c65c062fSBruce EvansAfter the boot blocks have been loaded,
91c65c062fSBruce Evansyou should see a prompt similar to the following:
92c65c062fSBruce Evans.Bd -literal
9389aeb8ceSRobert Nordier>> FreeBSD/i386 BOOT
9489aeb8ceSRobert NordierDefault: 0:wd(0,a)/kernel
95c65c062fSBruce Evansboot:
96c65c062fSBruce Evans.Ed
97c65c062fSBruce Evans.Pp
98c65c062fSBruce EvansThe automatic boot will attempt to load
99d16b647eSJoerg Wunsch.Pa /kernel
100d16b647eSJoerg Wunschfrom partition
101d16b647eSJoerg Wunsch.Ql a
102d16b647eSJoerg Wunschof either the floppy or the hard disk.
103d16b647eSJoerg WunschThis boot may be aborted by typing any character on the keyboard
104d16b647eSJoerg Wunschat the
105c65c062fSBruce Evans.Ql boot:
106d16b647eSJoerg Wunschprompt.  At this time, the following input will be accepted:
107c65c062fSBruce Evans.Bl -tag -width 10x
108d16b647eSJoerg Wunsch.It \&?
109d16b647eSJoerg WunschGive a short listing of the files in the root directory of the default
11089aeb8ceSRobert Nordierboot device, as a hint about available boot files.  (A
11189aeb8ceSRobert Nordier.Dv \&?
11289aeb8ceSRobert Nordiermay also be specified as the last segment of a path, in which case
11389aeb8ceSRobert Nordierthe listing will be of the relevant subdirectory.)
1148dfcea8cSRobert Nordier.Pp
1158dfcea8cSRobert Nordier.It bios_drive:interface(unit,part) filename Op Fl aCcDdghPrsv
116d16b647eSJoerg WunschSpecify boot file and flags.
117c65c062fSBruce Evans.Bl -tag -width 10x -compact
118c65c062fSBruce Evans.It bios_drive
119c65c062fSBruce EvansThe drive number as recognized by the BIOS.
120c65c062fSBruce Evans0 for the first drive, 1 for the second drive, etc.
121c65c062fSBruce Evans.It interface
122c65c062fSBruce EvansThe type of controller to boot from.  Note that the controller is required
123d16b647eSJoerg Wunschto have BIOS support since the BIOS services are used to load the
124d16b647eSJoerg Wunschboot file image.
1258fae3551SRodney W. Grimes.Pp
126c65c062fSBruce EvansThe supported interfaces are:
127c65c062fSBruce Evans.Bl -tag -width "wdXX" -compact
128d16b647eSJoerg Wunsch.It wd
129d16b647eSJoerg WunschST506, IDE, ESDI, RLL disks on a WD100[2367] or lookalike
1308fae3551SRodney W. Grimescontroller
131d16b647eSJoerg Wunsch.It fd
132d16b647eSJoerg Wunsch5 1/4" or 3 1/2" High density floppies
1337af89e87SKazutaka YOKOTA.It da
134d16b647eSJoerg WunschSCSI disk on any supported SCSI controller
135c65c062fSBruce Evans.\".It cd
136c65c062fSBruce Evans.\"boot from CDROM
137d16b647eSJoerg Wunsch.El
138d16b647eSJoerg Wunsch.It unit
139c65c062fSBruce EvansThe unit number of the drive on the interface being used.
140c65c062fSBruce Evans0 for the first drive, 1 for the second drive, etc.
141d16b647eSJoerg Wunsch.It part
142d16b647eSJoerg WunschThe partition letter inside the BSD portion of the disk.  See
143d16b647eSJoerg Wunsch.Xr disklabel 8 .
144d16b647eSJoerg WunschBy convention, only partition
145d16b647eSJoerg Wunsch.Ql a
146d16b647eSJoerg Wunschcontains a bootable image.  If sliced disks are used
147d16b647eSJoerg Wunsch.Pq Dq fdisk partitions ,
14889aeb8ceSRobert Nordierany slice can be booted from, with the default being the active slice
1498dfcea8cSRobert Nordieror, otherwise, the first FreeBSD slice.
150c65c062fSBruce Evans.It filename
151c65c062fSBruce EvansThe pathname of the file to boot (relative to the root directory
152c65c062fSBruce Evanson the specified partition).  Defaults to
15389aeb8ceSRobert Nordier.Pa /kernel .
154d16b647eSJoerg WunschSymbolic links are not supported (hard links are).
1557af89e87SKazutaka YOKOTA.It Fl acCdDghPrsv
156d16b647eSJoerg WunschBoot flags:
157c65c062fSBruce Evans.Bl -tag -width "-CXX" -compact
158d16b647eSJoerg Wunsch.It Fl a
159c65c062fSBruce Evansduring kernel initialization,
160c65c062fSBruce Evansask for the device to mount as as the root file system.
161c65c062fSBruce Evans.It Fl C
162c65c062fSBruce Evansboot from CDROM.
163d16b647eSJoerg Wunsch.It Fl c
164d16b647eSJoerg Wunschrun UserConfig to modify hardware parameters for the loaded
1650c473d52SMike Smithkernel.  If the kernel was built with the USERCONFIG_BOOT option,
1660c473d52SMike Smithremain in UserConfig regardless of any
1670c473d52SMike Smith.Ic quit
1680c473d52SMike Smithcommands present in the script.
169c65c062fSBruce Evans.It Fl D
170c65c062fSBruce Evanstoggle single and dual console configurations.  In the single
171c65c062fSBruce Evansconfiguration the console will be either the internal display
172c65c062fSBruce Evansor the serial port, depending on the state of the
173c65c062fSBruce Evans.Fl h
174c65c062fSBruce Evansoption below.  In the dual console configuration,
175c65c062fSBruce Evansboth the internal display and the serial port will become the console
176c65c062fSBruce Evansat the same time, regardless of the state of the
177c65c062fSBruce Evans.Fl h
178c65c062fSBruce Evansoption.  However, the dual console configuration takes effect only during
179c65c062fSBruce Evansthe boot prompt.  Once the kernel is loaded, the console specified
180c65c062fSBruce Evansby the
181c65c062fSBruce Evans.Fl h
182c65c062fSBruce Evansoption becomes the only console.
183d16b647eSJoerg Wunsch.It Fl d
184d16b647eSJoerg Wunschenter the DDB kernel debugger
185d16b647eSJoerg Wunsch.Pq see Xr ddb 4
186048362aaSDaniel O'Callaghanas early as possible in kernel initialization.
187c65c062fSBruce Evans.It Fl g
188c65c062fSBruce Evansuse the GDB remote debugging protocol.
189d16b647eSJoerg Wunsch.It Fl h
190c65c062fSBruce Evanstoggle internal and serial consoles.  You can use this to switch
191c65c062fSBruce Evansconsole devices.  For instance, if you boot from the internal console,
192c65c062fSBruce Evansyou can use the
193c65c062fSBruce Evans.Fl h
194c65c062fSBruce Evansoption to force the kernel to use the serial port as its
195c65c062fSBruce Evansconsole device.  Alternatively, if you boot from the serial port,
196c65c062fSBruce Evansyou can use this option to force the kernel to use the internal display
19706c53421SPoul-Henning Kampas the console instead.  This option has no effect if the kernel was
19806c53421SPoul-Henning Kampcompiled with
19906c53421SPoul-Henning Kamp.Em options COMCONSOLE .
200c65c062fSBruce Evans.It Fl P
201c65c062fSBruce Evansprobe the keyboard.  If no keyboard is found, the
202c65c062fSBruce Evans.Fl D
203c65c062fSBruce Evansand
204c65c062fSBruce Evans.Fl h
205c65c062fSBruce Evansoptions are automatically set.
206d16b647eSJoerg Wunsch.It Fl r
207c65c062fSBruce Evansuse the statically configured default for the device containing the
208c65c062fSBruce Evansroot file system
209c65c062fSBruce Evans.Pq see Xr config 8 .
210c65c062fSBruce EvansNormally, the root file system is on the device
211c65c062fSBruce Evansthat the kernel was loaded from.
212d16b647eSJoerg Wunsch.It Fl s
213d16b647eSJoerg Wunschboot into single-user mode; if the console is marked as
214d16b647eSJoerg Wunsch.Dq insecure
215d16b647eSJoerg Wunsch.Pq see Xr ttys 5 ,
2169448def9SPhilippe Charnierthe root password must be entered.
217d16b647eSJoerg Wunsch.It Fl v
218c65c062fSBruce Evansbe verbose during device probing (and later).
219d16b647eSJoerg Wunsch.El
220d16b647eSJoerg Wunsch.El
221d16b647eSJoerg Wunsch.El
222c65c062fSBruce Evans.Pp
223c65c062fSBruce EvansYou may put a BIOS drive number, a controller type, a unit number,
2248dfcea8cSRobert Nordiera partition, a kernel file name, and any valid option in
225c65c062fSBruce Evans.Pa /boot.config
2268dfcea8cSRobert Nordierto set defaults.  Enter them in one line just as you type at the
227c65c062fSBruce Evans.Ql boot:
228c65c062fSBruce Evansprompt.
2298fae3551SRodney W. Grimes.Sh FILES
230c65c062fSBruce Evans.Bl -tag -width /kernel.old.config -compact
231c65c062fSBruce Evans.It Pa /boot.config
23289aeb8ceSRobert Nordierparameters for the boot blocks (optional)
23389aeb8ceSRobert Nordier.It Pa /boot/loader
23489aeb8ceSRobert Nordierthird-stage bootstrap
235b3bfc719SDavid Greenman.It Pa /kernel
236c65c062fSBruce Evansdefault kernel
237c65c062fSBruce Evans.It Pa /kernel.old
238c65c062fSBruce Evanstypical non-default kernel (optional)
2398fae3551SRodney W. Grimes.El
2408fae3551SRodney W. Grimes.Sh SEE ALSO
241d16b647eSJoerg Wunsch.Xr ddb 4 ,
242d16b647eSJoerg Wunsch.Xr ttys 5 ,
2438dfcea8cSRobert Nordier.Xr btxld 8 ,
244c65c062fSBruce Evans.Xr config 8 ,
245af202156SWolfram Schneider.Xr disklabel 8 ,
2468fae3551SRodney W. Grimes.Xr halt 8 ,
2478fae3551SRodney W. Grimes.Xr reboot 8 ,
248af202156SWolfram Schneider.Xr shutdown 8
2498fae3551SRodney W. Grimes.Sh BUGS
2508fae3551SRodney W. GrimesThe disklabel format used by this version of
2518fae3551SRodney W. Grimes.Bx
2528fae3551SRodney W. Grimesis quite
2538fae3551SRodney W. Grimesdifferent from that of other architectures.
254d16b647eSJoerg Wunsch.Pp
2558dfcea8cSRobert NordierSome features are not yet documented.
256