DEV Community

Khadija Umar Danhassan
Khadija Umar Danhassan

Posted on

/efi/boot filled up - quick fix

So I recently dual-booted Ubuntu to Windows on my HP laptop, and I loved the change for my development (java). Ubuntu is smooth, flexible and generally works great without too much lag.

EFI SURPRISE!

About a week ago I got a pop up message when I logged on to Ubuntu

''' Low Disk Volume on "efi" '''

I had no idea what efi was and why there was such low disk volume on it, but it didn't sound positive, low anything never sounds positive.
So I put on my thinking hat, and deep dived into the world of web resarch. Most resources suggested increasing /boot/efi space by booting from a Live USB and using tools like GParted to resize partitions, or worse — reinstalling Ubuntu. Neither of these were options for me at the time.

So I did what any confused dev with no guru to guide them would do, I consulted the OG chatgpt! BUT WITH A BADASS PROMPT FROM aiforwork.co

1. Checking/confirming /efi/boot space

To check the available space, I ran these commands:

df -h /boot/efi
sudo du -sh /boot/efi/*
Enter fullscreen mode Exit fullscreen mode

And yes my disk was indeed full:
Result from command above

2. Diagnosing what's taking up space

I ran a few more commands recommended by my OG (chatgpt)

sudo tree /boot/efi/EFI -L 3
sudo du -sh  /mnt/EFI/*
Enter fullscreen mode Exit fullscreen mode

These came back with permisson errors or missing directories messages. My OG said:

CHATGPT raising my bp

At this point I was alarmed. Most of the options my OG gave me involed an external disk to fix the internal problem, I just didn't have this luxury at the time, which led me to the next step.

3. Manually deleting files/folders to create space

Instead of finding a disk or some complicated partition tool, I decided to delete things I didn't need,from analysis HP/Microsoft took most of the space, so I moved to the Microft folder and removed unnecessary language packs:

cd /boot/efi/EFI/Microsoft/Boot
ls -d */ | grep -E '[a-z]{2}-[A-Z]{2}'
sudo rm -r en-GB fr-FR et-EE de-DE  # replace with what you see
Enter fullscreen mode Exit fullscreen mode

Got some space freed! Took it a step further and also deleted BIOSUpdate (also not essesntial).

cd /boot/efi/EFI/HP
ls -lh
sudo rm -r BIOSUpdate
Enter fullscreen mode Exit fullscreen mode

Then I got more free space!! I ran the df command again to check for disk usage, and it dropped to this^^ super proud
Space freed after running the commands above

Wrapping it up

Don't panic, don't wipe your system. With a little guidance and the right terminal commands, you can repair EFI safely and reclaim your boot partition without needing a Live USB.

I hope this helps. Don't forget to check the man pages for the usage of the commands above. For more experienced devs if you have further explanation on how to fix this issue even more, do let me know. Thank you

Top comments (0)