This guide documents the complete architecture, setup process, and recovery steps for UEFI Secure Boot on this Arch Linux installation.
- Operating System: Arch Linux (Kernel:
linux-lts) - Bootloader:
systemd-boot(/boot/EFI/systemd/systemd-bootx64.efi&/boot/EFI/BOOT/BOOTX64.EFI) - Kernel Image: Unified Kernel Image (UKI) (
/boot/EFI/Linux/arch-linux-lts.efi) generated bymkinitcpio - EFI System Partition (ESP): Mounted at
/boot(/dev/nvme0n1p1, FAT32) - Firmware: UEFI 2.70 (INSYDE Corp.)
- Key & Signature Management:
sbctl(Secure Boot Control)
When Secure Boot is enabled on UEFI systems:
- Standard GRUB 2 on Linux enforces
shim_lockverifier validation (error: kern/efi/sb.c:shim_lock_verifier_init:177:prohibited by secure boot policy) when booted directly without Canonical/Fedora'sshimwrapper. systemd-bootnatively loads signed Unified Kernel Images (UKIs) directly with UEFI Secure Boot support, zero intermediate shim requirements, faster boot times, and seamless pacman hook integration.
To configure Secure Boot on a fresh installation or after resetting UEFI keys, simply run:
chmod +x ~/enable-secure-boot.sh
sudo ~/enable-secure-boot.shsudo pacman -S --needed sbctl
sudo bootctl install- Reboot directly into your UEFI/BIOS firmware settings:
systemctl reboot --firmware-setup
- In the Security / Boot menu:
- If options are greyed out, set a temporary Supervisor Password.
- Select "Clear Secure Boot Keys" / "Custom Mode" / "Erase all Secure Boot settings" (transitions firmware to Setup Mode).
- Save changes (F10) and boot into Arch Linux.
# Create custom keys in /var/lib/sbctl/keys
sudo sbctl create-keys
# Enroll custom keys + Microsoft OEM vendor certificates into UEFI NVRAM
sudo sbctl enroll-keys -mImportant: The
-mflag is essential. It includes Microsoft's OEM certificates into the KEK and db, ensuring external displays, GPU Option ROMs, and Thunderbolt controllers function without issues.
Sign all EFI binaries and register them in the sbctl database (via -s):
# systemd-boot binaries
sudo sbctl sign -s /boot/EFI/systemd/systemd-bootx64.efi
sudo sbctl sign -s /boot/EFI/BOOT/BOOTX64.EFI
# Unified Kernel Images (UKI)
sudo sbctl sign -s /boot/EFI/Linux/arch-linux-lts.efi
[ -f /boot/EFI/Linux/arch-linux-lts-fallback.efi ] && sudo sbctl sign -s /boot/EFI/Linux/arch-linux-lts-fallback.efi
# Linux kernel image
[ -f /boot/vmlinuz-linux-lts ] && sudo sbctl sign -s /boot/vmlinuz-linux-ltssudo sbctl verifyConfirm that all listed binaries report ✓ ... is signed.
- Reboot into firmware setup:
systemctl reboot --firmware-setup
- Set Secure Boot -> Enabled.
- Save changes (F10) and boot into Arch Linux.
In Arch Linux, verify active status:
sbctl statusExpected output:
Installed: ✓ sbctl is installed
Setup Mode: ✓ Disabled
Secure Boot: ✓ Enabled
Vendor Keys: microsoft
You can also check with bootctl status:
Secure Boot: enabled (user)
sbctl includes an ALPM hook located at:
/usr/share/libalpm/hooks/zz-sbctl.hook
Whenever pacman updates linux-lts, mkinitcpio, or systemd, the hook automatically runs sbctl sign-all, ensuring newly generated UKIs and bootloaders are signed before the reboot.
To manually re-sign all tracked files at any time:
sudo sbctl sign-all| Problem | Cause | Solution |
|---|---|---|
prohibited by secure boot policy (GRUB error) |
GRUB shim_lock module | Switch to systemd-boot (sudo bootctl install) and sign systemd-bootx64.efi. |
Firmware is not in setup mode |
UEFI keys not cleared | Reboot to BIOS (systemctl reboot --firmware-setup) and clear Secure Boot keys. |
| System won't boot after enabling Secure Boot | Bootloader / UKI not signed | Temporarily disable Secure Boot in BIOS, boot into Arch Linux, run sudo sbctl sign-all, verify with sudo sbctl verify, and re-enable Secure Boot. |
| External monitor / GPU doesn't show video | Missing Microsoft OEM certs | Re-enroll keys with -m: sudo sbctl enroll-keys -m. |