both these mention you can do this removing of non-permission stuff in the efivar
s directory: https://bbs.archlinux.org/viewtopic.php?id=290493 and https://wiki.archlinux.org/title/Unified_Extensible_Firmware_Interface#Disable_UEFI_variable_access as a method to thin out entries. Neither say this guaranteed not bricking the system especially in older hardware.
second thread is how to make it smaller via EFI shell (ever work in the EFI shell? I have. It sucks!)
interesting convo in first thread though you should read it:
person trying to help: "What I've realized is if I have a lot of boot entries or signed kernels saved into NVRAM it'll erroneously fill up the space on the mobo.
A few generations ago clearing close used to also clear the UEFI variables as well. But now most of them seem to be persistant.
One little trick if you have AMI bios is you can use something like
shellx64.efi
or the onboard UEFI shell and actually clear them from the UEFI environment using
dmpstore -d -all
. The system critical variables should be write protected and all others added over time should be deleted and/or re-added over time if they were important to runtime.
PLEASE NOTE: That on older boards (think pre z590/Intel 10th gen) this can actually brick your system. Particularly if you do not have a function to flash the board externally. If in doubt. DON'T do it.
With that being said I can speak for most consumer boards newer than 11th gen Intel it simply has the same function as clearing the CMOS.
Hope this helps"
OP reply: "Thanks all for your ideas!
To be fair my UEFI might very well suck; this is a rather old ASUS laptop (Intel 6th generation), and there are plenty of things that suck on it... and I wouldn't touch the vendors UEFI implementation with a 10m-long pole wink
I actually ended up solving this inadvertently when I installed a firmware update with sudo fwupdmgr get-updates
— that cleared something like 40 kB of the UEFI space. I'm not sure exactly what happened there, but I'll live by "if it works don't fix it".
he decided against fixing but note how he 'solved' it--by taking off a chunk (albeit tiny at 40kb---typo??) with the firmware update command.
the second link is basically a typical Arch surgery primer of efivars
w/a little background:
"UEFI defines variables through which an operating system can interact with the firmware. UEFI boot variables are used by the boot loader and used by the OS only for early system start-up. UEFI runtime variables allow an OS to manage certain settings of the firmware like the UEFI boot manager or managing the keys for UEFI Secure Boot protocol etc. You can get the list using:
$ efivar --list
UEFI variables support in Linux kernel
_Linux kernel exposes UEFI variables data to userspace via efivarfs (EFI VARiable FileSystem) interface (CONFIG_EFIVAR_FS) - mounted using efivarfs kernel module at /sys/firmware/efi/efivars - it has no maximum per-variable size limitation and supports UEFI Secure Boot variables. Introduced in kernel 3.8. "_
In the middle of the surgery primer is lists 5 tool to thin out efivars of 'manipulate' it:
"Userspace tools
There are few tools that can access/modify the UEFI variables, namely
efivar — Library and Tool to manipulate UEFI variables (used by efibootmgr)
https://github.com/rhboot/efivar || efivar
efibootmgr — Tool to manipulate UEFI Firmware Boot Manager Settings
https://github.com/rhboot/efibootmgr || efibootmgr
uefivars — Dumps list of UEFI variables with some additional PCI related info (uses efibootmgr code internally)
https://github.com/fpmurphy/Various/tree/master/uefivars-2.0 || uefivars-gitAUR
efitools — Tools for manipulating UEFI secure boot platforms
https://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git || efitools
Ubuntu's Firmware Test Suite — Test suite that performs sanity checks on Intel/AMD PC firmware
https://wiki.ubuntu.com/FirmwareTestSuite/ || fwts-gitAUR"
I took the liberty of italicizing what I thought was important, not the original authors.
Looks like this: doable? hell yes. Risky as snot? another hell yes.
thatfwupd
firmware update looks the most safe to me. I saw a thread on Solus forum about Forum users who regularly use that command.
becauseefibootmgr
is a useless tool for me (changes NEVER stick) I've tried to make cleanup moves in the EFI shell. days of failure there, too. syntax and commands from Mars to me...
edit: to turn all those words into a couple: what you want looks dangerous unless you know one of those tools well...