EFI Partition Information and Tips
Please Note
Nearly all machines and motherboards manufactured since 2015 are delivered with EFI firmware.
Their disks are almost always set up using the GPT partition style.
Older machines may use BIOS firmware. Their disks are set up using the MBR partition style.
These old BIOS machines do not have EFI partitions.
Description
The EFI partition is a special partition that is created when you first install Windows or Linux on your machine.
The Windows or Linux setup programs will create an EFI partition if it does not already exist.
Otherwise, the setup program should simply update the existing EFI partition.
The EFI partition should have a directory named /EFI at it's root.
This /EFI directory has subdirectories containing the boot manager modules responsible for loading your operating systems.
Commonly used boot managers include those for Windows, Linux, Clover, MacOS and Grub2Win as well as others.
Operation
At boot time, the EFI firmware in your motherboard searches all your disks for the EFI partition.
It is identified by a very specific partition type UUID.
On GPT disks, the EFI partition type UUID must be set to C12A7328-F81F-11D2-BA4B-00A0C93EC93B
On MBR flash drives, the partition type must be set to EF and a Windows drive letter must be assigned.
Otherwise your EFI firmware will probably fail to boot.
Your EFI firmware then scans the EFI partition and creates a list of the available boot manager modules it finds.
It loads the current default boot manager module from that list.
The default boot manager can be set by Grub2Win or from your machine's EFI Firmware setup.
Note: When you apply Windows or Linux updates, the maintenance programs often change the default boot manager settings.
This can cause Windows or Linux to unexpectedly boot, instead of the OS you have manually selected.
The Grub2Win EFI setup process
When Grub2Win is installed, it automatically creates a "grub2win" subdirectory in your EFI partition
A few customized Grub2Win boot manager modules, with a total size of about 1.3 MB, are then copied to this new subdirectory.
The EFI firmware default boot manager is then set to automatically boot Grub2Win.
Multiple EFI partitions warning
Normally there is only one EFI partition on your machine.
The various boot managers installed should share this single EFI partition.
When you install an OS, the setup program should create a unique subdirectory within the EFI partition to store its boot modules.
The EFI firmware in most motherboards expects a single EFI partition.
Systems that have multiple EFI partitions often experience boot problems.
Your EFI firmware may not understand which of the multiple partitions is the “real” EFI partition.
Creating multiple EFI partitions is a complex task.
This is not recommended and can cause boot failures as well as other unusual symptoms.
EFI partition properties
The EFI partition is usually formatted FAT32 although it can be formatted FAT16 or even FAT12.
The partition type UUID on GPT drives must be C12A7328-F81F-11D2-BA4B-00A0C93EC93B so your firmware can find it.
On MBR flash drives the partition type must be EF.
A reasonable EFI partition size is 200 MB. If you have many operating systems, you might make it 400 MB.
Most boot manager subdirectories are around 4 MB. Each one typically contains six or seven modules.
The Microsoft boot manager subdirectory is much larger, about 25 MB.
How to Create an EFI partition using the Microsoft Windows DiskPart utility
This procedure will create an EFI partition with the correct properties and UUID.
Note: Microsoft DiskPart does not allow EFI partitions on flash drives to be formatted or have letters assigned.
For flash drives, use the Linux gparted utility instead of DiskPart.
Open an administrative command prompt.
Enter the following commands:
diskpart
list disk < Shows the disks on your system
select disk 1 < Use the disk number where you want the EFI partition
convert gpt < Skip this step if the disk is already in GPT format
create partition efi size 200 < Set the partition size in MB that you want
format fs=fat32 quick
list partition < Should show your new EFI partition with a type of "System"
exit
How to create an EFI partition using the Linux gparted utility
This procedure will create an EFI partition with the correct properties and UUID.
Run the Linux gparted application. This requires root access.
On a GPT type disk or an MBR flash drive, create a primary partition with fat32 format.
Click "Apply"
After the partition is created, right click on it and select "Manage Flags"
Select the "esp" checkbox. This will automatically check the "boot" checkbox.
Close the "Manage Flags" menu, apply the changes, and exit gparted.
Here is the directory listing from a typical EFI partition. It shows the various subdirectories.
Volume in drive E is EFI-OS
Volume Serial Number is 906D-AD19
Directory of E:\EFI
08/24/2020 09:10 AM <DIR> .
08/24/2020 09:10 AM <DIR> ..
08/24/2020 09:10 AM <DIR> Acronis
08/24/2020 09:10 AM <DIR> Boot
08/24/2020 09:10 AM <DIR> CLOVER
08/24/2020 09:10 AM <DIR> FreeBSD
08/24/2020 09:10 AM <DIR> grub2win
08/24/2020 09:10 AM <DIR> Microsoft
08/24/2020 09:10 AM <DIR> opensuse
08/24/2020 09:10 AM <DIR> ubuntu
0 File(s) 0 bytes
10 Dir(s) 47,234,560 bytes free
Created with the Personal Edition of HelpNDoc: Full-featured Documentation generator