VIRT-FW-VARS(1)
π¦ NAME π¦
okay so this is the manual page for virt-fw-vars (that's version 26.10 bestie, remember that number π)
β¨ DESCRIPTION β¨
the virt-fw-vars utility is literally the moment for printing and modifying UEFI variable stores. the formats it supports are standard edk2 (the one ovmf and armvirt use, iykyk) and aws. that's it. that's the whole vibe.
here's the usage, copied exactly so you can't mess it up:
usage: virt-fw-vars [-h] [-l LEVEL] [-i FILE] [--inplace FILE]
[--extract-certs] [-d VAR] [--set-true VAR]
[--set-false VAR] [--set-json FILE] [--set-boot-uri LINK]
[--append-boot-filepath FILE] [--set-shim-debug]
[--set-shim-verbose] [--set-fallback-verbose]
[--set-fallback-no-reboot] [--set-sbat-level FILE] [--set-pk GUID
FILE] [--add-kek GUID FILE] [--add-db GUID FILE] [--add-db-hash
GUID HASH] [--set-dbx FILE] [--add-dbx FILE] [--add-dbx-cert GUID
FILE] [--add-dbx-hash GUID HASH] [--add-mok GUID FILE]
[--add-mok-hash GUID HASH] [--enroll-redhat] [--enroll-microsoft]
[--enroll-cert CERT] [--enroll-generate CN] [--enroll-mgmt]
[--no-microsoft] [--microsoft-db
{none,win11,win23,win+rom23,uefi11,uefi23,uefi+rom23,redhat,redhat+rom,all}]
[--microsoft-kek {none,2011,2023,all}] [--distro-keys DISTRO]
[--distro-list] [--sb] [-p] [-v] [--hashes] [-x] [-o FILE]
[--output-aws FILE] [--output-json FILE] [--output-auth DIR]
Print and modify EFI variable stores. periodt. π
π options: π
-h,--helpβ show this help message and dip out (exit)-l,--loglevel LEVELβ set loglevel to LEVEL-i,--input FILEβ read edk2 or aws vars from FILE--inplace,--in-place FILEβ modify FILE in place (yes, right there, no copy π)--extract-certsβ extract all certificates
πΈ Variable options: πΈ
-d,--delete VARβ delete variable VAR, and yep you can specify it multiple times--set-true VARβ set variable VAR to true, can be specified multiple times--set-false VARβ set variable VAR to false, can be specified multiple times--set-json FILEβ set variables from json dump FILE
π§ Boot configuration: π§
--set-boot-uri LINKβ set network boot uri to LINK (once, usingBootNext)--append-boot-filepath FILEβ append boot entry for FILE (permanent, usingBootOrder)
β shim.efi configuration: β
--set-shim-debugβ enable shim.efi debugging (it pauses for debugger attach, so don't panic when it just sits there π)--set-shim-verboseβ enable shim.efi verbose messages--set-fallback-verboseβ enable fallback.efi verbose messages--set-fallback-no-rebootβ disable rebooting for fallback.efi--set-sbat-level FILEβ setSbatLevelvariable
π Secure boot setup options: π
--set-pk,--set-pk-cert GUID FILEβ set PK to x509 cert, loaded in pem or der format from FILE and with owner GUID--add-kek,--add-kek-cert GUID FILEβ add x509 cert to KEK, loaded in pem or der format from FILE and with owner GUID, can be specified multiple times--add-db,--add-db-cert GUID FILEβ add x509 cert to db, loaded in pem or der format from FILE and with owner GUID, can be specified multiple times--add-db-hash GUID HASHβ add sha256 HASH to db, with owner GUID, can be specified multiple times--set-dbx FILEβ initialize dbx with update from FILE--add-dbx FILEβ append dbx update from FILE--add-dbx-cert GUID FILEβ add x509 cert to dbx, loaded in pem or der format from FILE and with owner GUID, can be specified multiple times--add-dbx-hash GUID HASHβ add sha256 HASH to dbx, with owner GUID, can be specified multiple times--add-mok,--add-mok-cert GUID FILEβ add x509 cert toMokList, loaded in pem or der format from FILE and with owner GUID, can be specified multiple times--add-mok-hash GUID HASHβ add sha256 HASH toMokList, with owner GUID, can be specified multiple times
π₯ Secure boot convinience shortcuts: π₯
(that spelling is straight from the original, don't come for me π«Ά)
--enroll-redhatβ enroll default certificates for redhat platform--enroll-microsoftβ enroll default certificates for microsoft oem platform--enroll-cert CERTβ enroll using specified certificate--enroll-generate CNβ enroll using generated cert with given common name--enroll-mgmtβ enroll using external management guid--no-microsoftβ same as"--microsoft-db none"--microsoft-db,--profile{none,win11,win23,win+rom23,uefi11,uefi23,uefi+rom23,redhat,redhat+rom,all}β choose microsoft db keys to enroll--microsoft-kek {none,2011,2023,all}β choose microsoft KEK keys to enroll--distro-keys DISTROβ add ca keys for DISTRO--distro-listβ list known distros--sb,--secure-bootβ enable secure boot mode
π Print options: π
-p,--printβ print varstore-v,--verboseβ print varstore verbosely (the way that this one gives main character energy in a terminal, honestly)--hashesβ print signature db sha256 hashes-x,--hexdumpβ print variable hexdumps
π Output options: π
-o,--output FILEβ write edk2 or aws vars to FILE, using the same format the--inputFILE has.--output-aws FILEβ write aws vars to FILE--output-json FILEβ write json dump to FILE--output-auth DIRβ write*.authfiles to DIR
πΈ EXAMPLES πΈ
Print variable store. β the chill one, look at your vars:
virt-fw-vars --input ${guest}_VARS.fd \
--print --verbose
Enroll default (microsoft) secure boot certificates β the glow-up one:
virt-fw-vars --input OVMF_VARS.fd \
--output OVMF_VARS.secboot.fd \
--enroll-redhat \
--secure-boot
π AUTHOR π
Gerd Hoffmann <kraxel@redhat.com> β an absolute icon, no cap π
and that's the whole page bestie!! this was virt-fw-vars version 26.10, dated October 2026 β go print a varstore for me, ily, bye π«Άβ¨π
π¦ where this page comes from
- arch rolling: virt-firmware 26.10-2 Β· GPL-2.0-or-later
- centos-stream 10: python3-virt-firmware 26.10-1.el10 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms