20

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, 2021 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, 2021 at 14:07

5 Answers 5

30

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.

5
  • 5
    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, 2021 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, 2021 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, 2021 at 20:51
  • 4
    "... 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, 2021 at 23:07
  • 3
    People tend to massively oversize these partitions. I have been using my Arch Linux system with an ESP as small as 32 MiB and a 128 MiB boot partition for years now, and never run into trouble. Debian and Ubuntu systems might require a 256 MiB boot partition as they keep old kernels installed, but not more.
    – Bachsau
    Nov 22, 2021 at 17:23
8

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.

1

If you only ever plan to install Linux on the disk you can get away with just a few megabytes. I've never seen the bootloader take up more than 3MB. So choosing the minimum size your distribution allows will work in most cases.

But some points to consider:

  • if you do want to use things like dualboot at some point in the future it can be a hassle, as other OSs tend to use much more space than the Linux bootloader. E.g. Windows stores its recovery tools there and expects at least 300 MiB.
  • disk space is quite cheap nowadays.
  • even if it's not that cheap - i.e. on an SSD - you can just think of it as a buffer space for SSD wear leveling (also, don't forget to enable the trim/discard feature in your filesystems).
  • also, some early UEFI implementations allegedly expected at least 512 MiB, but personally I've never encountered this.

I'd say 50-100 MiB should be good for most Linux installations; it gives you some wiggle room for additional bootloaders while not wasting all too much space on the device.

-1

I use around 102MB for my EFI partition as I find it to be the best option, but use whatever you think is correct, in summary:

Use what you think is correct, but the best size would be 100MB to 1GB. Try experimenting with various sizes and choose the best option.

Hope this helps!

5
  • How you determine "the best" option? There is no need to have more than 250 MB anyway.
    – Pilot6
    May 10 at 9:45
  • the one that doesn’t take the most amount of space and yields the best performance.
    – sgal5208
    May 10 at 13:36
  • 1
    It has nothing to do with performance. EFI patition is used only for booting.
    – Pilot6
    May 10 at 13:46
  • 2
    And why 1GB? Are you expecting to multi-boot 30 OSes? May 11 at 7:33
  • idk… perhaps? who knows…
    – sgal5208
    May 11 at 12:15
-2

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.

3
  • 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, 2021 at 14:14
  • 2
    As someone that only really uses arch and gentoo linux. I also only have a super small efi partition as its only needed to store the grub boot loader. Everything else is then handled on a separate /boot partition. However I do see a lot of the consumer grade distro doing something very different as I guess it just a quick and easy shortcut.
    – utx0_
    Oct 21, 2021 at 1:38
  • @Levente, you've been doing something wrong with your installation. The machine I've been using daily for the past 3 years got a bare-metal install of Ubuntu 18.04 in spring '19 until I upgraded to 20.04.1 when that came out, and right now my boot partition utilization is still 2.3M (with 509M sitting unused and essentially wasted).
    – antichris
    Apr 25 at 12:02

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.