Resizing small EFI partition

It started with the firmware failing to update because the EFI partition was low on free space. (Dell, why do you need 70 MB on the EFI while also making it as small as 150 MB at the same time?) Well, resizing the partition is the obvious solution except it ended in a wonderful error message:

GNU parted cannot resize this partition to this size. We're working on it!

(spoiler: they're not)

In my case the GPT partition was resized, just the filesystem was not grown, I only needed to reformat it.

The checklist for this is relatively simple and obvious, it's just quite scary to forget something before rebooting:

  • Backup /boot/efi:

    sudo tar cvzf /boot/efi.tgz /boot/efi
    
  • Unmount and format /boot/efi using parted. (I use gparted)

  • Get the new filesystem UUID from the partition properties:

    /images/misc/efi-fat32-parted/properties.avif
  • Update UUID record for /boot/efi in /etc/fstab and mount it:

    sudo mount /boot/efi
    
  • Restore /boot/efi content:

    sudo tar xvf /boot/efi.tgz -C /boot
    
  • (Only if you have dualboot with Windows. This step can be safely done later) Find and update UUID in the Windows section of /boot/grub2/grub.cfg

  • Reboot. Unless you forgot something, the system should boot successfully

Moral of the story for me is: if you do a manual partitioning, make EFI partition at least 256 MB, 300+ MB to be safe, 512 MB is a good choice.

Comments

Comments powered by Disqus