Has anyone else had this issue before when updating the BIOS on PopOS or any Linux flavor?
I'm running PopOS 22.04 on a Dell XPS 13 9300 and when I try to update the Dell firmware from 1.17.0 to 1.18.0 I get the following error:
error in fwupd client: calling Install method failed: /boot/efi does not have sufficient space, required 59.2 MB, got 48.6 MB
Running sudo apt autoremove does not fix this. Running sudo fwupdmgr refresh --force and then sudo fwupdmgr update still has the error.
I would really like to not have to backup and resize and pray that nothing breaks when resizing the main partition for more space. Plus there's no good guide on exactly what steps to take for that.
Any help would be appreciated.
More info:
sudo ls /boot/efi
EFI f52dfaf1ebdd214ad023db586322b2ef loader
Yes, I've run into this issue recently. The /boot/efi folder is actually its own partition, so removing packages from / will not give your more space for the efi partition. On my recentish Pop install, the /boot/efi partition is about 512MB which is just about enough space for two kernels but... not much else (they may have increased this to 1GB for new installs).
The workaround I did was to simply delete one of the kernels in /boot/efi/EFI/Pop_OS-... (the ... is some string of letters). In this folder you should have the following:
As you can see, Pop stores the current kernel (vmlinuz) and ramdisk (initrd) along with the corresponding previous versions in case you need/want to revert back to the previous kernel. To free up some space, you can simply delete either the initrd.img-previous or vmlinuz-previous.efi file if you are not using the previous kernel. That should allow you to then download the firmware and update it.
After the firmware update, if you want to restore the previous (backup) kernel, you can copy it from /boot back to the efi folder above. Otherwise, the next kernel update will replace it for you anyways.
Thank you so much for this. It made a lot of sense and I followed exactly and it all worked! Which makes sense. I ended up removing the initrd.img-previous and went through with the update. Eventually maybe I'll need to resize the partition but for now this is my solution.
If you have an older installation with a the 512 MB EFI partition, you need to edit /etc/initramfs-tools/initramfs.conf and set COMPRESS to xz. Then the next time you update the initramfs (sudo update-initramfs -c -k all), it should recover around 150 MB of space. We will probably change this to xz soon.
I just did this and was able to recover closer to 100MB (now have 128MB available)... still a great improvement. Boot times don't appear to be impacted, though compression is slower (almost 3-4x slower).