isaiah@ilposton.com

EFISTUBMGR.CONF(5)

EFISTUBMGR.CONF(5) File Formats Manual EFISTUBMGR.CONF(5)

efistubmgr.confefistubmgr configuration file

The efistubmgr(1) utility creates EFI boot entries as specified in the efistubmgr.conf configuration file.

The file is interpreted as a sh(1) script.

The following required variables have special meaning to efistubmgr(1):

all
List of space-separated entries to generate. Each entry name is interpreted as the name of a function to call that sets entry configuration variables as needed.
cmdline
Parameters to append to kernel command line. efistubmgr.conf automatically adds 'root=' and 'rw' parameters. The value for 'root=' is automatically detected from the root partition's UUID.

The following optional variables have special meaning to efistubmgr(1):

disk
The disk containing the EFI System Partition (defaults to /dev/sda).
rootpart
Linux root partition (defaults to /dev/sda2). This partition's UUID is used as the value for the kernel parameter 'root='.
partition
Partition number containing EFI system partition (defaults to 1).

Entry functions listed in 'all=' must set at least 'label' and 'loader', so that the EFI firmware can provide a display label and know what to load for an entry.

The following variables, in entry functions, have special meaning to efistubmgr(1):

initrd
Optional location of the initial ramdisk on the EFI system partition. The path is relative to the EFI system partition's root and uses backslashes (\).
label
Display label for the EFI boot entry. This label may be shown by the boot manager when prompting to select an entry.
loader
Loader for the EFI boot entry. Usually, this is the path to the Linux kernel. The path is relative to the EFI system partition's root and uses backslashes (\).

/etc/efistubmgr.conf
The default efistubmgr(1) configuration file.

The following /etc/efistubmgr.conf defines a entry for a Linux kernel in ESP/vmlinuz-linux-lts with a corresponding initramfs in ESP/initramfs-linux-lts.img.

linux_lts() {
	initrd='\initramfs-linux-lts.img'
	label='Linux LTS Kernel'
	loader='\vmlinuz-linux-lts'
}

all="linux_lts"
cmdline='loglevel=3 quiet'

efistubmgr(1)

February 3, 2022 ilposton.com