The boot process is an extremely machine-dependent activity. Not only must code be written for every computer architecture, but there may also be multiple types of booting on the same architecture. For example, a directory listing of
<filename>/usr/src/sys/boot
</filename> reveals a great amount of architecture-dependent code. There is a directory for each of the various supported architectures. In the x86-specific
<filename>i386
</filename> directory, there are subdirectories for different boot standards like
<filename>mbr
</filename> (Master Boot Record),
<filename>gpt
</filename> (
<acronym>GUID
</acronym> Partition Table), and
<filename>efi
</filename> (Extensible Firmware Interface). Each boot standard has its own conventions and data structures. The example that follows shows booting an x86 computer from an
<acronym>MBR
</acronym> hard drive with the FreeBSD
<filename>boot0
</filename> multi-boot loader stored in the very first sector. That boot code starts the FreeBSD three-stage boot process.