FreeBSD boot process
MrMoo last edited by
In order to understand things a bit clearer I like diagrams, here's a diagram I have made outlining the FreeBSD boot process. Corrections welcome.
Stage zero of boot process
A small 446 byte long program is loaded by the BIOS when switched on. In FreeBSD the usual
boot manager is called boot0 and is setup via boot0cfg or fdisk. This program presents a
menu of which operating systems the user can load, e.g. FreeBSD, Linux, Windows, etc.
# fdisk -B -b /boot/boot0
# boot0cfg -B -b /boot/boot0
F1 FreeBSD Default: F1
Stage one of boot process
A small 512 byte program to locate and load boot2, the second stage. This program is
managed together with stage two as a single entity.
Stage two of boot process
Provides an interface to choose the boot loader / kernel.
Example install of stage one and two:
# bsdlabel -B
>> FreeBSD/i386 BOOT Default: 0:ad(0,a)/boot/loader boot:
Stage three of boot process
An interface to choose kernel and set boot options.
BTX loader 1.00 BTX version is 1.01 Console: internal video/keyboard BIOS drive A: is disk0 BIOS drive B: is disk1 BIOS drive C: is disk2 BIOS drive D: is disk3 BIOS 639kB/261120kB available memory FreeBSD/i386 bootstrap loader, Revision 0.8 /kernel text=0x277391 data=0x3268c+0x332a8 | | Hit [Enter] to boot immediately, or any other key for command prompt. Booting [kernel] in 9 seconds... _