Those who want to avoid unnecessary cruft in their system would probably want to apply the same principle on their boot manager. One of the lightweight alternatives to unnecessarily complicated GRUB is Syslinux. It supports EFI boot, but unfortunately, so far doesn't support chainloading on EFI. This means it cannot boot Windows boot loader, for example. However, if you have dual boot on EFI, you can simply have a separate entry in EFI for the Windows boot loader and start it by entering BIOS setup on boot and manually activating its entry. Otherwise, Syslinux is very "out of the way" and minimal. Here's how to set it up.
0. Prepare Artix LiveUSB. This might seem redundant, but whenever you are tinkering with boot managers there is a chance that you will make your system unbootable. Booting into LiveUSB then makes it easy to recover your system.
1. Remove GRUB, install syslinux:
# pacman -R grub
# pacman -S syslinux
2. Copy Syslinux files to /boot/syslinux. For EFI boot on 64-bit systems:
# cp -r /usr/lib/syslinux/efi64/* /boot/syslinux
3. Edit /boot/syslinux/syslinux.cfg. Some notable parts:
DEFAULT arch
PROMPT 0 # Set to 1 if you always want to display the boot: prompt
TIMEOUT 50
DEFAULT line sets the menu item which will be activated when booting automatically or when no action is performed before the timeout expires.
PROMPT 1 will always show the "boot:" prompt on boot.
TIMEOUT sets the timeout (in tenths of seconds - 50 is 5 seconds) after which the default menu item will be activated.
UI menu.c32
#UI vesamenu.c32
The UI line sets the corresponding menu - text mode menu (menu.c32) or the graphical menu (vesamenu.c32). Commenting out both disables the menu - the default menu item will be activated, or (if PROMPT 1 is used) "boot:" prompt will be shown.
LABEL arch
MENU LABEL Artix Linux
LINUX ../vmlinuz-linux
APPEND root=/dev/sda3 rw
INITRD ../initramfs-linux.img
You should most definitely edit the APPEND line. First, get the UUID of your root (/) partition:
# lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sda
├─sda1 vfat FAT16 A0AB-F0B2 92,5M 74% /boot
├─sda2
├─sda3 ntfs AED6511BD650E55D
├─sda4 ext4 1.0 Artix / 55df8766-94c6-467a-b5a2-76f1c7843b1f 10,7G 67% /
├─sda5 swap 1 12d5894a-0918-418e-94b4-a8b92265fed3 [SWAP]
├─sda6 ext4 1.0 Artix /home 58f73e6d-51a9-473b-afbf-010cbe0d0e60 42,2G 52% /home
└─sda7 ntfs D0F816EFF816D396
sr0
In this example, UUID will be 55df8766-94c6-467a-b5a2-76f1c7843b1f . Then, change the corresponding line in /boot/syslinux/syslinux.cfg to read
APPEND root=UUID=55df8766-94c6-467a-b5a2-76f1c7843b1f rw
If you want hibernate support, take note of the swap partition UUID and add it as well. In this example, swap partition UUID is 12d5894a-0918-418e-94b4-a8b92265fed3, so we will change the item to
APPEND root=UUID=55df8766-94c6-467a-b5a2-76f1c7843b1f rw resume=UUID=12d5894a-0918-418e-94b4-a8b92265fed3
4. Add the entry for Syslinux to EFI:
# efibootmgr --create --disk /dev/sda --part 1 --loader /syslinux/syslinux.efi --label SYSLINUX --verbose
You can verify that the entry is created using the command:
# efibootmgr -v
Make sure that the ordering is correct ("BootOrder:" line). For more information, see the wiki.
That's it! Verify that everything works as it should by rebooting, and use the LiveUSB if anything goes south.
See also:
1. https://syslinux.org/
2. https://wiki.archlinux.org/title/Unified_Extensible_Firmware_Interface#efibootmgr
3. https://wiki.archlinux.org/title/Syslinux