If you’ve followed my earlier guide on how to install Arch Linux you’ve probably used GRUB to boot the system. Now it’s time to step into the future even further with systemd-boot instead!
Run the command below to begin the installation, the path is your EFI-partition.
bootctl --path=/boot/efi install
Create the file /boot/efi/loader/entries/arch.conf with the following content, or as you have your partitions set up:
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options cryptdevice=/dev/sda3:lvm root=/dev/mapper/lvmvg-rootvol rw rootflags=subvol=root resume=/dev/mapper/lvmvg-swapvol quiet
Edit the file /boot/efi/loader/loader.conf:
timeout 3
default arch
Copy all *.img files and vmlinuz-linux from /boot to /boot/efi folder
Create /etc/systemd/system/efistub-update.path with the following content:
[Unit]
Description=Copy EFISTUB Kernel to EFI System Partition
[Path]
PathChanged=/boot/initramfs-linux-fallback.img
[Install]
WantedBy=multi-user.target
WantedBy=system-update.target
Create /etc/systemd/system/efistub-update.service with the following content:
[Unit]
Description=Copy EFISTUB Kernel to EFI System Partition
[Service]
Type=oneshot
ExecStart=/usr/bin/cp -f /boot/vmlinuz-linux /boot/efi/vmlinuz-linux
ExecStart=/usr/bin/cp -f /boot/initramfs-linux.img /boot/efi/initramfs-linux.img
ExecStart=/usr/bin/cp -f /boot/initramfs-linux-fallback.img /boot/efi/initramfs-linux-fallback.img
Run the following commands:
systemctl enable efistub-update.path
systemctl start efistub-update.path
Reboot your system to see that it starts using systemd-boot instead of GRUB. If everything works you can remove GRUB and its’ files on the /boot-partition:
pacman -Rs grub
rm -r /boot/grub