Arch :: Boot Loader

Boot Loader

Boot Order

efibootmgr -v
efibootmgr -b 0 -B # delete an entry
efibootmgr -o 0000,0001,0002 # order

Systemd-boot

During install

# mount esp to /boot
# edit fstab to ensure proper mount
mount /dev/sdX1 /mnt/boot 

Install bootctl

bootctl install

Configure esp/loader/loader.conf

default arch.conf
timeout 3
console-mode max # auto, keep
editor no
auto-entries 0 # default 1; detecting entries
auto-firmware 1 # show entry for rebooting into UEFI

Config esp/loader/entries/arch.conf

title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img #needs to be ahead of initramfs
initrd /initramfs-linux.img
options root=PARTUUID=XX rootflags=subvol=@root rw

Check if everything is correct

bootctl list

Update

bootctl update

## for Pacman hook
EDITOR /etc/pacman.d/hooks/100-systemd-boot.hook

[Trigger]
Type = Package
Operation = Upgrade
Target = systemd

[Action]
Description = Updating systemd-boot
When = PostTransaction
Exec = /usr/bin/bootctl update

Remove

bootctl remove

GRUB

pacman -Syu grub efibootmgr
mkdir /boot/efi
mount /dev/sdX1 /boot/efi
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg

Mac

sudo diskutil mount /dev/sdX1 # mount in macOS with sudo
cp /path/to/.VolumeIcon.icns /Volume/EFI/ 
# place two .disk_label files in the folder
bless --folder /Volume/EFI/EFI/BOOT --label "label"