This guide shows how to configure your Void Linux system to boot directly using the EFI stub, bypassing GRUB. This can lead to faster, simpler booting, especially on UEFI systems.
[ -d /sys/firmware/efi ] && echo "UEFI mode" || echo "Legacy BIOS mode")CONFIG_EFI_STUB=y)/boot/efiefibootmgr installed (for managing UEFI boot entries)Run:
grep EFI_STUB /boot/config-$(uname -r)
Output should include:
CONFIG_EFI_STUB=y
Copy the kernel and initramfs to the EFI System Partition:
sudo mkdir -p /boot/efi/EFI/Linuxsudo cp /boot/vmlinuz-$(uname -r) /boot/efi/EFI/Linux/sudo cp /boot/initramfs-$(uname -r).img /boot/efi/EFI/Linux/
If your initramfs has a different name (e.g., initrd.img-*), use that instead.
Use efibootmgr to create a boot entry pointing directly to your kernel:
sudo efibootmgr -c \
-d /dev/sdX \
-p Y \
-L "Linux EFI Stub" \
-l '\EFI\Linux\vmlinuz-<version>' \
-u "initrd=\EFI\Linux\initramfs-<version>.img root=/dev/sdZZ ro quiet splash"
Replace:
/dev/sdX β disk containing the EFI partition (e.g., /dev/sda)Y β EFI partition number (usually 1)<version> β kernel version (e.g., 6.1.130_1)/dev/sdZZ β your root partition (e.g., /dev/sda2)Check your root partition with:
lsblk
If you donβt want to manually repeat Step 3 after every kernel update, Void Linux provides a built-in script that can handle this automatically.
sudo nano /etc/default/efibootmgr-kernel-hook
MODIFY_EFI_ENTRIES=1EFI_KERNEL_OPTS="root=/dev/sdZZ ro quiet splash"EFI_LABEL="Void Linux EFI Stub"
From now on, future kernel updates will automatically create or update the UEFI boot entry.
After rebooting, your system should boot directly into Linux using the EFI stub.
Check with:
sudo dmesg | grep EFI
Once EFI stub boot is confirmed working, you can optionally remove GRUB:
sudo xbps-remove -R grub-x86_64-efi grub-i386-efi grub
β οΈ If efibootmgr gets removed, reinstall it.
And remove its files from the ESP:
sudo rm -rf /boot/efi/EFI/void_grub
β οΈ Only do this once you're sure the new boot method works.
man efibootmgr***Et voilΓ ***