Introduction to efivar

The efivar package provides tools and libraries to manipulate EFI variables.

This package is known to build and work properly using an LFS 12.0 platform.

Package Information

Additional Downloads

efivar Dependencies



Installation of efivar

First, fix an issue in Makefile causing the package to be rebuilt during installation:

sed '/prep :/a\\ttouch prep' -i src/Makefile


This package cannot function properly on a 32-bit system with a 64-bit UEFI implementation. Don't install this package (or efibootmgr) on 32-bit system unless you are absolutely sure you have a 32-bit UEFI implementation, which is very rare in practice.

If building this package on a 32-bit system, apply a patch:

[ $(getconf LONG_BIT) = 64 ] || patch -Np1 -i ../efivar-38-i686-1.patch

Build efivar with the following commands:

make ERRORS=

The test suite of this package is dangerous. Running it may trigger firmware bugs and make your system unusable without using some special hardware to reprogram the firmware.

Now, as the root user:

make install LIBDIR=/usr/lib

Command Explanations

ERRORS=: This option overrides the -Werror passed to GCC by default, so the package won't fail to build with the -Wenum-int-mismatch warning introduced in GCC 13.

LIBDIR=/usr/lib: This option overrides the default library directory of the package (/usr/lib64, which is not used by LFS.)


Installed Programs: efisecdb and efivar
Installed Libraries: libefiboot.so, libefisec.so, and libefivar.so
Installed Directories: /usr/include/efivar

Short Descriptions


is an utility for managing UEFI signature lists


is a tool to manipulate UEFI variables


is a library used by efibootmgr


is a library for managing UEFI signature lists


is a library for the manipulation of EFI variables