Sunday July 25 2021

Direct booting Linux on a EFI / UEFI system

I’ve never liked GRUB, I only begrudgingly configured it when needed. For awhile I used extlinux/syslinux because I personally found GRUB was such a pain to configure.

These days on modern system it’s trivial to configure the kernel to be booted directly.

For instance, on my Void Linux system:

# efibootmgr -c -p 4 -d /dev/nvme0n1 -L void -l /EFI/void/vmlinuz.efi \
  -u 'root=/dev/mapper/vg-root initrd=/EFI/void/initrd.img rootfstype=xfs ro rd.luks.uuid=<UUID> rd.luks.allow-discards rd.luks.crypttab=0'

Is the command I use to setup the boot entry for my Void Linux install on encrypted LVM.

Going over the arguments:

This is possible for most distributions that compile in the efistub option. This includes Ubuntu, Void, Arch, and probably others as well.

This also allows you to easily keep multiple Linux distributions on the same encrypted volume group and have separate boot entires from them and not have them step on each other’s toes with GRUB auto configuration.