boot — system bootstrapping procedures
What happens at power-on, as the result of a cold start or when power is restored after a power failure, is determined by the machine firmware. Normally, the firmware is configured to begin bootstrapping an operating system, although some hardware platforms have the option to not automatically begin bootstrap after power comes on, requiring that the operator explicitly press a power button. If that operating system is FreeBSD, the system performs automatic checks of the filesystem and begins multi-user operations.
A similar bootstrap process is followed by a warm start, after a commanded reboot or a system crash.
Modern systems have UEFI firmware, and the firmware itself finds, loads, and runs the first FreeBSD program, loader.efi(8), usually stored alongside other loaders for other systems and other firmware‐specific programs on a dedicated UEFI disc partition (the 'EFI System Partition'), as detailed in full in uefi(8).
Such systems encompass PC systems where the UEFI firmware is in non‐volatile memory and SOC machines where the machine bootstrap loads and runs TianoCore from mass storage.
The gptboot.efi(8) program might be used in place of loader.efi(8). Instead of relying upon normal UEFI native configuration, where the UEFI boot manager is configured with both the location of the loader and what FreeBSD kernel to tell the loader to load, it mimics the gptboot(8) program (used on old PC firmware), finding, loading, and running a loader from a UFS (only) FreeBSD partition that has been marked in the partition table.
Old Intel Architecture (i386 and amd64) PC systems have “BIOS” firmware, and the firmware loads and runs the code stored in the first sector of a removable or a fixed disc device. This code may be FreeBSD‐supplied, in which case the system runs a FreeBSD‐supplied bootstrap program whose exact nature varies according to whether the disc is a non‐partitioned or a partitioned disc, and the partitioning scheme used on the latter.
On partitioned discs, a chain of various programs is run, beginning with the program in that first sector. The chain varies according to the partitioning scheme used on the disc. The full details are in the "BOOTSTRAPPING" section of gpart(8). The culmination is loading and running a loader(8) program from a UFS or ZFS partition or disc slice.
On non‐partitioned discs, or on partitioned discs where a bsdlabel(8) is used, the procedure followed is described in boot_i386(8). The culmination is, again, loading and running a loader(8) program from the disc.
If the code is non‐FreeBSD‐supplied, some unspecified chain of third‐party boot managers and boot loaders ends up loading and running the first sector of a FreeBSD disc partition, which then enters the boot_i386(8) procedure at stage 1.
Bootstrapping from CD-ROM with old PC firmware is done via the cdboot(8) program.
This manual page used to be an alias for the boot_i386(8) manual page.
There used to be a boot1.efi(8) program that loaded loader.efi(8). The UEFI firmware now runs the latter directly.
loader program that uses UEFI‐supplied services to load the FreeBSD kernel proper
loader program that uses old PC firmware‐supplied services to load the FreeBSD kernel proper
program which is stored in a dedicated GPT disc partition, that uses old PC firmware‐supplied services to find, load, and run loader(8) from another GPT partition containing FreeBSD on UFS
program which is stored in a dedicated GPT disc partition, that uses old PC firmware‐supplied services to find, load, and run loader(8) from another GPT partition containing FreeBSD on ZFS