Linux userspace tools for UEFI firmware

created onNovember 23, 2025

efibootmgr

The main application of is to change the UEFI boot manager configuration. It can as wel just list the EFI vars exposed by the efivarfs.

The parameter in some examples below is rarely necessary, but it makes the output more legible.

list all boot entries, boot order and currently booted entry

set boot order for boot entries

with , , being the four-digit boot number listed with

adding a new boot entry

To add a new boot option, you need to the following information:

  • disk and partition number of the ESP (EFI System Partition) – you can check the for this or use .
  • path to the UEFI image or UKI (Unified kernel Image), relative to the root of the ESP.

Example: on my machine, the ESP is on /dev/nvme0n1p, partition 1, mounted on . To add a boot option for where /boot/efi is the mount point of the ESP, I run:

efibootmgr --create --disk /dev/nvme0 --part 1 --loader '\EFI\refind\refind_x64.efi' --label 'rEFInd Boot Manager' --unicode

delete a boot entry:

where is a four digit hexadecimal number with leading zeros (0). The hexadecimal number can contain the digits 0-9 and the upper case characters A-F, so the theoretical range is 0000-FFFF. The usual prefix is omitted.

efivar EFI variables viewer

EFI vars exposed to userspace can be listed with . Shortened example output:

... e20939be-32d4-41be-a150-897f85d49829-MemoryOverwriteRequestControl 73dad563-8f27-42af-918f-8651eb0a93ef-Ep 8be4df61-93ca-11d2-aa0d-00e098032b8c-Boot0002 8be4df61-93ca-11d2-aa0d-00e098032b8c-Boot0001 01368881-c4ad-4b1d-b631-d57a8ec8db6b-MonotonicCounter 8be4df61-93ca-11d2-aa0d-00e098032b8c-BootOrder 8be4df61-93ca-11d2-aa0d-00e098032b8c-Boot0000 8be4df61-93ca-11d2-aa0d-00e098032b8c-Boot0005 964e5b21-6459-11d2-8e39-00a0c969723b-EDD30 a9b5f8d2-cb6d-42c2-bc01-b5ffaae4335e-PBRDevicePath 9d0da369-540b-46f8-85a0-2b5f2c301e15-EfiTime...

An EFI variable can be printed with . From the variable list above, an example output for rEFInd, :

GUID: 8be4df61-93ca-11d2-aa0d-00e098032b8c Name: "Boot0002" Attributes: Non-Volatile Boot Service Access Runtime Service Access Value: 00000000 01 00 00 00 58 00 56 00 6f 00 69 00 64 00 20 00 |....X.V.o.i.d. .| 00000010 4c 00 69 00 6e 00 75 00 78 00 20 00 77 00 69 00 |L.i.n.u.x. .w.i.| 00000020 74 00 68 00 20 00 6b 00 65 00 72 00 6e 00 65 00 |t.h. .k.e.r.n.e.| 00000030 6c 00 20 00 36 00 2e 00 31 00 32 00 00 00 04 01 |l. .6...1.2.....| 00000040 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 00 e0 |*...............| 00000050 2e 00 00 00 00 00 b1 81 6a 0d 85 fd c4 43 ba 2a |........j....C.*| 00000060 3d 99 c3 7a 89 c7 02 02 04 04 2a 00 5c 00 56 00 |=..z......*.\.V.| 00000070 4d 00 4c 00 49 00 4e 00 55 00 5a 00 2d 00 36 00 |M.L.I.N.U.Z.-.6.| 00000080 2e 00 31 00 32 00 2e 00 33 00 35 00 5f 00 31 00 |..1.2...3.5._.1.| 00000090 00 00 7f ff 04 00 72 00 6f 00 6f 00 74 00 3d 00 |......r.o.o.t.=.| 000000a0 2f 00 64 00 65 00 76 00 2f 00 6e 00 76 00 6d 00 |/.d.e.v./.n.v.m.| 000000b0 65 00 30 00 6e 00 31 00 70 00 35 00 20 00 69 00 |e.0.n.1.p.5. .i.| 000000c0 6e 00 69 00 74 00 72 00 64 00 3d 00 2f 00 69 00 |n.i.t.r.d.=./.i.| 000000d0 6e 00 69 00 74 00 72 00 61 00 6d 00 66 00 73 00 |n.i.t.r.a.m.f.s.| 000000e0 2d 00 36 00 2e 00 31 00 32 00 2e 00 33 00 35 00 |-.6...1.2...3.5.| 000000f0 5f 00 31 00 2e 00 69 00 6d 00 67 00 |_.1...i.m.g. |

