9

In this Ubuntu help wiki about DiskSpace, it is recommended to have the size of EFI partition somewhere around 100~250 MB. However, I might have a 150 MB EFI partition while it actually needs 151 MB of space!

So how to know the exact size I need to allocate to the EFI partition?

2
  • 3
    How big is your drive? Make it 500M and don't worry about it. Drives are cheap. Feb 3 at 4:43
  • 1
    Mine hdd is of 500GB and its efi partition size is 100MB, I just gave 250 GB to Ubuntu and all the partition sizes was handled by Ubuntu on its own.@MahmoodKiaheyrati Feb 3 at 14:07
14

You cannot know the exact size unless:

  1. you plan on never updating the OS
  2. you perform a preliminary test installation, then use that information to recreate the partitions during another OS installation

Using my own machines as a reference, the EFI partitions on the daily workhorses are 1GB in size. The partitions exist on a storage device that is at least 512GB in size. Currently none of the EFI partitions exceed 1.8% utilisation, or 180MB (the lowest is 97MB).

Having been burned by excessively small EFI partitions in the past, I allowed the Ubuntu installation wizard choose the size of its EFI partition and have had exactly 0 issues since then.

Additional Notes:

Microsoft recommends 100 MB for its operating systems, while many Linux forums suggest more for Linux based operating systems or for any dual boot or multi booting situations.

The author of gdisk suggests 550 MiB.

As per the Arch Linux wiki, to avoid potential problems with some EFIs, ESP size should be at least 512 MiB. 550 MiB is recommended to avoid MiB/MB confusion and accidentally creating FAT16.

So, most common size guideline for EFI System Partition is between 100 MB to 550 MB. One of the reason behind this is it is difficult to resize later as it is the first partition on the drive. EFI partition may contain languages, fonts, BIOS firmware, other firmware related stuffs. There are some firmware/software that are installed into the the EFI partition instead of the data drive.

As it may be difficult to enlarge the size of the EFI partition in the future, and because many storage devices measure in the hundreds of gigabytes, it makes sense to go with something that is not the absolute minimum unless the plan is to install the OS, disconnect the device from the Internet, and run it without updates until the end of time.

4
  • 3
    Much of the recommendation o the Linux side results from an assumption that the system will be set up for multiboot and will be dealing with random intrusions into the partition from various things from Windows or another OS, or that you’re planning to use the ESP as a boot partition. Both cases should involve at least half a gigabyte of space, but if neither of those is the case then 128MB is more than enough (I have a dual-boot setup on my laptop that’s using less than ¼ of the 256MB ESP, and this is consistent with most other systems I have dealt with). Feb 3 at 12:31
  • 180MB is 18% of 1GB, not 1.8%. (I don't think you meant that the one with 180MB used is actually larger (10GB), to still be under your 1.8% cap.) Feb 3 at 19:31
  • @PeterCordes Most EFI partitions are 1GB. The one that uses the highest percentage of disk space is 180MB on a 10GB disk. The one that uses the lowest percentage is 97MB (disk size not specified).
    – user253751
    Feb 3 at 20:51
  • 2
    "... none of the EFI partitions exceed [...] 180MB (the lowest is 97MB)." - I find those numbers quite high; my Win10/Debian10 dual boot desktop uses 31M; my Debian10-only netbook uses 132K. 1G EFI partition sounds excessive to me, to be honest. Are you using it as /boot as well?
    – marcelm
    Feb 3 at 23:07
5

The space required depends on the boot method used and what other operating systems are installed.

GRUB installs its first and second stage bootloader only, which is fairly small, and then uses its own file system drivers to load the kernel and initrd through the EFI interface for block device access. You get away with a few megabytes for that.

The systemd bootloader and Windows copy both their kernel and an initial ramdisk containing drivers into the ESP, which requires a bit of space -- how much exactly depends on the drivers included in the initial ramdisk.

Windows selects only the bare minimum drivers, analogous to selecting MODULES=dep in initramfs.conf, so they get away with a few megabytes, but fail to boot if the hardware changes too much (e.g. when you move the harddisk from an internal SATA port to an add-on card).

Ubuntu, to my knowledge, defaults to MODULES=most, so it copies a few megabytes of drivers into the initramfs. This is robust, but requires additional space.

Ubuntu typically keeps the last two kernel versions installed, so there needs to be enough space for two versions of the initramfs, plus one extra during upgrades (where the new one is copied to the ESP before the old one is deleted).

So:

If you use GRUB only and do not plan to (ever) switch, you get away with 10 MB.

If you dual-boot into Windows and use GRUB, Windows's default of 100 MB is good.

If you plan to use systemd-boot, leave enough space for at least three copies of the initramfs, which is around 30-40 MB at this time and will likely grow in future releases. 200 MB should be safe, typical installations use 500 MB because with modern harddisk sizes, it doesn't matter.

-6

Although theoretically necessary, I’ve never seen the need for more than 5MB if you don’t install a lot of different operating systems.

You don’t store the Linux kernel there, only a boot loader for every OS you have, those tend to be small.

Personally, I make the partition 50MB because the Fedora installer complains if it’s smaller. Any other OS I’ve tried to install is happy with 5MB.

If you want to follow best practices, use 550MB, guaranteed anything will fit, and if you don’t miss the disk space it’s not really a loss.

1
  • 4
    5MB? Come on now. That would only set people up for trouble. The pain of outgrowing it far exceeds the benefit of having spared a few megabytes. By the way, according to Gparted, my EFI partition contains 13.4MiB (14MB) right now, with a single, 10 weeks old installation of Ubuntu 20.04.2.
    – Levente
    Feb 3 at 14:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.