EFI System Partition: Difference between revisions

m
no edit summary
[unchecked revision][unchecked revision]
m (Clarify the ESP acronym, as it is not directly explained that it refers to the EFI System Partition)
mNo edit summary
 
(6 intermediate revisions by 4 users not shown)
Line 1:
The '''EFI System Partition (ESP)''' is a dedicated partition on [[GPT]]. Usually a small one (32-256MiB), located at the beginning of the disk and its partition record at the beginning of the GPT.
 
== Identify ==
Unlike normal bootable partitions, which have the attribute flag bit 2 set, ESP is identified by it'sits GUID, which is
 
C12A7328-F81F-11D2-BA4B-00A0C93EC93B
 
== Format ==
In theoryThe ESP can be formatted to any [[FAT]] file system, [[FAT12]]/[[FAT16|16]]/[[FAT32|32]]. InOften reality[[NTFS]] mostmay firmwarealso onlybe supportsupported. FAT32,There's andone somenotable platformsexception, withsome limitedolder resourcesApple maymachines support(like [[FAT16]]iMac too.and [[FAT12]]MacBooks) isuse verya rarelyspecial implemented,firmware andwhich it'sonly safeaccepts to[[HFS+]] assumefile it won't worksystem on athe EFI realSystem hardwarePartition.
 
There's one notable exception, Apple machines (like iMac and MacBooks) use a special firmware which only accepts [[HFS+]] file system on the EFI System Partition.
 
== Access ==
In the EFI Shell, the ESP is the very first file system, denoting as ''FS0:''. [[GRUB]] and [http://elilo.sourceforge.net ELILO] recognize ESP, and they install their files there by default. Other boot loaders, like [http://www.rodsbooks.com/refind/ rEFInd] can only work if ESP exists.
From youyour application, you can use the [[Loading files under UEFI|EFI_SIMPLE_FILESYSTEM_PROTOCOL]] to access files on the ESP programaticallyprogrammatically.
 
== Important Files on ESP ==
* FS0:\STARTUP.NSH - an EFI Shell script, similar to MS-DOS autoexec.bat
* FS0:\BOOTMGR.EFI - the EFI boot manager
* FS0:\BOOT\BOOTX86BOOTIA32.EFI - the default x86_32IA-32 (32-bit x86) boot loader
* FS0:\BOOT\BOOTX64.EFI - the default x86_64x86-64 boot loader
 
To avoid filename clashes, you should not create files in the root directory of ESP. The specification mandates that root directory is for vendor directories, like FS0:\APPLE, FS0:\MICROSOFT etc. Some applications (like GRUB) just creates a one level directory without vendor parent directory. Feel free to create a directory for your own OS, and put your files there.
Line 34 ⟶ 32:
[[Category:Firmware]]
[[Category:UEFI]]
[[Category:Disks]]