OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
boot-kernel medium occasional DISPUTE

Direct boot keeps booting the old linux UKI after the linux-omarchy migration

omarchylinux-omarchyuefilimineuki
CORRECTED An auditor found the fix wrong or incomplete and rewrote it. · checked against Omarchy omarchy 4.0.4-1 on 2026-10-05
AUDIT NOTE

The cause matches #12145 and its second confirmation, and it matches /usr/share/omarchy/bin/omarchy-setup-direct-boot on this machine, which picks the UKI with find ... -name "omarchy*.efi" ... | head -1. CUSTOM_UKI_NAME="omarchy" is in /etc/limine-entry-tool.d/omarchy-defaults.conf. The fix has a dangerous defect. If the sed finds no Omarchy entry, $num is empty, and efibootmgr --bootnum "" --delete-bootnum deletes Boot0000. I read rhboot/efibootmgr src/efibootmgr.c: strtoul on an empty string returns 0, and endptr points at the terminating NUL, so the value passes validation as bootnum 0. On many machines Boot0000 is Windows Boot Manager or Limine. The corrected fix stops when no entry is found. It also applies the same AMI and Apple firmware refusals that the Omarchy script enforces. Nothing was run here, and no NVRAM was touched. Second audit confirmed the corrected text: Second audit of the corrected text. #12145 is open and a second reporter confirmed it on Intel Lunar Lake on 2026-09-30. /usr/share/libalpm/scripts/limine-mkinitcpio-install names the UKI ${UKI_PREFIX}_${KERNEL_NAME}.efi with UKI_PREFIX taken from CUSTOM_UKI_NAME, and /etc/limine-entry-tool.d/omarchy-defaults.conf sets CUSTOM_UKI_NAME="omarchy", so linux-omarchy writes omarchy_linux-omarchy.efi. omarchy-setup-direct-boot on quattro is identical to the installed 4.0.4-1 copy and still picks the UKI with find ... | head -1 and refuses AMI and Apple firmware. I ran the fix's entry-matching sed against sample efibootmgr lines: it returns the bootnum and returns nothing when there is no Omarchy entry, so the empty-number guard works. The disk and partition parsing gives /dev/nvme0n1 1, /dev/sda 1 and /dev/mmcblk0 1. ENABLE_LIMINE_FALLBACK=yes is set, so the danger's fallback claim holds. #12664 is removed from sources: it reports a different problem, default_entry: 2 in the Limine template, and supports nothing this record says. Its claim also conflicts with #12087 and #13030, where linux-omarchy did become the default after the migration, so it was not used to change the 'go back through Limine' branch. Not exercised: no NVRAM was touched.

The cause above was not rewritten and may still contain the error described. The fix below is the corrected version.
RISK

Deleting the only working firmware boot entry, then failing to create the new one, leaves the firmware to fall back to \EFI\BOOT\BOOTX64.EFI. Omarchy installs Limine there (ENABLE_LIMINE_FALLBACK=yes), so the machine still boots through Limine, but check sudo ls /boot/EFI/BOOT/ first.

Symptom

"I set up direct boot with omarchy-setup-direct-boot and the update says it installed the Omarchy kernel, but uname -r still shows 7.2.x-arch... weeks later. A reboot-required notice keeps coming back." efibootmgr shows the firmware starting the old file:


BootCurrent: 0000
Boot0000* Omarchy  HD(1,GPT,...)/\EFI\LINUX\OMARCHY_LINUX.EFI

Cause

Before the migration there was one UKI, /boot/EFI/Linux/omarchy_linux.efi, rewritten on every kernel update, so a firmware entry pointing at it always booted the current kernel. The UKI name now follows the kernel package (CUSTOM_UKI_NAME="omarchy"), so linux-omarchy writes a second file, omarchy_linux-omarchy.efi. Migration 1789325478.sh only rewrites BOOT_ORDER in /etc/default/limine, which steers Limine. A direct-boot entry skips Limine entirely, so it keeps starting omarchy_linux.efi, the stock linux kernel. omarchy-setup-direct-boot also chooses its UKI with find /boot/EFI/Linux/ -name "omarchy*.efi" ... | head -1, so with two files a newly created entry points at whichever find lists first.

Fix

Recreate the firmware entry so it points at the linux-omarchy UKI by name. Do not simply re-run omarchy-setup-direct-boot, because with two UKIs present it can pick the wrong file again. The Omarchy script refuses to create entries on American Megatrends and Apple firmware. Respect that: on those machines, delete the entry and go back through Limine instead.


# 1. confirm both UKIs exist
sudo ls /boot/EFI/Linux/

# 2. find the existing Omarchy direct-boot entry. Stop if there is none:
#    an empty number makes efibootmgr act on Boot0000
num=$(efibootmgr | sed -n 's/^Boot\([0-9A-Fa-f]\{4\}\)\*\? Omarchy\([[:space:]].*\)\?$/\1/p' | head -1)
if [ -z "$num" ]; then echo "no Omarchy direct-boot entry found, nothing to delete"; else
  efibootmgr | grep "^Boot$num"          # check this is the entry you mean
  sudo efibootmgr --bootnum "$num" --delete-bootnum
fi

# 3. recreate it on the ESP's disk and partition, pointing at the new UKI
src=$(findmnt -n -o SOURCE /boot)              # e.g. /dev/nvme0n1p1
disk=$(echo "$src" | sed 's/p\?[0-9]*$//')
part=$(echo "$src" | grep -o '[0-9]*$')
echo "$disk $part"                             # must print a disk and a number
sudo efibootmgr --create --disk "$disk" --part "$part" --label "Omarchy" \
  --loader '\EFI\Linux\omarchy_linux-omarchy.efi'

efibootmgr --create puts the new entry first in BootOrder. To go back through Limine instead, which follows BOOT_ORDER and still offers the stock linux kernel if linux-omarchy fails to boot, do step 2 and stop there.

Verify

efibootmgr -v shows Omarchy pointing at \EFI\Linux\omarchy_linux-omarchy.efi and first in BootOrder. After a reboot uname -r ends in -omarchy.

Sources

omarchy-direct-boot-stuck-on-stock-kernel-uki