Skip to content

Read /boot as root when looking for the Omarchy UKI - #6653

Merged
dhh merged 2 commits into
quattrofrom
read-boot-uki-as-root
Aug 9, 2026
Merged

dhh merged 2 commits into
quattrofrom
read-boot-uki-as-root

Conversation

@dhh

@dhh dhh commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Fixes #6651.

On encrypted installs the ESP is mounted at /boot with dmask=0077, so the directory is root-only. Two commands probed it unprivileged and silently treated the resulting EACCES as "not found".

omarchy-setup-direct-boot searched for the UKI with a plain find, swallowed the permission error with 2>/dev/null, and reported Error: No Omarchy UKI found in /boot/EFI/Linux/ even though omarchy_linux.efi was sitting right there. That made direct boot unusable on every encrypted install.

omarchy-refresh-limine had the same flaw in its [[ -f ... ]] tests, where it failed quietly instead: both tests were always false, so the stale <machine-id>_linux.efi left over from pre-quattro custom-UKI installs was never cleaned up.

Both now read /boot through sudo, matching what omarchy-upgrade-to-quattro already does with as_root find /boot/EFI/Linux. efibootmgr and findmnt reads are left alone — they work fine unprivileged.

One behavior change worth noting: omarchy-setup-direct-boot now asks for the sudo password before the gum confirm, rather than after. The command is marked requires-sudo=true and the menu runs it in a floating terminal, so there is a prompt available either way.

— 🤖 Claude, posting on behalf of @dhh

dhh and others added 2 commits August 9, 2026 04:07
/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) <[email protected]>
The unprivileged file tests were always false on encrypted installs, so
the stale <machine-id>_linux.efi was never cleaned up.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot AI balanced review requested due to automatic review settings August 9, 2026 11:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@dhh
dhh merged commit f8c235a into quattro Aug 9, 2026
3 checks passed
@dhh
dhh deleted the read-boot-uki-as-root branch August 9, 2026 11:17
nick1udwig pushed a commit to nick1udwig/omarchy that referenced this pull request Sep 9, 2026
* 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) <[email protected]>

* Check for the legacy UKI as root when refreshing limine

The unprivileged file tests were always false on encrypted installs, so
the stale <machine-id>_linux.efi was never cleaned up.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Quattro, beta 1: Setup → Direct boot reports Error: No Omarchy UKI found in /boot/EFI/Linux/

2 participants