xref: /freebsd/sbin/reboot/boot_i386.8 (revision a8445737e740901f5f2c8d24c12ef7fc8b00134e)
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.12 1998/07/09 06:24:21 phk 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.
63After the boot blocks have been loaded,
64you should see a prompt similar to the following:
65.Bd -literal
66>> FreeBSD BOOT @ 0x10000: 640/7168 k of memory, internal console
67Boot default: 0:wd(0,a)kernel
68
69boot:
70.Ed
71.Pp
72(You may see some tips printed on the screen too.)
73.Pp
74The automatic boot will attempt to load
75.Pa /kernel
76from partition
77.Ql a
78of either the floppy or the hard disk.
79This boot may be aborted by typing any character on the keyboard
80at the
81.Ql boot:
82prompt.  At this time, the following input will be accepted:
83.Bl -tag -width 10x
84.It \&?
85Give a short listing of the files in the root directory of the default
86boot device, as a hint about available boot files.
87.It Op bios_drive:interface(unit,part) Op filename Op Fl abCcDdghPrsv
88Specify boot file and flags.
89.Bl -tag -width 10x -compact
90.It bios_drive
91The drive number as recognized by the BIOS.
920 for the first drive, 1 for the second drive, etc.
93.It interface
94The type of controller to boot from.  Note that the controller is required
95to have BIOS support since the BIOS services are used to load the
96boot file image.
97.Pp
98The supported interfaces are:
99.Bl -tag -width "wdXX" -compact
100.It wd
101ST506, IDE, ESDI, RLL disks on a WD100[2367] or lookalike
102controller
103.It fd
1045 1/4" or 3 1/2" High density floppies
105.It sd
106SCSI disk on any supported SCSI controller
107.\".It cd
108.\"boot from CDROM
109.El
110.It unit
111The unit number of the drive on the interface being used.
1120 for the first drive, 1 for the second drive, etc.
113.It part
114The partition letter inside the BSD portion of the disk.  See
115.Xr disklabel 8 .
116By convention, only partition
117.Ql a
118contains a bootable image.  If sliced disks are used
119.Pq Dq fdisk partitions ,
120only the first BSD slice can be used to boot from.  The partition
121letter always refers to the first slice.
122.It filename
123The pathname of the file to boot (relative to the root directory
124on the specified partition).  Defaults to
125.Pa kernel .
126Symbolic links are not supported (hard links are).
127.It Fl abcCdDghPrsv
128Boot flags:
129.Bl -tag -width "-CXX" -compact
130.It Fl a
131during kernel initialization,
132ask for the device to mount as as the root file system.
133.It Fl b
134put the screen in 800x600x4 mode (Vesa mode 0x102).
135This is useful on laptops whose graphics
136chips are not supported by XFree86 by the XF86_VGA16 server.
137You need to have a 8x16 font compiled into syscons or loaded as
138part of boot-strap if you actually want to see anything on
139the screen.
140.It Fl C
141boot from CDROM.
142.It Fl c
143run UserConfig to modify hardware parameters for the loaded
144kernel.  If the kernel was built with the USERCONFIG_BOOT option,
145remain in UserConfig regardless of any
146.Ic quit
147commands present in the script.
148.It Fl D
149toggle single and dual console configurations.  In the single
150configuration the console will be either the internal display
151or the serial port, depending on the state of the
152.Fl h
153option below.  In the dual console configuration,
154both the internal display and the serial port will become the console
155at the same time, regardless of the state of the
156.Fl h
157option.  However, the dual console configuration takes effect only during
158the boot prompt.  Once the kernel is loaded, the console specified
159by the
160.Fl h
161option becomes the only console.
162.It Fl d
163enter the DDB kernel debugger
164.Pq see Xr ddb 4
165as early as possible in kernel initialization.
166.It Fl g
167use the GDB remote debugging protocol.
168.It Fl h
169toggle internal and serial consoles.  You can use this to switch
170console devices.  For instance, if you boot from the internal console,
171you can use the
172.Fl h
173option to force the kernel to use the serial port as its
174console device.  Alternatively, if you boot from the serial port,
175you can use this option to force the kernel to use the internal display
176as the console instead.  This option has no effect if the kernel was
177compiled with
178.Em options COMCONSOLE .
179.It Fl P
180probe the keyboard.  If no keyboard is found, the
181.Fl D
182and
183.Fl h
184options are automatically set.
185.It Fl r
186use the statically configured default for the device containing the
187root file system
188.Pq see Xr config 8 .
189Normally, the root file system is on the device
190that the kernel was loaded from.
191.It Fl s
192boot into single-user mode; if the console is marked as
193.Dq insecure
194.Pq see Xr ttys 5 ,
195the root password must be entered.
196.It Fl v
197be verbose during device probing (and later).
198.El
199.El
200.El
201.Pp
202You may put a BIOS drive number, a controller type, a unit number,
203a partition, a kernel file name and the
204.Fl b ,
205.Fl D,
206.Fl h
207or
208.Fl P
209options in
210.Pa /boot.config
211to set defaults.  Write them in one line just as you type at the
212.Ql boot:
213prompt.
214.Sh FILES
215.Bl -tag -width /kernel.old.config -compact
216.It Pa /boot.config
217parameters for the boot loader (optional)
218.It Pa /boot.help
219help messages
220.It Pa /kernel
221default kernel
222.It Pa /kernel.config
223parameters for default kernel (optional)
224.It Pa /kernel.old
225typical non-default kernel (optional)
226.It Pa /kernel.old.config
227parameters for non-default kernel (optional)
228.\" .It Pa /boot
229.\" system bootstrap
230.El
231.Sh SEE ALSO
232.Xr ddb 4 ,
233.Xr ttys 5 ,
234.Xr config 8 ,
235.Xr disklabel 8 ,
236.Xr halt 8 ,
237.Xr reboot 8 ,
238.Xr shutdown 8
239.Sh BUGS
240The disklabel format used by this version of
241.Bx
242is quite
243different from that of other architectures.
244.Pp
245The kernel's output is invisible (nothing but the cursor can be seen) when
246.Fl b
247is used unless a font has been compiled into the kernel.
248.Pp
249The boot flags are not very self-explanatory, and the alphabet has
250too few characters to implement every potentially useful boot option.
251