Booting Void Linux Directly via EFI Stub (No GRUB)

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.


πŸ“‹ Prerequisites

πŸ“ Step 1: Verify Kernel EFI Stub Support

Run:

grep EFI_STUB /boot/config-$(uname -r)

Output should include:

CONFIG_EFI_STUB=y

πŸ“‚ Step 2: Prepare Kernel and Initramfs

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.

πŸ“‚ Step 3: Create a UEFI Boot Entry

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:

Check your root partition with:

lsblk

πŸ’‘ Optional: Automate EFI Boot Entry Updates

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.

  1. Edit the configuration file:
    sudo nano /etc/default/efibootmgr-kernel-hook
  2. Enable automatic EFI updates by setting:
    MODIFY_EFI_ENTRIES=1
    EFI_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.

πŸ”€ Step 4: Reboot and Test

After rebooting, your system should boot directly into Linux using the EFI stub.

Check with:

sudo dmesg | grep EFI

🧹 (Optional) Remove GRUB

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.

πŸ”§ Notes

πŸ“š References


***Et voilΓ ***