The default Debian installer partition scheme creates a 500MB ESP mounted on /boot/efi
. All of my servers only have a couple MBs on that partition. My question is: why such a large partition? And would it be OK to use less space (say 100MB, like Windows) or will I run into problems further down the road?
-
1Some also install rEFInd boot manage which adds. And some decide to use SystemD boot which puts most of /boot into the ESP. So best to have extra space as in the answers below. I also like to use space for my UEFI updates as UEFI on my motherboard only reads the update from a FAT32 partition. Only if doing a full install to a smaller flash drive may I use a smaller 100MB ESP.– oldfredDec 7, 2020 at 14:49
3 Answers
To err on the side of caution.
The EFI partition can contain motherboard firmware, secure boot encryption keys, potentially multiple kernels (if configured to store them here), and even the boot loaders for multiple operating systems. This can all take up quite a bit of space in the end.
Windows uses a smaller partition because it handles the partition differently (and likely expects to be the only operating system on the machine).
If you only plan on having 1 operating system on this specific machine, use /boot
to store your kernels (which is the default for Debian I believe), and really just the boot loader instructions and motherboard firmware, than you could have an even smaller than 100 MB partition. However, 500 MB in the grand scheme of things is not that much larger and in the event the boot partition is full and unable to boot you will appreciate having the slack space so you do not have to perform a system rescue.
The recommended EFI boot partition is between 100 - 550MiB.
Boot partition can be used for multiple OS (multiboot) and different versions of initramfs, grub, drivers... ; So it depends on the system you are running on.
Also the recommended size is 550Mib to avoid to increase the partition in future, which can be somehow difficult to perform.
running rhel >= 7.6 on work servers I install linux as follows keeping it as simple as possible.
mount size file system
-------------------------------------
/boot 1gb XFS
/boot/efi 100mb EFI
/ max XFS
fwiw this is what I currently have going on on RHEL 7.9 :
Filesystem Size Used Avail Use% Mounted on
/dev/sdc3 558G 134G 424G 24% /
tmpfs 252G 4.3M 252G 1% /tmp
/dev/sdc2 950M 246M 704M 26% /boot
/dev/sdc1 190M 10M 180M 6% /boot/efi
ls /boot/efi/efi/redhat
BOOT.CSV* fw/ grub.cfg* mmx64.efi* shimx64-redhat.efi*
BOOTX64.CSV* fwupia32.efi* grubenv* shim.efi* user.cfg*
fonts/ fwupx64.efi* grubx64.efi* shimx64.efi*
ls /boot
config-3.10.0-1127.18.2.el7.x86_64
config-3.10.0-1127.19.1.el7.x86_64
config-3.10.0-1160.2.2.el7.x86_64
efi/
grub2/
initramfs-0-rescue-b00f5bf4f58746a0a8e879b918fc99ec.img
initramfs-3.10.0-1127.18.2.el7.x86_64.img
initramfs-3.10.0-1127.19.1.el7.x86_64.img
initramfs-3.10.0-1160.2.2.el7.x86_64.img
symvers-3.10.0-1127.18.2.el7.x86_64.gz
symvers-3.10.0-1127.19.1.el7.x86_64.gz
symvers-3.10.0-1160.2.2.el7.x86_64.gz
System.map-3.10.0-1127.18.2.el7.x86_64
System.map-3.10.0-1127.19.1.el7.x86_64
System.map-3.10.0-1160.2.2.el7.x86_64
vmlinuz-0-rescue-b00f5bf4f58746a0a8e879b918fc99ec*
vmlinuz-3.10.0-1127.18.2.el7.x86_64*
vmlinuz-3.10.0-1127.19.1.el7.x86_64*
vmlinuz-3.10.0-1160.2.2.el7.x86_64*
I believe GRUB2's default setting is 5 for the number of items you can choose from during its boot menu, such that as you continue to update to a new kernel the really old ones eventually do get purged. But this happens under /boot
not on the efi
partition so if you wanted to keep a lot then I think you should worry about the size of /boot
. I have not experienced a need yet to make the EFI
partition greater than 100MB. I would agree that making the EFI partition 500mb is getting to be wasteful.
if I had to guess it may be that fw folder under EFI, where one would put firmware files to make them available during boot for a firmware update or install. But that process can and is often done with those files on an external usb and I'm not aware of an actual requirement of something that must reside on the EFI partition in such a manner. So the question becomes do you want to maintain a 500mb efi partition for something you may never do.