xref: /freebsd/sbin/reboot/boot_i386.8 (revision 2ad872c5794e4c26fdf6ed219ad3f09ca0d5304a)
1.\" Copyright (c) 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" This code is derived from software written and contributed
5.\" to Berkeley by William Jolitz.
6.\"
7.\" Almost completely rewritten for FreeBSD 2.1 by Joerg Wunsch.
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. All advertising materials mentioning features or use of this software
18.\"    must display the following acknowledgement:
19.\"	This product includes software developed by the University of
20.\"	California, Berkeley and its contributors.
21.\" 4. Neither the name of the University nor the names of its contributors
22.\"    may be used to endorse or promote products derived from this software
23.\"    without specific prior written permission.
24.\"
25.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
26.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
29.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35.\" SUCH DAMAGE.
36.\"
37.\"     @(#)boot_i386.8	8.2 (Berkeley) 4/19/94
38.\"
39.\" $Id: boot_i386.8,v 1.14 1998/09/23 06:54:14 yokota Exp $
40.\"
41.Dd April 19, 1994
42.Dt BOOT 8 i386
43.Os
44.Sh NAME
45.Nm boot
46.Nd
47system bootstrapping procedures
48.Sh DESCRIPTION
49.Sy Power fail and crash recovery.
50Normally, the system will reboot itself at power-up or after crashes.
51An automatic consistency check of the file systems will be performed,
52and unless this fails, the system will resume multi-user operations.
53.Pp
54.Sy Cold starts.
55Most 386
56.Tn "PC AT"
57clones attempt to boot the floppy disk drive 0 (otherwise known as
58drive A:) first, and failing that, attempt to boot the hard disk
59drive 0 (otherwise known as drive C:,
60or (confusingly) hard disk drive 1, or drive 0x80 in the BIOS).
61Some BIOSes let you change this default sequence or may include a CD-ROM
62drive as a boot device.
63.Pp
64By default, a three-stage bootstrap is employed, and control is
65automatically passed from the boot blocks (bootstrap stages one and
66two) to a separate third-stage bootstrap program,
67.Pa /boot/loader .
68This third stage provides considerably more sophisticated control
69over the booting process than it is possible to achieve in the boot
70blocks, which are constrained by occupying limited fixed space on a
71given disk or slice.
72.Pp
73However, it is possible to dispense with the third stage altogether,
74either by specifying a kernel name in the boot block parameter
75file,
76.Pa /boot.config ,
77or by hitting a key during a brief pause (while one of the characters
78.Dv - ,
79.Dv \e ,
80.Dv \&| ,
81or
82.Dv /
83is displayed) before
84.Pa /boot/loader
85is invoked.  Booting will also be attempted at stage two, if the
86third stage cannot be loaded.
87.Pp
88The remainder of this subsection deals only with the boot blocks.
89At present, documentation of the third stage is chiefly
90available though online help in the
91.Pa /boot/loader
92program itself.
93.Pp
94After the boot blocks have been loaded,
95you should see a prompt similar to the following:
96.Bd -literal
97>> FreeBSD/i386 BOOT
98Default: 0:wd(0,a)/kernel
99
100boot:
101.Ed
102.Pp
103(You may see some tips printed on the screen too.)
104.Pp
105The automatic boot will attempt to load
106.Pa /kernel
107from partition
108.Ql a
109of either the floppy or the hard disk.
110This boot may be aborted by typing any character on the keyboard
111at the
112.Ql boot:
113prompt.  At this time, the following input will be accepted:
114.Bl -tag -width 10x
115.It \&?
116Give a short listing of the files in the root directory of the default
117boot device, as a hint about available boot files.  (A
118.Dv \&?
119may also be specified as the last segment of a path, in which case
120the listing will be of the relevant subdirectory.)
121.It Op bios_drive:interface(unit,part) Op filename Op Fl aCcDdghPrsv
122Specify boot file and flags.
123.Bl -tag -width 10x -compact
124.It bios_drive
125The drive number as recognized by the BIOS.
1260 for the first drive, 1 for the second drive, etc.
127.It interface
128The type of controller to boot from.  Note that the controller is required
129to have BIOS support since the BIOS services are used to load the
130boot file image.
131.Pp
132The supported interfaces are:
133.Bl -tag -width "wdXX" -compact
134.It wd
135ST506, IDE, ESDI, RLL disks on a WD100[2367] or lookalike
136controller
137.It fd
1385 1/4" or 3 1/2" High density floppies
139.It da
140SCSI disk on any supported SCSI controller
141.\".It cd
142.\"boot from CDROM
143.El
144.It unit
145The unit number of the drive on the interface being used.
1460 for the first drive, 1 for the second drive, etc.
147.It part
148The partition letter inside the BSD portion of the disk.  See
149.Xr disklabel 8 .
150By convention, only partition
151.Ql a
152contains a bootable image.  If sliced disks are used
153.Pq Dq fdisk partitions ,
154any slice can be booted from, with the default being the active slice
155or, otherwise, the first slice.
156.It filename
157The pathname of the file to boot (relative to the root directory
158on the specified partition).  Defaults to
159.Pa /kernel .
160Symbolic links are not supported (hard links are).
161.It Fl acCdDghPrsv
162Boot flags:
163.Bl -tag -width "-CXX" -compact
164.It Fl a
165during kernel initialization,
166ask for the device to mount as as the root file system.
167.It Fl C
168boot from CDROM.
169.It Fl c
170run UserConfig to modify hardware parameters for the loaded
171kernel.  If the kernel was built with the USERCONFIG_BOOT option,
172remain in UserConfig regardless of any
173.Ic quit
174commands present in the script.
175.It Fl D
176toggle single and dual console configurations.  In the single
177configuration the console will be either the internal display
178or the serial port, depending on the state of the
179.Fl h
180option below.  In the dual console configuration,
181both the internal display and the serial port will become the console
182at the same time, regardless of the state of the
183.Fl h
184option.  However, the dual console configuration takes effect only during
185the boot prompt.  Once the kernel is loaded, the console specified
186by the
187.Fl h
188option becomes the only console.
189.It Fl d
190enter the DDB kernel debugger
191.Pq see Xr ddb 4
192as early as possible in kernel initialization.
193.It Fl g
194use the GDB remote debugging protocol.
195.It Fl h
196toggle internal and serial consoles.  You can use this to switch
197console devices.  For instance, if you boot from the internal console,
198you can use the
199.Fl h
200option to force the kernel to use the serial port as its
201console device.  Alternatively, if you boot from the serial port,
202you can use this option to force the kernel to use the internal display
203as the console instead.  This option has no effect if the kernel was
204compiled with
205.Em options COMCONSOLE .
206.It Fl P
207probe the keyboard.  If no keyboard is found, the
208.Fl D
209and
210.Fl h
211options are automatically set.
212.It Fl r
213use the statically configured default for the device containing the
214root file system
215.Pq see Xr config 8 .
216Normally, the root file system is on the device
217that the kernel was loaded from.
218.It Fl s
219boot into single-user mode; if the console is marked as
220.Dq insecure
221.Pq see Xr ttys 5 ,
222the root password must be entered.
223.It Fl v
224be verbose during device probing (and later).
225.El
226.El
227.El
228.Pp
229You may put a BIOS drive number, a controller type, a unit number,
230a partition, a kernel file name and the
231.Fl D,
232.Fl h
233or
234.Fl P
235options in
236.Pa /boot.config
237to set defaults.  Write them in one line just as you type at the
238.Ql boot:
239prompt.
240.Sh FILES
241.Bl -tag -width /kernel.old.config -compact
242.It Pa /boot.config
243parameters for the boot blocks (optional)
244.It Pa /boot.help
245help messages (optional)
246.It Pa /boot/loader
247third-stage bootstrap
248.It Pa /kernel
249default kernel
250.It Pa /kernel.old
251typical non-default kernel (optional)
252.El
253.Sh SEE ALSO
254.Xr ddb 4 ,
255.Xr ttys 5 ,
256.Xr config 8 ,
257.Xr disklabel 8 ,
258.Xr halt 8 ,
259.Xr reboot 8 ,
260.Xr shutdown 8
261.Sh BUGS
262The disklabel format used by this version of
263.Bx
264is quite
265different from that of other architectures.
266.Pp
267Some features are, as yet, undocumented.
268