Fixed: Failed to write data to efivars on HP Z840 Workstation (Fedora)

- by

I’ve had an update message in Fedora for a while on my HP Z840 workstation. It was something about an EFI update with a patch against something about DBX and Black Lotus that sounded rather important, but for the life of me the update would never apply. It could update all other softwares, except for this one package. The exact error message I got was

Failed to write data to efivars

What the message did not tell me was that the issue was related to the virtual EFI partition running out of space. It needed to download 20kB of data, but only 18kB was free. To verify, check the size of the update against the output of this:

df -h /sys/firmware/efi/efivars

There’s no way to resize the partition as it gets created in RAM on boot, and there’s no way to delete data from it without consequences. To remedy the issue, I had to clear out old secure keys via the BIOS. This process will be individual to the hardware you’re using, but here’s what I did on my Z840 workstation to make it work:

  • press ESC after reboot to enter the BIOS
  • select BIOS Setup
  • select Advanced – Secure Boot Configuration
  • under Secure Boot Key Management, enable Clear Secure Boot keys
  • go back to the main menu and choose “Save Changes and Exit”

This will restart the workstation, asking you to type in a 4 digit code to confirm the key deletion, after which it will boot into your OS. After that I could apply the EFI patch and everything worked great.

I should mention that I’m not using Secure Boot on this system, and my boot configuration was set to Enable Legacy Support and Disable Secure Boot.

I’ve learnt all this from various internet searches, the most interesting of which was one from the OpenSUSE mailing list archive. Give this a read if you’re plagued by similar issues on your own (perhaps non-HP) system: https://lists.opensuse.org/archives/list/factory@lists.opensuse.org/thread/WJOQOJZ7DIJ3VIASX7F373XNK3LZUPBT/



If you enjoy my content, please consider supporting me on Ko-fi. In return you can browse this whole site without any pesky ads! More details here.

Leave a Comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.