and for Void Linux Kernel, :

GUID: 8be4df61-93ca-11d2-aa0d-00e098032b8c Name: "Boot0002" Attributes: Non-Volatile Boot Service Access Runtime Service Access Value: 00000000 01 00 00 00 58 00 56 00 6f 00 69 00 64 00 20 00 |....X.V.o.i.d. .| 00000010 4c 00 69 00 6e 00 75 00 78 00 20 00 77 00 69 00 |L.i.n.u.x. .w.i.| 00000020 74 00 68 00 20 00 6b 00 65 00 72 00 6e 00 65 00 |t.h. .k.e.r.n.e.| 00000030 6c 00 20 00 36 00 2e 00 31 00 32 00 00 00 04 01 |l. .6...1.2.....| 00000040 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 00 e0 |*...............| 00000050 2e 00 00 00 00 00 b1 81 6a 0d 85 fd c4 43 ba 2a |........j....C.*| 00000060 3d 99 c3 7a 89 c7 02 02 04 04 2a 00 5c 00 56 00 |=..z......*.\.V.| 00000070 4d 00 4c 00 49 00 4e 00 55 00 5a 00 2d 00 36 00 |M.L.I.N.U.Z.-.6.| 00000080 2e 00 31 00 32 00 2e 00 33 00 35 00 5f 00 31 00 |..1.2...3.5._.1.| 00000090 00 00 7f ff 04 00 72 00 6f 00 6f 00 74 00 3d 00 |......r.o.o.t.=.| 000000a0 2f 00 64 00 65 00 76 00 2f 00 6e 00 76 00 6d 00 |/.d.e.v./.n.v.m.| 000000b0 65 00 30 00 6e 00 31 00 70 00 35 00 20 00 69 00 |e.0.n.1.p.5. .i.| 000000c0 6e 00 69 00 74 00 72 00 64 00 3d 00 2f 00 69 00 |n.i.t.r.d.=./.i.| 000000d0 6e 00 69 00 74 00 72 00 61 00 6d 00 66 00 73 00 |n.i.t.r.a.m.f.s.| 000000e0 2d 00 36 00 2e 00 31 00 32 00 2e 00 33 00 35 00 |-.6...1.2...3.5.| 000000f0 5f 00 31 00 2e 00 69 00 6d 00 67 00 |_.1...i.m.g. |

tools for building UKIs

Tools for building UKIs (Unified Kernel Images) include and . The dracut man page describes dracut as a “low-level tool for generating an initramfs/initrd image”", but with in dracut’s config, dracut builds an UEFI image that is executable be an UEFI firmware. There also exist projects with shell scripts that promise to make the build process easier, like the Stubby UEFI bootloader and the EFI Unified Kernel Image Maker.

obtaining an UEFI boot stub

To build an UKI you need at least a Linux kernel and an UEFI boot stub. Below are some projects that provide an UEFI boot stub:

  • gummiboot boot manager – On Void Linux, the package gummiboot-efistub provides an UEFI boot stub.

efi-mkuki EFI Unified Kernel Image Maker

Repo: GitHub jirutka/efi-mkuki

efi-mkuki is a shell script for creating an UKI. It does not come with an UEFI boot stub.

uefitool

UEFITool (binary: uefitool) is a GUI UEFI firmware image viewer and editor.

some older projects

uefivars

  • Dumps list of UEFI variables with some additional PCI related info (uses efibootmgr code internally).
  • Last update was around 2012.
  • Available on GitHub, fpmurphy/Various/uefivars-2.0.

efitools

  • Tools for manipulating UEFI secure boot platforms.
  • Last update was around 2021.
  • Available on git.kernel.org, kernel/git/jejb/efitools.git.
x