Arch Linux Bootloader Configuration - ryzendew/Linux-Tips-and-Tricks GitHub Wiki
Arch Linux Bootloader Configuration Guide
Complete beginner-friendly guide to configuring bootloaders on Arch Linux, including GRUB, systemd-boot, rEFInd, and Limine.
Table of Contents
- Understanding Bootloaders
- GRUB Configuration
- systemd-boot Configuration
- rEFInd Configuration
- Limine Configuration
- Switching Bootloaders
- Troubleshooting
Understanding Bootloaders
What is a Bootloader?
Bootloader is software that loads the operating system.
Functions:
- Loads kernel
- Initializes hardware
- Provides boot menu
- Handles dual-boot
Boot Process
How booting works:
- BIOS/UEFI initializes hardware
- Bootloader loads from disk
- Kernel starts
- Init system (systemd) starts
- System ready
Bootloader Options
Available bootloaders:
- GRUB: Most popular, feature-rich
- systemd-boot: Simple, UEFI only
- rEFInd: Beautiful, UEFI only
- Limine: Modern, simple
GRUB Configuration
Installing GRUB
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=GRUB
For BIOS systems:
# Install GRUB
sudo pacman -S grub
# Install to disk
sudo grub-install --target=i386-pc /dev/sda
Explanation:
--target=x86_64-efi: UEFI target--efi-directory: EFI partition mount point--target=i386-pc: BIOS target/dev/sda: Boot disk
Generate GRUB Configuration
Create boot menu:
# Generate GRUB config
sudo grub-mkconfig -o /boot/grub/grub.cfg
This scans for:
- Installed kernels
- Other operating systems
- Creates boot entries
GRUB Configuration File
Edit GRUB settings:
# Edit GRUB config
sudo vim /etc/default/grub
Common 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=false
After editing:
# Regenerate config
sudo grub-mkconfig -o /boot/grub/grub.cfg
GRUB Themes
Install themes:
# Install GRUB theme
sudo pacman -S grub-theme-vimix
# Or use AUR
yay -S grub-theme-poly-dark
Apply 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.cfg
systemd-boot Configuration
Installing systemd-boot
For UEFI only:
# Install systemd-boot
bootctl install
# Or specify path
bootctl --path=/boot/efi install
Verify installation:
# Check status
bootctl status
Configuration
Main configuration:
# Edit loader config
sudo vim /boot/loader/loader.conf
Example configuration:
default arch.conf
timeout 3
editor no
Explanation:
default: Default boot entrytimeout: Boot timeout (seconds)editor: Enable boot editor
Boot Entries
Create boot entry:
# Create entry file
sudo vim /boot/loader/entries/arch.conf
Example 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.conf
title 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 -f
rEFInd Configuration
Installing rEFInd
Install rEFInd:
# Install rEFInd
sudo pacman -S refind-efi
# Install to EFI partition
sudo refind-install
Configuration
Edit rEFInd config:
# Edit config
sudo vim /boot/efi/EFI/refind/refind.conf
Common settings:
timeout 5
default_selection 1
resolution 1920 1080
Themes
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.conf
Add to config:
include themes/refind-theme-regular/theme.conf
Limine Configuration
Installing Limine
Install Limine:
# Install Limine
sudo pacman -S limine
# Or from AUR
yay -S limine-git
Configuration
Create Limine config:
# Create config
sudo vim /boot/limine/limine.cfg
Example configuration:
:Arch Linux
PROTOCOL=linux
KERNEL_PATH=boot:///vmlinuz-linux
MODULE_PATH=boot:///initramfs-linux.img
CMDLINE=root=UUID=xxxx-xxxx-xxxx rw
Install Limine
Install to EFI:
# Install Limine
sudo limine-install /dev/sda
Switching Bootloaders
From GRUB to systemd-boot
Steps:
-
Install systemd-boot:
bootctl install -
Create boot entries:
sudo vim /boot/loader/entries/arch.conf -
Remove GRUB (optional):
sudo pacman -R grub
From systemd-boot to 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
Troubleshooting
GRUB Not Showing
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.cfg
Bootloader Not Found
Reinstall bootloader:
# For GRUB
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
# For systemd-boot
bootctl install
Dual-Boot Issues
Enable os-prober:
# Install os-prober
sudo pacman -S os-prober
# Edit GRUB config
sudo vim /etc/default/grub
Set:
GRUB_DISABLE_OS_PROBER=false
Regenerate:
sudo grub-mkconfig -o /boot/grub/grub.cfg
Summary
This 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
Next Steps
- 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.