boot(8) | system bootstrapping procedures |
boot_i386, boot(8) | system bootstrapping procedures |
BOOT(8) | MidnightBSD System Manager's Manual (i386) | BOOT(8) |
boot
— system
bootstrapping procedures
Power fail and crash recovery. Normally, the system will reboot itself at power-up or after crashes. An automatic consistency check of the file systems will be performed, and unless this fails, the system will resume multi-user operations.
Cold starts. Most i386 PCs attempt to boot first from floppy disk drive 0 (sometimes known as drive A:) and, failing that, from hard disk drive 0 (sometimes known as drive C:, or as drive 0x80 to the BIOS). Some BIOSes allow you to change this default sequence, and may also include a CD-ROM drive as a boot device.
Some newer PCs boot using UEFI firmware, not BIOS. That process is described in uefi(8).
By default, a three-stage bootstrap is employed, and control is automatically passed from the boot blocks (bootstrap stages one and two) to a separate third-stage bootstrap program, loader(8). This third stage provides more sophisticated control over the booting process than it is possible to achieve in the boot blocks, which are constrained by occupying limited fixed space on a given disk or slice.
However, it is possible to dispense with the third stage
altogether, either by specifying a kernel name in the boot block parameter
file, /boot.config, or, unless option
-n
is set, by hitting a key during a brief pause
(while one of the characters -, \,
|, or
/ is displayed)
before loader(8) is
invoked. Booting will also be attempted at stage two, if the third stage
cannot be loaded.
The remainder of this subsection deals only with the boot blocks. The loader(8) program is documented separately.
After the boot blocks have been loaded, you should see a prompt similar to the following:
>> FreeBSD/x86 BOOT Default: 0:ad(0,a)/boot/loader boot:
The automatic boot will attempt to load
/boot/loader from partition
‘a
’ of either the floppy or the hard
disk. This boot may be aborted by typing any character on the keyboard at
the ‘boot:
’ prompt. At this time, the
following input will be accepted:
?
?
may also be specified as the last segment of a
path, in which case the listing will be of the relevant
subdirectory.)-aCcDdghmnPprsv
]
[-S
speed]The supported interfaces are:
a
’
contains a bootable image. If sliced disks are used (“fdisk
partitions”), any slice (1 for the first
slice, 2 for the second slice, etc.) can be booted from, with the
default (if not specified) being the active slice or, otherwise, the
first FreeBSD slice. If
slice is specified as 0, the first
FreeBSD slice (also known as
“compatibility” slice) is booted from.-aCcDdghmnPpqrsv
]
[-S
speed]-a
-C
-c
-D
-h
option below. In the dual console
configuration, both the internal display and the serial port will
become the console at the same time, regardless of the state of
the -h
option.-d
-g
-h
-h
option to force the kernel to use the serial port as its console
device. The serial port driver
sio(4) (but not
uart(4)) has a
flag (0x20) to override this option. If that flag is set, the
serial port will always be used as the console, regardless of the
-h
option described here.-m
-n
-P
-D
and -h
options
are automatically set.-p
-q
-m
option.-r
-s
-S
speed-v
Use the /boot.config file to set the default configuration options for the boot block code. See boot.config(5) for more information about the /boot.config file.
When disk-related errors occur, these are reported by the second-stage bootstrap using the same error codes returned by the BIOS, for example “Disk error 0x1 (lba=0x12345678)”. Here is a partial list of these error codes:
NOTE: On older machines, or otherwise where EDD support (disk packet interface support) is not available, all boot-related files and structures (including the kernel) that need to be accessed during the boot phase must reside on the disk at or below cylinder 1023 (as the BIOS understands the geometry). When a “Disk error 0x1” is reported by the second-stage bootstrap, it generally means that this requirement has not been adhered to.
ddb(4), boot.config(5), make.conf(5), mount.conf(5), ttys(5), boot0cfg(8), btxld(8), config(8), gpart(8), gptboot(8), halt(8), loader(8), nextboot(8), reboot(8), shutdown(8), uefi(8)
The bsdlabel format used by this version of BSD is quite different from that of other architectures.
Due to space constraints, the keyboard probe initiated by the
-P
option is simply a test that the BIOS has
detected an “extended” keyboard. If an “XT/AT”
keyboard (with no F11 and F12 keys, etc.) is attached, the probe will
fail.
April 30, 2019 | midnightbsd-3.1 |