Fixing 'No space left on device' Error on an Old Dell's EFI Variables

2025-02-24

While migrating boot drives and setting up GRUB on an old (2011) Dell, the author encountered a 'Could not prepare boot variable: No space left on device' error. The `efivars` partition was full according to `df -h`, despite having only a few boot entries. Suspecting fragmented or unusable space in NVRAM, the author booted to an EFI shell and used `dmpstore` commands (`dmpstore -s efi-vars`, `dmpstore -d`, `dmpstore -l efi-vars`) to clean up EFI variables. This freed up space and resolved the issue. Caution: This process might brick your system; check `dmpstore`'s help before using these commands.

Hardware EFI variables