EFI partition sizes

rgbellotti

Member
Joined
Nov 2, 2020
Messages
34
Reaction score
19
Credits
315
I was wondering if there was a simple explanation as to why the EFI partition sizes seem to vary between different distros, as well as what kind of techniques are available in adjusting those sizes. Having experimented with a few different distros I've seen FAT32 EFI partitions vary from 100mb to 1gb, and I have no idea as to what adjusting this partition size would have to do with system performance. Because I like adjusting the swap size for different installations, it would be convenient if there was some kind of default EFI setting implemented in the manual partitioning section, though I digress because I'm not entirely sure what this partition is or why it's allocated to different sizes.
 


From what I read about efi partitions it seems to have to that there have been situations where people have experience problems with smaller uefi partitions causing incompatibilities , as well as distributions consider multi-boot systems.
Although the EFI specification is mute on the subject of the ESP's size, most OSes make it fairly small—Macs ship with 200MiB ESPs, and the Windows 7 installer creates one of just 100MiB. (That value has been raised to a bit over 200MiB on newer versions of Windows.) Some users, however, have found that some EFIs have bugs that cause problems with FAT32 ESPs that are under 512MiB (537MB) in size. One very common problem is files that can't be read by the EFI. The Linux mkdosfs command defaults to using FAT16 for partitions of up to 520MiB (546MB). Therefore, adding a margin of safety to protect against MiB/MB confusion and rounding errors, I recommend creating an ESP that's at least 550MiB in size. If you must use a smaller ESP and if you encounter mysterious problems, try converting it to FAT16; most ESPs will work fine with this, and it may eliminate your problems. On the other hand, this may cause the Windows installer to fail should you need to install this OS.
My /efi partition is 300M because at the time when I looking for recommended efi partition it was somewhat halfway between the smallest and largest recommended.
 
gDisk author recommends :
Preparing your ESP—Except on Macs, EFIs use the ESP to hold boot loaders. If your computer came with Windows pre-installed, an ESP should already exist, and you can use it in Linux. If not, I recommend creating an ESP that's 550MiB in size.
he doesn't say how he came up with that figure .

i've only got 100MB , its on /dev/sda1 quick useage :

sudo df -h /dev/sda1 (07-23 09:27)
[sudo] password for andrew:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 99M 80M 19M 81% /boot
[andrew@darkstar:~]$
 
I've always used the 200 MB and so far hasn't failed me. No particular reason for that except I think the first time I did an EFI boot that is what the Distro I was using at the time setup. Think it was Fedora, but then my memory isn't what it used to be :)
 
i wonder what Chris's <Wiz> ESP size is , with circa 60+ OS running on his rig ?

A valid question, Andy :)

G'day @rgbellotti

Sunday morning here in Oz and I'm loading up with coffee.

In this Dell rig I have 3 drives operating.

Below are screenshots showing that part of GParted that identifies the ESP (EFI System Partition).

My /dev/sda is the 2 TB internal SATA on the Dell and houses 31 Linux Distros

oE04WYQ.jpg


This is my second-largest ESP and you can see that with 31 Distros it is still using only half the space allocated.



My /dev/sdb is the 256 GB internal Solid State Drive, and it houses 12 Linux Distros

25edDIl.jpg


It's the third-largest (read smallest), and 12 Distros are only filling 6.50 MiB.


My /dev/sdc is my 4 TB Western Digital MyBook, mains-powered, USB 3.0 connector.

It houses (today) 25 Distros, today.

Eg9Lu16.jpg


This is the largest of my ESP's at 611 MiB, and the 25 Distros account for less than half of that space.

I place my ESPs at the end of each drive, so that if I need to grow the partition, I can do so easily without having them hemmed in by other partitions.

At the second screenshot, from my SSD, the partition above my ESP, /dev/sdb13, was empty at that time, but I have since installed the Arcolinux Cinnamon I am writing from. The partition, size about 20 GiB shows as having 190.56 MiB used, and that is a formatting overhead, under EXT4.

With an ESP being written in FAT32, the overhead is considerably less.

The screenshot below (dark theme on this Distro) shows a sizable chunk of my /dev/sdc external drive.

ONR2zjg.png


Here, I have created a dummy ESP of 512 Mib.

My cursor is placed showing the real ESP at /dev/sdc2, and the highlighted dummy one shows the formatting for it taking only 1.02 MiB to set up a partition of this size in FAT2.

So of the 280.09 MiB consumed in /dev/sdc2, less 1.02 MiB we have 279.0 being from the actual 25 Distros.

Why is this relevant?

Not seeking to be argumentative, but friend @dos2unix has provided 2 links above, with the second being the UEFI spec, a PDF document 2,558 pages long, and no, I ain't going in there, or it will be like Jumanji and I won't be seen for 20 years.

However
200MB is max.
Bigger doesn't hurt anything, but it won't be recognized.

... is not accurate in my experience. One of the Linux Distros, Solus actually requires you to have 512 MiB size to the ESP or it will not install.

https://getsol.us/articles/installation/disks/en/

So the larger sizes I created were with a thought to installing Solus in my environment, but I have not done so.

SUMMARY

Minimum size - 100 MiB (required by some distros)
Maximum size - None that I am aware of but you would never need even 1 GiB
Recommended size if multi-multi-booting - 300 MiB

HTH

Chris Turner
wizardfromoz
 
SUMMARY

Minimum size - 100 MiB (required by some distros)
Maximum size - None that I am aware of but you would never need even 1 GiB
Recommended size if multi-multi-booting - 300 MiB

HTH

Chris Turner
wizardfromoz
Awesome, thank you for the well explained answer. It makes more sense now as to what the partition is used for and why we can vary the sizes without it causing too much of a problem. I'm just sticking with the defaults for now until I maybe venture into the multiple distro style :)
 
... is not accurate in my experience. One of the Linux Distros, Solus actually requires you to have 512 MiB size to the ESP or it will not install.

Not saying your wrong, I don't run Solus so I can't disagree.
But if this is the case, then it is a non-standard implementation.
 
It was, about 2 years ago, uncertain now.

Maybe good for a standalone distro, the Gamers like it, but not my cup of tea as it does not like sharing with multiple distros and is devilishly hard to get rid of all traces when removing.

Cheers :)
 

Members online


Top