Limine is a relatively new bootloader that looked very interesting, and I wanted to try it out on my Arch installation. Overall, I’m very happy with it and decided to keep using it. These notes are an addition to my previous Arch install notes covering installing Arch Linux with full-disk encryption and btrfs, but instead of GRUB we will use Limine as the bootloader.
Limine is a modern, advanced, portable, multiprotocol bootloader and boot manager, also used as the reference implementation for the Limine boot protocol.
Use these notes in parallel with the previous Arch Linux with Full Disk Encryption Install Notes. We’ll only go over the small set of differences because most of the install steps are identical.
Disk Partitions
With this Limine installation, we will only have two partitions instead of three. A 4GB /boot partition and the rest of the space for a LUKS2 encrypted btrfs partition. 4GB is a good safe size for the /boot partition to accommodate multiple kernels and btrfs snapshots.
lsblk – show available storage volumes, nvme0n1 in my case.
wipefs --all /dev/nvme0n1 – Clean all partitions on device.
gdisk /dev/nvme0n1 – enter gdisk utility.
n – create new EF00 type partition for EFI. +4G
n – Defults till end for last partition to use all space.
w – write to disk.
mkfs.fat -F32 /dev/nvme0n1p1
cryptsetup luksFormat --type luks2 --hash sha256 --pbkdf pbkdf2 --pbkdf-force-iterations 600000 --label arch /dev/nvme0n1p2
cryptsetup luksOpen /dev/nvme0n1p2 arch
mkfs.btrfs -L btrfs -n 32k /dev/mapper/arch – Format btrfs with larger 32k nodesize for less fragmentation at the cost of more expensive memory operations.
Additional installation
Instead of the grub package install limine.
pacman -S base-devel dosfstools limine efibootmgr mtools vim nano wget git iwd networkmanager impala sudo btrfs-progs bash-completion
Set bootloader
Deploy and configure the boot loader.
mkdir -p /boot/EFI/limine
cp /usr/share/limine/BOOTX64.EFI /boot/EFI/limine/
efibootmgr --create --disk /dev/nvme0n1 --part 1 --label "Arch Linux" --loader '\EFI\limine\BOOTX64.EFI' --unicode
touch /boot/EFI/limine/limine.conf to create a Limine configuration file. We’ll need the btrfs partition UUID so it’s helpful to use blkid for appending it to the configuration file for ease, blkid -o value -s UUID /dev/nvme0n1p2.
blkid -o value -s UUID /dev/nvme0n1p2 >> /boot/EFI/limine/limine.conf
vim /boot/EFI/limine/limine.conf edit a basic starter configuration file. Here is an example for the linux and linux-lts kernels. Cut and paste the appended UUID to replace <PARTITION_UUID>.
/Arch Linux
protocol: linux
path: boot():/vmlinuz-linux
cmdline: cryptdevice=UUID=<PARTITION_UUID>:arch root=/dev/mapper/arch rw rootflags=subvol=@ rootfstype=btrfs
module_path: boot():/initramfs-linux.img
/Arch Linux LTS
protocol: linux
path: boot():/vmlinuz-linux-lts
cmdline: cryptdevice=UUID=<PARTITION_UUID>:arch root=/dev/mapper/arch rw rootflags=subvol=@ rootfstype=btrfs
module_path: boot():/initramfs-linux-lts.img
btrfs Snapshots and Boot Entry Automation
To automate Limine automated entry creation or updates when kernels change or when creating snapshots with snapper you can use these helpful tools. Check the Tips and Tricks section of the official Limine Arch Wiki for further details.
limine-mkinitcpio-hook(AUR) – https://gitlab.com/Zesko/limine-entry-toollimine-snapper-sync(AUR) – https://gitlab.com/Zesko/limine-snapper-sync