A simple tool to extract current bios settings from linux. It could theoretically also write back, but I'm scared to do that :)
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-14 14:13:29 +02:00
.gitignore feat: initial init 2026-10-14 14:13:29 +02:00
efivars.go feat: initial init 2026-10-14 14:13:29 +02:00
fv.go feat: initial init 2026-10-14 14:13:29 +02:00
go.mod feat: initial init 2026-10-14 14:13:29 +02:00
go.sum feat: initial init 2026-10-14 14:13:29 +02:00
hii.go feat: initial init 2026-10-14 14:13:29 +02:00
ifr.go feat: initial init 2026-10-14 14:13:29 +02:00
ifr_test.go feat: initial init 2026-10-14 14:13:29 +02:00
main.go feat: initial init 2026-10-14 14:13:29 +02:00
README.md feat: initial init 2026-10-14 14:13:29 +02:00

asusbios

Extracts UEFI BIOS setup settings (HII/IFR) from a firmware image and prints every setup question with its varstore, byte offset, width and allowed values — the information needed to read or change BIOS settings from Linux via efivarfs, without booting into setup.

Works on AMI Aptio V images such as ASUS .CAP capsules, and also accepts raw SPI dumps, bare firmware volumes, or already-extracted module blobs.

Usage

asusbios [-v] [-grep <text>] [-values] [-nondefault] <bios.cap>
  • -grep <text> — only print questions whose prompt matches (case-insensitive).
  • -values — annotate each setting with its current value, read live from efivarfs (-efivars overrides the mount point). Settings that differ from their default are marked *CHANGED*.
  • -nondefault — only print settings whose current value differs from the default (implies -values).
$ asusbios -grep virtualization -values PRIME-Z490-P-ASUS-1806.CAP
== Module Setup (899407D7-99FE-43D8-9A21-79EC328CAC21) ==
  Form "CPU Configuration"
    OneOf "Intel (VMX) Virtualization Technology" [CpuSetup:0x0B4 1B] default=0 current=1 (Enabled) *CHANGED*
      0 = "Disabled" (default)
      1 = "Enabled"

The varstore name/GUID map to EFI variables in /sys/firmware/efi/efivars/<Name>-<guid>; the printed offset is relative to the variable's data (add 4 for the efivarfs attribute header). Reading current values only makes sense when the image given is the firmware the machine is actually running.

How it works

  1. Firmware volumes are located by their _FVH signature (this skips capsule headers and flash-descriptor layout transparently) and parsed with linuxboot/fiano, which also unpacks compressed/nested sections.
  2. Every leaf section is scanned for HII string packages (EFI_HII_SIBT_* blocks) and IFR formsets (EFI_IFR_FORM_SET … EFI_IFR_END).
  3. Questions (OneOf/Checkbox/Numeric/String) are printed with prompts resolved from the nearest English string package.

Non-goals

Writing settings back through efivarfs is deliberately not implemented: a bad write to a setup variable can brick the board until a CMOS clear. This tool stays read-only; change settings in BIOS setup (systemctl reboot --firmware-setup gets you there without key-mashing).