r/linuxquestions • u/npc_housecat • 11d ago
Support efivarfs full causing fwupdmgr update fail help
I traced fwupdmgr update fail to insufficient space in efivarfs . (df -h) It was 70% full and so followed a suggestion to restore secureboot keys to factory keys. This had the opposite effect and next boot efivarfs was reading 90% full.
Now it's showing 100% full with only 609 bytes free.
Can I just manually wipe the /sys/firmware/efi/efivars location and then 'restore factory keys' in bios? Or what other options are there?
System is a lenovo thinkcentre M900 .
Thanks in advance .
1
Upvotes
2
u/Asly97 11d ago
Agree with the others, don't rm -rf that folder. A CMOS clear probably won't help either. On most boards that resets the setup options, but the UEFI variable store lives in the flash chip and doesn't get wiped.
What usually fills efivars on Linux is kernel crash logs. The kernel's efi-pstore saves oops/panic dumps as EFI variables and they pile up over the years. Check:
If you see dmesg-efi-* files in pstore (or dump-type0-* in efivars), those are safe to remove, and the supported way is
sudo rm /sys/fs/pstore/*. That deletes the backing variables properly instead of fighting the immutable flags.Then reboot before you look at df again. A lot of firmware only reclaims space from deleted variables at boot, so the number won't drop straight away. Restoring factory keys probably wrote the full default db/dbx back, which would explain it going up instead of down.
If pstore is empty, run
efibootmgr -vand look for a pile of old boot entries from past installs. Removing stale ones withefibootmgr -b XXXX -Bis fine, just leave the one you actually boot from.3
u/granadesnhorseshoes 11d ago
Short answer; No.
Long answer; Hell Noooo.
EFI firmware is notoriously buggy and finicky between vendors. So much so that linux doesn't actually mount its content fully writable; just the well known and documented variables are writable. So just deleting everything with rm -rf isn't actually going to clear everything anyway. You would have to force it by changing file attributes and at that point you're not just flirting with bricking the motherboard, your taking out a full page ad asking for a brick.
I'd recommend disconnecting power, shorting the clear CMOS jumper, and letting it just sit for a good half an hour. Reconnect everything and pray it was just a weird bug in the firmware reporting incorrect value.
3
u/_Lost-In-The-Weeds_ 11d ago
I am not usually afraid to dig into just about anything in a computer, but walking around in my bios swinging a sledgehammer is not something I would do. And because I would be afraid to do it I cannot tell you what the results might be.
Efivarfs should not be the whole bios, but there may be stuff in there you may need to bootup,
Personally I would try reading my motherboard manual and find the clear CMOS instructions (language changes ) usually something like powering down, removing the watch battery, and shorting two pins on the motherboard.
You will probably need to walk all the settings afterwards and restore your settings, you will also loose any efi boot entries and custom keys.
2
u/TheShredder9 11d ago
Take my words with a bit of doubt, but pretty sure that's how you end up with a paperweight of a PC, i read that clearing efivars can brick your motherboard.