I am currently on CachyOS, using GRUB and Btrfs snapshots.
It offers 4 boot managers:
- systemd-boot
- rEFInd
- GRUB
- Limine
I’d like to ask your opinions in terms of security (and attack surface) of these boot managers. I won’t include rEFInd.
Most of the stuff is taken from the CachyOS Wiki.
systemd-boot
Pros
- UEFI only.
- TPM PCRs are measured during boot.
Cons
- No native support for Btrfs snapshots and snapshot booting is possible only with custom setups (not provided by CachyOS).
- According to Madaidan “systemd contains a lot of unnecessary attack surface”. Though I am not sure whether this applies to systemd-boot or not.
- If using a boot filesystem beyond the firmware’s default ones (FAT12/16/32), then separate ESP and XBOOTLDR partitions & EFI drivers need to be manually added.
- Cannot find boot images on partitions other than its own ESP or the XBOOTLDR partition.
GRUB
Pros
- Supports nearly all Linux filesystems.
- Supports encrypted
/bootpartitions. - Supports Btrfs snapshot booting (via
grub-btrfs-supporton CachyOS). - TPM PCRs are measured during boot.
Cons
- Large and complex, with many filesystem drivers (more attack surface compared to systemd-boot and Limine - correct me if I’m wrong).
- Noticeably slower than systemd-boot and Limine.
Limine
Pros
- It’s more modern compared to others.
- Supports Btrfs snapshots via
limine-snapper-sync, enabled by default on CachyOS with Btrfs.
Cons
/bootmust use FAT12/16/32 or ISO9660. Other filesystems require additional setup.- Does not automatically add an entry to UEFI NVRAM. This must be done manually with
efibootmgr, or handled automatically withlimine-entry-tool(preinstalled on CachyOS). - TPM PCRs are not measured. Will fail TPM PCR0 Reconstruction test.
- Fixable by booting UKI that uses systemd-stub as UEFI stub. The systemd-ukify can make this (see here).
- Another workaround is to chainload another bootloader that measured TPM PCR (e.g. systemd-boot, GRUB).