Install a bootloader
Finish system configuration, desktop selection and driver installation first. Choose one bootloader: systemd-boot or GRUB for UEFI, GRUB for BIOS. These commands run inside the chroot.
Generate the initramfs
For the encrypted layout, first complete Configure the initramfs, then return here. For an unencrypted installation, keep the current default hooks in /etc/mkinitcpio.conf.
Confirm /etc/vconsole.conf contains your keyboard layout and the correct CPU microcode package is installed. Generate images for all installed kernels:
mkinitcpio -PResolve any errors before continuing. On UEFI, check that /boot is the mounted ESP and contains vmlinuz-linux and initramfs-linux.img:
findmnt /boot
ls -lh /bootUEFI: systemd-boot
Install the boot manager included with systemd:
bootctl --esp-path=/boot install
nano /boot/loader/loader.confUse:
default arch.conf
timeout 4
editor noFor an unencrypted root filesystem, obtain its filesystem UUID:
blkid -s UUID -o value /dev/nvme0n1p2Create /boot/loader/entries/arch.conf, replacing ROOT_FILESYSTEM_UUID:
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options root=UUID=ROOT_FILESYSTEM_UUID rwThe microcode hook includes installed CPU microcode in the initramfs, so this entry does not need a separate microcode image. Keep comments on separate lines in boot entry files.
For the encrypted layout, replace the entire options line with the following, using the UUID reported by cryptsetup luksUUID for the outer LUKS partition:
options rd.luks.name=LUKS_UUID=cryptroot root=/dev/mapper/main-root rwInspect the installed entry:
bootctl --esp-path=/boot listSee systemd-boot for boot manager updates, additional kernels and dual boot. Each extra kernel needs its own entry unless you configure automatic entry management.
GRUB
UEFI installation
The ESP must be mounted at /boot:
pacman -S grub efibootmgr
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUBBIOS installation
Use the whole disk, not a partition. A GPT disk also needs the unformatted BIOS boot partition described on the partitioning page:
pacman -S grub
grub-install --target=i386-pc /dev/nvme0n1Encrypted root
For the UEFI encrypted layout in this guide, edit /etc/default/grub and set the following, replacing LUKS_UUID with the outer partition's LUKS UUID. Preserve any other options you deliberately configured:
GRUB_CMDLINE_LINUX="rd.luks.name=LUKS_UUID=cryptroot root=/dev/mapper/main-root"GRUB reads the unencrypted /boot; the initramfs unlocks root. This layout does not require GRUB_ENABLE_CRYPTODISK.
Other operating systems
If you want GRUB to detect another installed OS, install os-prober, mount the relevant OS filesystems as described in the GRUB documentation, and set this in /etc/default/grub:
GRUB_DISABLE_OS_PROBER=falseGenerate the configuration
For every GRUB installation, finish with:
grub-mkconfig -o /boot/grub/grub.cfgCheck for errors and confirm it found the installed kernel. Regenerate this file after changing GRUB settings or adding a kernel.