From f8c235a5e4bd3e41c69bc28bd583cc9931beafe3 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 9 Aug 2026 13:17:28 +0200 Subject: [PATCH] Read /boot as root when looking for the Omarchy UKI (#6653) * Find the Omarchy UKI as root when setting up direct boot /boot is mounted with dmask=0077 on encrypted installs, so the unprivileged find returned nothing and direct boot always reported that no UKI was present. Co-Authored-By: Claude Opus 5 (1M context) * Check for the legacy UKI as root when refreshing limine The unprivileged file tests were always false on encrypted installs, so the stale _linux.efi was never cleaned up. Co-Authored-By: Claude Opus 5 (1M context) --------- Co-authored-by: Claude Opus 5 (1M context) --- bin/omarchy-refresh-limine | 6 ++++-- bin/omarchy-setup-direct-boot | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/omarchy-refresh-limine b/bin/omarchy-refresh-limine index 40e30584..1837d9e4 100755 --- a/bin/omarchy-refresh-limine +++ b/bin/omarchy-refresh-limine @@ -3,9 +3,11 @@ # omarchy:summary=Overwrite the user config for the Limine bootloader and rebuild it. # omarchy:requires-sudo=true -if [[ -f /boot/EFI/Linux/omarchy_linux.efi ]] && [[ -f /boot/EFI/Linux/$(cat /etc/machine-id)_linux.efi ]]; then +legacy_uki="/boot/EFI/Linux/$(cat /etc/machine-id)_linux.efi" + +if sudo test -f /boot/EFI/Linux/omarchy_linux.efi && sudo test -f "$legacy_uki"; then echo "Cleanup extra UKI" - sudo rm -f /boot/EFI/Linux/$(cat /etc/machine-id)_linux.efi + sudo rm -f "$legacy_uki" fi echo "Resetting limine config" diff --git a/bin/omarchy-setup-direct-boot b/bin/omarchy-setup-direct-boot index 898108ac..56c7fd50 100755 --- a/bin/omarchy-setup-direct-boot +++ b/bin/omarchy-setup-direct-boot @@ -38,7 +38,7 @@ if [[ -n $existing_entry ]]; then exit 0 else - uki_file=$(find /boot/EFI/Linux/ -name "omarchy*.efi" -printf "%f\n" 2>/dev/null | head -1) + uki_file=$(sudo find /boot/EFI/Linux/ -name "omarchy*.efi" -printf "%f\n" 2>/dev/null | head -1) if [[ -z $uki_file ]]; then echo "Error: No Omarchy UKI found in /boot/EFI/Linux/" >&2