-
-
Notifications
You must be signed in to change notification settings - Fork 1
Linux Bootloader Configuration
Complete beginner-friendly guide to configuring bootloaders on Linux, covering Arch Linux, CachyOS, and other distributions including GRUB, systemd-boot, rEFInd, and Limine.
- Understanding Bootloaders
- GRUB Configuration
- systemd-boot Configuration
- rEFInd Configuration
- Limine Configuration
- CachyOS-Specific Notes
- Switching Bootloaders
- Troubleshooting
Bootloader is software that loads the operating system when your computer starts.
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, works with BIOS and UEFI
- systemd-boot: Simple, UEFI only, integrated with systemd
- rEFInd: Beautiful, UEFI only, auto-detects OS
- Limine: Modern, fast, supports Secure Boot (CachyOS default)
Which to use:
- Most users: GRUB (most compatible)
- UEFI only, want simplicity: systemd-boot
- UEFI only, want beauty: rEFInd
- CachyOS default, Secure Boot: Limine
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/sdaCreate boot menu:
# Generate GRUB config
sudo grub-mkconfig -o /boot/grub/grub.cfgEdit GRUB settings:
# Edit main config
sudo vim /etc/default/grubCommon settings:
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX=""After editing:
# Regenerate config
sudo grub-mkconfig -o /boot/grub/grub.cfgInstall systemd-boot:
# Install systemd-boot
sudo bootctl install
# Check status
bootctl statusEdit loader config:
# Edit loader config
sudo vim /boot/loader/loader.confExample:
default arch
timeout 5
editor 0
Create entry:
# Create entry
sudo vim /boot/loader/entries/arch.confExample:
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options root=UUID=xxxx-xxxx rw
Install rEFInd:
# Install rEFInd
sudo pacman -S refind-efi
# Install to EFI
sudo refind-installEdit config:
# Edit config
sudo vim /boot/efi/EFI/refind/refind.confInstall Limine:
# Install Limine
sudo pacman -S limine
# Install to EFI
sudo limine-install /dev/sdaEdit config:
# Edit config
sudo vim /boot/limine/limine.cfgExample:
:Arch Linux
PROTOCOL linux
KERNEL_PATH boot:///vmlinuz-linux
MODULE_PATH boot:///initramfs-linux.img
KERNEL_CMDLINE root=UUID=xxxx-xxxx rw
CachyOS uses Limine as default bootloader:
- Secure Boot support: Limine works well with Secure Boot on CachyOS
- Fast boot: Optimized for performance
- Simple config: Easy to configure
CachyOS Limine setup:
# Limine is usually installed during CachyOS installation
# Check status
sudo limine-install --check
# Update Limine
sudo limine-install /dev/sdaSecure Boot with Limine on CachyOS:
# Use limine-enroll-config for Secure Boot
sudo limine-enroll-configInstall GRUB:
# Install GRUB
sudo pacman -S grub efibootmgr
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi
sudo grub-mkconfig -o /boot/grub/grub.cfgInstall systemd-boot:
# Install systemd-boot
sudo bootctl install
# Create entries as shown aboveCheck installation:
# Check GRUB
ls /boot/grub/grub.cfg
# Check systemd-boot
bootctl status
# Check Limine
ls /boot/limine/GRUB:
sudo grub-mkconfig -o /boot/grub/grub.cfgsystemd-boot:
# Recreate entries
sudo bootctl updateThis guide covered bootloader configuration for Arch Linux, CachyOS, and other distributions, including GRUB, systemd-boot, rEFInd, and Limine.
- Boot Process - Understanding boot process
- UEFI and Secure Boot - Secure Boot setup
- ArchWiki GRUB: https://wiki.archlinux.org/title/GRUB
- ArchWiki systemd-boot: https://wiki.archlinux.org/title/Systemd-boot
This guide covers Arch Linux, CachyOS, and other Linux distributions. CachyOS-specific notes are highlighted where applicable.