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.13 1998/07/15 06:51:35 charnier 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 aCcDdghPrsv 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 da 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 acCdDghPrsv 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 C 134boot from CDROM. 135.It Fl c 136run UserConfig to modify hardware parameters for the loaded 137kernel. If the kernel was built with the USERCONFIG_BOOT option, 138remain in UserConfig regardless of any 139.Ic quit 140commands present in the script. 141.It Fl D 142toggle single and dual console configurations. In the single 143configuration the console will be either the internal display 144or the serial port, depending on the state of the 145.Fl h 146option below. In the dual console configuration, 147both the internal display and the serial port will become the console 148at the same time, regardless of the state of the 149.Fl h 150option. However, the dual console configuration takes effect only during 151the boot prompt. Once the kernel is loaded, the console specified 152by the 153.Fl h 154option becomes the only console. 155.It Fl d 156enter the DDB kernel debugger 157.Pq see Xr ddb 4 158as early as possible in kernel initialization. 159.It Fl g 160use the GDB remote debugging protocol. 161.It Fl h 162toggle internal and serial consoles. You can use this to switch 163console devices. For instance, if you boot from the internal console, 164you can use the 165.Fl h 166option to force the kernel to use the serial port as its 167console device. Alternatively, if you boot from the serial port, 168you can use this option to force the kernel to use the internal display 169as the console instead. This option has no effect if the kernel was 170compiled with 171.Em options COMCONSOLE . 172.It Fl P 173probe the keyboard. If no keyboard is found, the 174.Fl D 175and 176.Fl h 177options are automatically set. 178.It Fl r 179use the statically configured default for the device containing the 180root file system 181.Pq see Xr config 8 . 182Normally, the root file system is on the device 183that the kernel was loaded from. 184.It Fl s 185boot into single-user mode; if the console is marked as 186.Dq insecure 187.Pq see Xr ttys 5 , 188the root password must be entered. 189.It Fl v 190be verbose during device probing (and later). 191.El 192.El 193.El 194.Pp 195You may put a BIOS drive number, a controller type, a unit number, 196a partition, a kernel file name and the 197.Fl D, 198.Fl h 199or 200.Fl P 201options in 202.Pa /boot.config 203to set defaults. Write them in one line just as you type at the 204.Ql boot: 205prompt. 206.Sh FILES 207.Bl -tag -width /kernel.old.config -compact 208.It Pa /boot.config 209parameters for the boot loader (optional) 210.It Pa /boot.help 211help messages 212.It Pa /kernel 213default kernel 214.It Pa /kernel.config 215parameters for default kernel (optional) 216.It Pa /kernel.old 217typical non-default kernel (optional) 218.It Pa /kernel.old.config 219parameters for non-default kernel (optional) 220.\" .It Pa /boot 221.\" system bootstrap 222.El 223.Sh SEE ALSO 224.Xr ddb 4 , 225.Xr ttys 5 , 226.Xr config 8 , 227.Xr disklabel 8 , 228.Xr halt 8 , 229.Xr reboot 8 , 230.Xr shutdown 8 231.Sh BUGS 232The disklabel format used by this version of 233.Bx 234is quite 235different from that of other architectures. 236.Pp 237The boot flags are not very self-explanatory, and the alphabet has 238too few characters to implement every potentially useful boot option. 239