1

Do gibberish characters found in EFI variables serve any purpose?

Out of curiosity, i am trying to read out EFI variables. Specifically ones related to the booting mechanism.

Under /sys/firmware/efi/efivars one can find boot entries such as Boot000, Boot001, etc. However, opening one up with VIM, and decoding it with UCS-2le (i'm assuming the prescribed encoding for (U)EFI), mostly gives me gibberish characters.

Not just that, mind you. It does give me the location of bootmgfw.efi, and other data such as the label for the boot entry, for example. But it is also full of gibberish characters (in this specific context).

A few examples:

^@^@^A^@
痧駢疠

Anyone have any ideas?

1 Answer 1

3

The gibberish is a mix of:

  • Binary metadata (integers, GUIDs, flags)

  • Misinterpreted UCS-2 encoding of non-textual data

  • Device paths, binary format

efibootmgr parse this correctly, raw inspection requires knowing the UEFI structs.

efibootmgr is a userspace application used to modify the Intel Extensible Firmware Interface (EFI) Boot Manager. This application can create and destroy boot entries, change the boot order, change the next running boot option, and more.

Show readable boot entries:

efibootmgr -v

efivar to manipulate UEFI variables

This program manages "Unified Extensible Firmware Interface" (UEFI) en- vironment variables

efitools for manipulating EFI secure boot environments

This package installs a variety of tools for manipulating keys and binary signatures on UEFI secure boot platforms. The tools provide access to the keys and certificates stored in the secure variables of the UEFI firmware, usually in the NVRAM area.

Comment from @oldfred:

Some details:

  • uefi.org/specifications EFI boots using gpt GUID and then path. efibootmgr used to require -v to see details over just name/label of entry, Newer version gives too much detail with -v and just sudo efibootmgr shows guid & path.

Linux tools show GUID as partUUID lsblk -e7 -f -o +parttype,PARTUUID Setting boot,esp flags set parttype to correct GUID type.

Other Sources:
0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.