-
-
Notifications
You must be signed in to change notification settings - Fork 1
Arch Linux Bootloader Configuration
Complete beginner-friendly guide to configuring bootloaders on Arch Linux, including GRUB, systemd-boot, rEFInd, and Limine.
- Understanding Bootloaders
- GRUB Configuration
- systemd-boot Configuration
- rEFInd Configuration
- Limine Configuration
- Switching Bootloaders
- Troubleshooting
Bootloader is software that loads the operating system.
Functions:
- Loads kernel
- Initializes hardware
- Provides boot menu
- Handles dual-boot
How booting works:
- BIOS/UEFI initializes hardware
- Bootloader loads from disk
- Kernel starts
- Init system (systemd) starts
- System ready
Available bootloaders:
- GRUB: Most popular, feature-rich
- systemd-boot: Simple, UEFI only
- rEFInd: Beautiful, UEFI only
- Limine: Modern, simple
For UEFI systems:
# Install GRUB
sudo pacman -S grub efibootmgr
# Install to EFI partition
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUBFor BIOS systems:
# Install GRUB
sudo pacman -S grub
# Install to disk
sudo grub-install --target=i386-pc /dev/sdaExplanation:
-
--target=x86_64-efi: UEFI target -
--efi-directory: EFI partition mount point -
--target=i386-pc: BIOS target -
/dev/sda: Boot disk
Create boot menu:
# Generate GRUB config
sudo grub-mkconfig -o /boot/grub/grub.cfgThis scans for:
- Installed kernels
- Other operating systems
- Creates boot entries
Edit GRUB settings:
# Edit GRUB config
sudo vim /etc/default/grubCommon settings:
# Boot timeout (seconds)
GRUB_TIMEOUT=5
# Default boot entry
GRUB_DEFAULT=0
# Kernel parameters
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
# Enable os-prober (for dual-boot)
GRUB_DISABLE_OS_PROBER=falseAfter editing:
# Regenerate config
sudo grub-mkconfig -o /boot/grub/grub.cfgInstall themes:
# Install GRUB theme
sudo pacman -S grub-theme-vimix
# Or use AUR
yay -S grub-theme-poly-darkApply theme:
# Edit GRUB config
sudo vim /etc/default/grub
# Add theme
GRUB_THEME="/boot/grub/themes/theme-name/theme.txt"
# Regenerate
sudo grub-mkconfig -o /boot/grub/grub.cfgFor UEFI only:
# Install systemd-boot
bootctl install
# Or specify path
bootctl --path=/boot/efi installVerify installation:
# Check status
bootctl statusMain configuration:
# Edit loader config
sudo vim /boot/loader/loader.confExample configuration:
default arch.conf
timeout 3
editor no
Explanation:
-
default: Default boot entry -
timeout: Boot timeout (seconds) -
editor: Enable boot editor
Create boot entry:
# Create entry file
sudo vim /boot/loader/entries/arch.confExample entry:
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options root=UUID=xxxx-xxxx-xxxx rw
For LTS kernel:
sudo vim /boot/loader/entries/arch-lts.conftitle Arch Linux (LTS)
linux /vmlinuz-linux-lts
initrd /initramfs-linux-lts.img
options root=UUID=xxxx-xxxx-xxxx rw
Find root UUID:
# List filesystems with UUIDs
lsblk -fInstall rEFInd:
# Install rEFInd
sudo pacman -S refind-efi
# Install to EFI partition
sudo refind-installEdit rEFInd config:
# Edit config
sudo vim /boot/efi/EFI/refind/refind.confCommon settings:
timeout 5
default_selection 1
resolution 1920 1080
Install themes:
# Clone theme
git clone https://github.com/bobafetthotmail/refind-theme-regular.git /boot/efi/EFI/refind/themes/refind-theme-regular
# Edit config
sudo vim /boot/efi/EFI/refind/refind.confAdd to config:
include themes/refind-theme-regular/theme.conf
Install Limine:
# Install Limine
sudo pacman -S limine
# Or from AUR
yay -S limine-gitCreate Limine config:
# Create config
sudo vim /boot/limine/limine.cfgExample configuration:
:Arch Linux
PROTOCOL=linux
KERNEL_PATH=boot:///vmlinuz-linux
MODULE_PATH=boot:///initramfs-linux.img
CMDLINE=root=UUID=xxxx-xxxx-xxxx rw
Install to EFI:
# Install Limine
sudo limine-install /dev/sdaSteps:
-
Install systemd-boot:
bootctl install
-
Create boot entries:
sudo vim /boot/loader/entries/arch.conf
-
Remove GRUB (optional):
sudo pacman -R grub
Steps:
-
Install GRUB:
sudo pacman -S grub efibootmgr sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
-
Generate config:
sudo grub-mkconfig -o /boot/grub/grub.cfg
Regenerate GRUB:
# Reinstall GRUB
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
# Regenerate config
sudo grub-mkconfig -o /boot/grub/grub.cfgReinstall bootloader:
# For GRUB
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
# For systemd-boot
bootctl installEnable os-prober:
# Install os-prober
sudo pacman -S os-prober
# Edit GRUB config
sudo vim /etc/default/grubSet:
GRUB_DISABLE_OS_PROBER=false
Regenerate:
sudo grub-mkconfig -o /boot/grub/grub.cfgThis guide covered:
- Bootloader basics - What they do
- GRUB - Most popular bootloader
- systemd-boot - Simple UEFI bootloader
- rEFInd - Beautiful bootloader
- Limine - Modern bootloader
- Switching - Changing bootloaders
- Troubleshooting - Common issues
Key Takeaways:
- GRUB is most feature-rich
- systemd-boot is simplest for UEFI
- Choose based on your needs
- Always backup before changes
- Regenerate config after edits
- Arch Linux Kernel Management - Managing kernels
- Arch Linux System Configuration - System setup
- ArchWiki Bootloaders: https://wiki.archlinux.org/title/Category:Boot_loaders
This guide is based on the ArchWiki. For the most up-to-date information, always refer to the official ArchWiki.