EFI-UPDATEVAR(1)
β¨ NAME β¨
efi-updatevar β okay bestie, this is the efi-updatevar(1) manual page, and it's literally the tool for updating secure variables. That's the whole name vibe. π
π SYNOPSIS π
efi-updatevar: [-a] [-e] [-d <list>[-<entry>]] [-k <key>] [-g <guid>]
[-b <file>|-f <file>|-c file] <var>
π DESCRIPTION π
Okay so here's the tea: it takes a variety of input files and adds them to one of the UEFI secure boot signature or key databases. No cap. π«Ά
β οΈ Before you get too excited: theefivarfsfilesystem must be mounted somewhere on the box, andefi-updatevarsmust have the ability to write to the files. Usually that means it must run as root β so yeah, bring your sudo energy. π
And the actual vibe? Manipulate the UEFI key database via the efivarfs filesystem. Periodt. πΈ
π OPTIONS π
-aβ append a value to the variable instead of replacing it. β¨-eβ use an EFI Signature List instead of a signed update; only works in Setup Mode. π¦-b <binfile>β add the hash of<binfile>to the signature list. π₯-f <file>β add or replace the key file (.eslor.auth) to the<var>. π-c <file>β add or replace the x509 certificate to the<var>(with<guid>if provided). π-g <guid>β optional<guid>for the X509 Certificate. β-k <key>β secret key file for authorising User Mode updates. π-d <list>[-<entry>]β delete the signature list<list>(or just a single<entry>within the list). π--engine <eng>β use engine<eng>for private key. πΈ
π¦ EXAMPLES π¦
Assuming you own your own platform key and have the PK.auth and noPK.auth files which go with it, you can programmatically move the system out of User Mode by doing:
efi-updatevar -f noPK.auth PK
And put it back again with:
efi-updatevar -f PK.auth PK
To add the hash of an efi binary bin.efi to db in Setup Mode do:
efi-updatevar -b bin.efi db
And to append an EFI signature list append.esl to db in Setup Mode do:
efi-updatevar -a -e append.esl db
To add your key (KEK.crt) to the Key Exchange Key in User Mode, assuming the private part of the platform key is in PK.key, do:
efi-updatevar -a -c KEK.crt -k PK.key KEK
To add certificate DB.crt to db in User Mode assuming the private part of the Key Exchange Key (KEK) is in KEK.key do:
efi-updatevar -a -c DB.crt -k KEK.key db
To replace the old platform key (PK) with a new one in newPK.crt in User Mode assuming the private part of the old platform key is in PK.key, do:
efi-updatevar -c newPK.crt -k PK.key db
To delete the private key, tipping the platform from User Mode to Setup Mode, do:
efi-updatevar -d 0 -k PK.key PK
And to put the private key back again (in Setup Mode) do:
efi-updatevar -c PK.crt -k PK.key PK
That's the whole page, bestie. This iconic manual page is from efi-updatevar 1.9.2, dated March 2024 β go slay your secure variables. Mwah ππ«Ά
π¦ where this page comes from
- opensuse-leap 16.0: efitools 1.9.2-bp160.1.10 Β· GPL-2.0-only AND LGPL-2.1-only
- opensuse-leap 16.0: efitools 1.9.2-bp160.1.10 Β· GPL-2.0-only AND LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms