Enabling Secure Boot on Omarchy (and the Three Things That Broke Along the Way)

by Cody Chamberlain

Omarchy's install docs tell you to turn off Secure Boot, and most people never turn it back on. I wanted it back on. I'm running Omarchy on a Dell Latitude 9430 with full-disk encryption, and Secure Boot is the piece that makes sure what decrypts that disk at boot is actually my boot chain.

It's very doable. But "re-enable it in the BIOS" isn't the answer, and the generic Arch guides miss a few Omarchy- and Limine-specific traps. Here's the full path, including the three places it broke on me.

Why you can't just flip it back on

Omarchy uses Limine as its bootloader and boots Unified Kernel Images (UKIs). None of those are signed by a key your firmware trusts, so if you re-enable Secure Boot without doing anything else you'll get a "Secure Boot Violation" or a black screen. (If you already tried it: turn it back off and everything boots again.)

The fix is to enroll your own Secure Boot keys and sign your boot files with them. sbctl makes this pretty painless.

Step 1: Put the firmware in Setup Mode

Install sbctl and check where you're starting:

sudo pacman -S sbctl
sbctl status

Mine looked like this:

Installed:   ✗ sbctl is not installed
Setup Mode:  ✓ Disabled
Secure Boot: ✗ Disabled
Vendor Keys: microsoft builtin-db builtin-db builtin-KEK builtin-PK

"Installed ✗" just means sbctl hasn't created keys yet. The blocker is Setup Mode: Disabled. The firmware still holds the factory keys and won't accept new ones until you clear them.

Reboot into the BIOS (systemctl reboot --firmware-setup works), find the Secure Boot key management section, and clear/delete the keys. Depending on the vendor it might be called "Delete all Secure Boot variables", "Reset to Setup Mode", or "Erase PK". Leave Secure Boot itself disabled for now.

Back in Omarchy, sbctl status should show Setup Mode: ✓ Enabled.

Step 2: Create and enroll your keys

sudo sbctl create-keys
sudo sbctl enroll-keys -m

Don't skip -m. It enrolls Microsoft's keys alongside yours. You need them for Windows if you dual-boot, and, less obviously, for option ROMs on things like GPUs. Enrolling without them can leave a machine that won't even reach the firmware screen.

Step 3: Sign everything sbctl finds

sudo sbctl verify
✗ /boot/EFI/BOOT/BOOTX64.EFI is not signed
✗ /boot/EFI/Linux/omarchy_linux-omarchy.efi is not signed
✗ /boot/EFI/limine/limine_x64.efi is not signed
✗ /boot/<machine-id>/limine_history/omarchy_linux-omarchy.efi_sha256_<hash> is not signed

That's the fallback loader, the current UKI, Limine itself, and an older UKI that Omarchy keeps around for booting snapshots. Sign each with -s so sbctl tracks it in its database:

sudo sbctl sign -s /boot/EFI/BOOT/BOOTX64.EFI
sudo sbctl sign -s /boot/EFI/limine/limine_x64.efi
sudo sbctl sign -s /boot/EFI/Linux/omarchy_linux-omarchy.efi
sudo sbctl sign -s /boot/<machine-id>/limine_history/omarchy_linux-omarchy.efi_sha256_<hash>

All green on sbctl verify. Most guides stop here and tell you to reboot. Don't, yet.

Gotcha #1: Limine's checksums

Omarchy's Limine config pins each kernel image to a BLAKE2B hash:

sudo grep -n 'efi#' /boot/limine.conf
31:  path: boot():/EFI/Linux/omarchy_linux-omarchy.efi#92cf5ee1e11a...

Signing a file changes its bytes, so that hash no longer matches, and Limine will refuse to load the image. That has nothing to do with Secure Boot. It would fail even with Secure Boot off.

The fix is to let Omarchy's tooling regenerate everything:

sudo limine-update

What makes this work is the order of operations, which you can see in the output:

-> Running post hook: [sbctl]
Signing /tmp/limine-mkinitcpio.XXXX/linux-omarchy.efi
✓ Signed /tmp/limine-mkinitcpio.XXXX/linux-omarchy.efi
Copied: /tmp/limine-mkinitcpio.XXXX/linux-omarchy.efi -> /boot/EFI/Linux/omarchy_linux-omarchy.efi
Updated: /boot/limine.conf

sbctl's mkinitcpio post-hook signs the UKI before it's copied into place and before the hash is written to limine.conf. The checksum now describes the signed file, and it'll stay that way on future kernel updates. You can confirm by comparing sudo b2sum /boot/EFI/Linux/omarchy_linux-omarchy.efi to the hash in the config.

Gotcha #2: Limine updates quietly un-sign both loaders

After limine-update, sbctl verify showed this again:

✗ /boot/EFI/BOOT/BOOTX64.EFI is not signed

Limine's deploy step (limine-install) copies a fresh, unsigned binary to the fallback path EFI/BOOT/BOOTX64.EFI. Omarchy sets ENABLE_LIMINE_FALLBACK=yes in /etc/limine-entry-tool.d/omarchy-defaults.conf, and limine-install decides whether to re-copy by comparing the hash of the packaged binary to the deployed one. A signed file never matches, so it re-copies on every run, and nothing warns you.

A package update is worse. Omarchy ships a pacman hook, /etc/pacman.d/hooks/99-omarchy-limine.hook, that copies the packaged binary over the main loader at EFI/limine/limine_x64.efi after Limine's own deploy hook has run. That's the file my firmware boot entry points at (efibootmgr -v will show yours). So after any limine upgrade, both loaders are unsigned, and the next boot is a Secure Boot violation.

You might expect sbctl's own pacman hook (zz-sbctl.hook) to catch this. It doesn't fire on the limine package, because its path triggers don't match /usr/share/limine/BOOTX64.EFI. So I added a hook that runs last and re-signs everything in sbctl's database:

sudo mkdir -p /etc/pacman.d/hooks
sudo tee /etc/pacman.d/hooks/zzz-sbctl-resign.hook > /dev/null <<'EOF'
[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = limine*
Target = linux*
Target = fwupd*

[Action]
Description = Re-signing EFI binaries for Secure Boot...
When = PostTransaction
Exec = /usr/bin/sh -c '/usr/bin/sbctl sign-all && /usr/bin/sbctl verify'
Depends = sbctl
EOF

The zzz- prefix makes it run after both Limine's deploy hook and Omarchy's, and the verify puts a pass/fail check in your update log. To test it, reinstall Limine:

sudo pacman -S limine
(2/4) Deploying Limine after upgrade...
Updating Limine fallback EFI...
✓ Signed /boot/EFI/limine/limine_x64.efi
(3/4) Deploying Omarchy Limine after upgrade...
(4/4) Re-signing EFI binaries for Secure Boot...
✓ Signed /boot/EFI/BOOT/BOOTX64.EFI
✓ Signed /boot/EFI/limine/limine_x64.efi
...
✓ /boot/EFI/limine/limine_x64.efi is signed
✓ /boot/EFI/BOOT/BOOTX64.EFI is signed

Step 2 overwrites the fallback (and signs the main loader on its way out). Step 3 overwrites the main loader. Step 4 fixes both. If Omarchy's hook were harmless, step 4 would say "File has already been signed" for limine_x64.efi. It doesn't.

One caveat: pacman hooks only fire on package transactions. If you run sudo limine-update by hand, follow it with sudo sbctl sign-all.

Step 4: Turn it on

Reboot into the BIOS, enable Secure Boot, boot Omarchy:

Installed:   ✓ sbctl is installed
Owner GUID:  3a0cd82f-...
Setup Mode:  ✓ Disabled
Secure Boot: ✓ Enabled
Vendor Keys: microsoft

While you're in the BIOS, set an admin password. Otherwise anyone with physical access can just turn Secure Boot off again.

Gotcha #3: Firmware updates break, twice

A few hours later I ran fwupdmgr update for a pending BIOS update (1.23.0 → 1.43.0) and it failed:

/usr/lib/fwupd/efi/fwupdx64.efi.signed cannot be found

To flash UEFI capsules, fwupd reboots into a small EFI helper. With Secure Boot on, it wants a signed copy of that helper, which Arch doesn't ship. You sign it yourself, writing the output to the exact filename fwupd expects:

sudo sbctl sign -s -o /usr/lib/fwupd/efi/fwupdx64.efi.signed /usr/lib/fwupd/efi/fwupdx64.efi

(That's why the hook above also triggers on fwupd*.)

Next attempt:

failed to write-firmware: shim is required but was not found: /boot/EFI/arch/shimx64.efi

fwupd assumes that if Secure Boot is on, you boot through shim, the Microsoft-signed first-stage loader that Ubuntu and Fedora use. With custom keys you don't need shim, so tell fwupd that. The config file is root-only, so check it with sudo:

sudo grep -n 'uefi_capsule' -A5 /etc/fwupd/fwupd.conf

If that prints nothing, add the section:

printf '\n[uefi_capsule]\nDisableShimForSecureBoot=true\n' | sudo tee -a /etc/fwupd/fwupd.conf
sudo systemctl restart fwupd
fwupdmgr update

(If a [uefi_capsule] section already exists, add the line inside it instead of creating a duplicate.)

After a firmware update, run sbctl status again. Dell updates normally keep enrolled keys, but if one ever resets them, sudo sbctl enroll-keys -m puts them back. Your signed files don't need to change.

Credit to the CachyOS Secure Boot wiki, which is the only place I found that covers the fwupd piece.

What this actually protects (and what it doesn't)

The CachyOS wiki notes that Limine can bypass firmware signature checks entirely. That's true for some configs, so check yours:

sudo grep -n protocol /boot/limine.conf
30:  protocol: efi
42:     protocol: efi
50:     protocol: efi
58:protocol: efi

With protocol: linux, Limine loads the kernel itself and the firmware never verifies it. In that case signing the kernel does nothing. The only check is the hash in limine.conf, and anyone who can edit the config can rewrite the hash too. With protocol: efi, which is what Omarchy's entries use, Limine hands each image to the firmware's own loader, and the firmware checks the signature against your keys. That's why signing the UKIs mattered.

So with this setup:

  • Unsigned kernels and bootloaders won't run. That covers the classic evil-maid attack: boot a USB stick or a tampered kernel, then capture your LUKS passphrase.
  • The kernel command line is locked. UKIs carry their command line inside the signed image, and systemd-stub ignores overrides while Secure Boot is on. An edited limine.conf can't inject init=/bin/sh.
  • limine.conf itself isn't signed. Someone with write access to the ESP could point an entry at a different trusted binary: an older snapshot UKI you signed (a rollback), or something Microsoft-signed, since -m trusts their keys.

If you want to close that last gap, Limine can embed the config's hash in its signed binary. Set ENABLE_ENROLL_LIMINE_CONFIG=yes in /etc/default/limine and run sudo limine-enroll-config. Omarchy's Limine tooling then keeps it current: a post hook (/etc/boot/hooks/post.d/90-limine-enroll-config) re-enrolls and re-signs after every limine-update, kernel rebuild and snapshot sync. The catch is, again, 99-omarchy-limine.hook. On a Limine package upgrade it replaces the enrolled binary with a plain one, and sbctl sign-all re-signs it but doesn't re-enroll it. If you turn enrollment on, add /usr/bin/limine-enroll-config to the Exec line in the hook above, after sign-all and before verify. I've left enrollment off for now. It's real defense-in-depth, but the setup above already covers the attacks I care about on a laptop.

TL;DR

  1. Clear the keys in the BIOS → Setup Mode.
  2. sbctl create-keys and sbctl enroll-keys -m.
  3. sbctl sign -s everything in sbctl verify.
  4. limine-update so the checksums in limine.conf match the signed files.
  5. Add a zzz- pacman hook that runs sbctl sign-all, because Limine and Omarchy's update hooks overwrite both loaders with unsigned copies.
  6. Enable Secure Boot and set a BIOS password.
  7. For firmware updates: sign fwupdx64.efi.signed and set DisableShimForSecureBoot=true.

Further reading: Omarchy Secure Boot discussion (#2296) · CachyOS Secure Boot wiki · sbctl