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/efi
efibootmgr
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/Linux
sudo 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
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ร ***