Product SiteDocumentation Site

2. Bootloader Basics

To boot a modern operating system, a computer must identify the kernel, storage, and various options at the time of booting. Software called a bootloader keeps track of these parameters, manages settings for different operating systems, and loads the kernel.
Historically, bootloaders have been installed into the first part of a drive, known as the Master Boot Record (MBR) or Boot Sector. The computer's firmware, or BIOS, would check the boot sector for bootable code on startup, and load whatever it found. As bootloaders became more complex, and therefore required more space, the MBR came to contain only a pointer to the second stage of the bootloader.
The second stage of the bootloader performs the actual work. Because the BIOS does not know how to open and read from filesystems, the bootloader finds the operating system, presents a menu, interacts with the user as required, and launches the OS. It was installed in the part of the drive between the MBR and the beginning of the first filesystem, known as the MBR Gap. Less featureful bootloaders could also be installed in the gap between the start of the partition and the beginning of the partition's filesystem, but because this can damage the filesystem if the gap is too small the practice is no longer supported.
BIOS is short for Basic Input Output System, and the software is indeed very simple. BIOS systems had a number of technical limitations, such as being unable to boot from disks larger than 2 TB and extremely limited interfaces. GUID Partition Table (GPT) partitioning schemes also came with larger drives, overcoming the MBR partitioning scheme's 4 partition limit. To overcome these issues and add new features, a newer firmware implementation was developed, called the Unified Extensible Firmware Interface.
Instead of reading the bootloader from the drive, UEFI systems store information about available bootloaders right on the system firmware. The bootloaders themselves and sometimes small applications such as memory testing utilites are stored on the UEFI system partition. This partition is usually a FAT filesystem, has a standardized partition identifier, and is mounted at /boot/efi. Each operating system places files required for booting in a dedicated directory of this partition, and the boot entry in the firmware points to these files. UEFI systems will usually also support BIOS style booting for compatibility reasons, using a feature called the Compatibility Support Module (CSM).
On Linux systems, the data used by the bootloader is traditionally contained in a boot partition, mounted at and known as /boot. The boot partition contains the kernel, a read only filesystem that holds tools used by the kernel during bootup, called an initramfs, and files for the menus and for the bootloader itself. These files were traditionally placed on a different partition because the bootloader did not support complex storage arrangements, and could not read the kernel and initramfs from them. Because a simple, separate boot also allows for easier disaster recovery, the practice has continued to this day.
Fedora supports both UEFI and BIOS systems, using the GRUB bootloader, which is short for GNU GRand Unified Bootloader. GRUB provides a boot menu and support for many filesystems, as well as software for scanning the system for available operating systems and adding them to the menu.