EFI system partition


The EFI system partition or ESP is a partition on a data storage device that is used by computers adhering to the Unified Extensible Firmware Interface. When a computer is booted, UEFI firmware loads files stored on the ESP to start installed operating systems and various utilities.
An ESP contains the boot loaders or kernel images for all installed operating systems, device driver files for hardware devices present in a computer and used by the firmware at boot time, system utility programs that are intended to be run before an operating system is booted, and data files such as error logs.

Overview

The EFI system partition is formatted with a file system whose specification is based on the FAT file system and maintained as part of the UEFI specification; therefore, the file system specification is independent from the original FAT specification. The actual extent of divergence is unknown: Apple maintains a separate tool that should be used, while other systems use FAT utilities just fine. The globally unique identifier for the EFI system partition in the GUID Partition Table scheme is, while its ID in the master boot record partition-table scheme is. Both GPT- and MBR-partitioned disks can contain an EFI system partition, as UEFI firmware is required to support both partitioning schemes. Also, El Torito bootable format for CD-ROMs and DVDs is supported.
UEFI provides backward compatibility with legacy systems by reserving the first block of the partition for compatibility code, effectively creating a legacy boot sector. On legacy BIOS-based systems, the first sector of a partition is loaded into memory and execution is transferred to this code. UEFI firmware does not execute the code in the MBR, except when booting in legacy BIOS mode through the Compatibility Support Module.
The UEFI specification requires MBR partition tables to be fully supported. However, some UEFI implementations immediately switch to the BIOS-based CSM booting upon detecting certain types of partition table on the boot disk, effectively preventing UEFI booting to be performed from EFI system partitions contained on MBR-partitioned disks.
UEFI firmware supports booting from removable storage devices such as USB flash drives. For that purpose, a removable device is formatted with a FAT12, FAT16 or FAT32 file system, while a boot loader needs to be stored according to the standard ESP file hierarchy, or by providing a complete path of a boot loader to the system's boot manager. On the other hand, FAT32 is always expected on fixed drives.

Usage

Linux

and elilo serve as conventional, full-fledged standalone UEFI boot loaders for Linux. Once loaded by a UEFI firmware, they both can access and boot kernel images from all devices, partitions and file systems they support, without being limited to the EFI system partition.
EFI Boot Stub makes it possible to boot a Linux kernel image without the use of a conventional UEFI boot loader. By masquerading itself as a PE/COFF image and appearing to the firmware as a UEFI application, an x86 kernel image with EFI Boot Stub enabled can be directly loaded and executed by a UEFI firmware. Such kernel images can still be loaded and run by BIOS-based boot loaders; thus, EFI Boot Stub allows a single kernel image to work in any boot environment.
Linux kernel's support for the EFI Boot Stub is enabled by turning on option CONFIG_EFI_STUB during the kernel configuration. It was merged into version 3.3 of the Linux kernel mainline, released on March 18, 2012.
Gummiboot is a simple UEFI boot manager that loads and runs configured UEFI images, accessing only the EFI system partition. Configuration file fragments, kernel images and initrd images are required to reside on the EFI system partition, as Gummiboot does not provide support for accessing files on other partitions or file systems. Linux kernels need to be built with CONFIG_EFI_STUB enabled so they can be directly executed as UEFI images.
The mount point for the EFI system partition is usually /boot/efi, where its content is accessible after Linux is booted.

MacOS

On MacOS computers based on the x64 hardware architecture, the EFI system partition is initially left blank and unused for booting. However, the EFI system partition is used as a staging area for firmware updates. The logic usually goes as follows: the EFI first looks for a bootloader in ESP, and if there is none it will continue to the MacOS file system.
The system will still boot after the EFI partition is deleted, in which case the boot manager will allow users to choose whether to start a Boot Camp partition or the default Mac OS X, but firmware updates will fail..
The pre-UEFI Apple–Intel architecture EFI subsystem used to require the EFI system partition to be formatted in HFS+. Any third-party bootloader also needs to be "blessed" by a special IOCTL command before becoming bootable by the firmware, a relic of the system folder blessing from classic Mac OS. There is otherwise no limitations to what kinds of EFI operating system or bootloader a mactel machine can run.

Windows

Microsoft recommends that when partitioning a disk, the EFI system partition be the first partition on the disk. This is not a requirement of the EFI specification itself. On Windows XP 64-Bit Edition and later, access to the EFI system partition is obtained by running the mountvol /s command.
An ESP drive may temporarily be created if your Windows system is pending a restart after a Windows Update. This is to allow the computer to startup in the Windows Update environment so there are no competing applications during the update. This drive, and corresponding space, should be returned to its host drive upon completion of the update. Older computers don't properly support the editing of EFI partitions.
The Windows boot manager is located at.

[TrueOS] (a BSD operating system">Berkeley Software Distribution">BSD operating system)

TrueOS' UEFI support has been added to the installer and the boot manager since version 10.1 with the default EFI boot manager to be rEFInd. This includes ACPI detection and setup of Root System Description Pointer, eXtended System Descriptor Table, and Root System Description Table pass-through values to the kernel. A new installation is needed in order to install UEFI support as it requires the creation of a small FAT partition. The current UEFI does not support secure boot.