rhboot/efivar

Read (and write) the various OVMF_VARS.fd formats

Opened this issue · 3 comments

OVMF and AAVMF store variables on disk in a format related to the same format EDK2 stores them in on flash, in a file names OVMF_VARS.fd. It would be useful to be able to read and write variables in those formats.

Is this already handled by --fromfile?

# efivar --list --fromfile my-test-vm.OVMF_VARS.fd
184220a2-e14c-4497-85bb-1490a9a1f0d3-CpuNvramData
8be4df61-93ca-11d2-aa0d-00e098032b8c-BootOrder
###etc.
baloo commented

I've had success playing with https://github.com/hlandau/ovmfvartool we integrated that in the nixos-test process over at nixos. Makes it easy to play with UEFI vars.

Because I'm seeing this issue here and @baloo is pointing out ovmfvartool, I can also highly recommend https://gitlab.com/kraxel/virt-firmware . It's sort of focused on provisioning Secure Boot parameters/certs/things, but it also let's you change/write existing variables. I have not found a way to add a variable with it though.