Skip to content

Omarchy 4.5.0 update stops with exit 1 at the sudo migration: /run is 1777 on the phone, helpers need 755 #447

Open

Description

@gitpash

On a Pixel 7 Pro (cheetah, stable channel) the Omarchy 4.5.0 update stopped with exit 1 and no message at the migration "Remove legacy temporary passwordless sudo grants" (1788163635). Cause: /run has mode 1777 on the phone, and Omarchy's new security helpers require it to be exactly 755.

Evidence

$ stat -c '%a' /run
1777
$ findmnt -no SOURCE,FSTYPE,OPTIONS /run
tmpfs tmpfs rw,relatime          # no mode=755

/usr/bin/omarchy-sudo-passwordless __migrate calls omarchy_security_assert_root_directory /run 755, so it returns 1 silently, before it creates /var/lib/omarchy/migrations. The update log only shows:

Running migration (1788163635)
Remove legacy temporary passwordless sudo grants
Something went wrong during the update!
Refusing to use an unsafe Omarchy update inhibitor state path.

The second line is the same cause: omarchy-update-stay-awake walks the parents of $XDG_RUNTIME_DIR and refuses any directory with a group/other write bit (! ((mode & 022))), and /run is world-writable.

Check and workaround (runtime only, reverts on reboot):

chmod 755 /run
/usr/bin/omarchy-sudo-passwordless __migrate   # rc=0, creates /var/lib/omarchy/migrations/1788163635

Suggestion: the phone's early boot (initramfs rdinit=/init) seems to mount /run without mode=755. A fix there (mount /run with mode=0755, or a tmpfiles.d d /run 0755 root root -) would let Omarchy 4.5.x migrations and the update inhibitor run on a phone. Without it, every phone that updates will hit this at the same migration. Happy to test a fix on the 7 Pro.

Activity

  1. nesmeck commented on Nov 6, 2026

    @nesmeck
    Contributor

    Same on a Pixel 7 (panther), so this isn't only the 7 Pro:

    $ stat -c '%a' /run
    1777
    $ findmnt -no FSTYPE,OPTIONS /run
    tmpfs rw,relatime
    

    I think the cause is the shared initramfs init. initramfs/init line 19 mounts /run with no options:

    mount -t tmpfs tmpfs /run

    A tmpfs mounted without mode= has a root of 1777. Before switch_root, the init moves that mount into Arch (for m in /dev /proc /sys /run; do ... mount --move ..., lines 443-445). So systemd finds /run already mounted and keeps it as it is, instead of mounting its own with mode=0755. device/flame/initramfs/init line 13 does the same.

    A one-line fix at the source would be:

    mount -t tmpfs -o mode=0755,nosuid,nodev tmpfs /run

    That covers every phone that boots the shared init, without a tmpfiles.d rule that fixes the mode after the fact. Nothing in the init writes anything to /run that needs other users to write there (/run/ufs-ro, the probe logs, /run/omamobile-resizing are all written by root).

    I haven't run the 4.5.0 update on this phone (it's held for #434 and #433), so I haven't seen the migration fail here. That part is a prediction from the same /run mode. I'm happy to boot an initramfs with the change on the Pixel 7 and post stat, findmnt and a tools/phone-smoke report from that boot.

    🤖 Generated with Claude Code

  2. derekross commented on Nov 7, 2026

    @derekross
    Owner

    Thank you both. This is a clear report, and the cause is exactly what @nesmeck found: our initramfs mounts /run with tmpfs's default mode (1777) and hands it to systemd, which keeps it. #437 fixes it at the source (it mounts /run with mode=0755,nosuid,nodev). Its author has already booted it on a Pixel 7 with a clean smoke test. I'll boot it on my 7 Pro when I'm back home, then merge it and rebuild every phone's boot files. Release installs then pick it up with their next update and reboot.

    Until then:

    Thanks for the offers to test. A boot-image change on a 7 Pro has to be built with our own tool (slot B needs its AVB signature footers once it has had them, or the phone falls back to stock Android), so I'll do that boot myself.

  3. derekross commented on Nov 12, 2026

    @derekross
    Owner

    An update on this, because the move to Omarchy 4.5 on the development channel today brought it back for some phones.

    What happened. #437 fixed /run at the source, but a phone only gets a new boot image through a restart, and only the Pixel 7 Pro's device package carries one. So when the development channel moved to Omarchy 4.5.0-3 today (#670), a phone still running an older boot image stopped at the same sudo migration as in this report. My own 7 Pro didn't show it, because it had the new boot image pushed before its update.

    The fix. omamobile-omarchy 0.1.44 (#673) ships a tmpfiles rule that sets /run to 0755. pacman applies it in the transaction that installs it, before Omarchy's migrations run, and systemd applies it at every boot, on every device, whatever the boot image. It is on the development channel now.

    If your update stopped: run omarchy update again. It installs 0.1.44, /run becomes 0755, and the migrations go on from where they stopped.

    What I tested. On the 7 Pro with /run set back to 1777, Omarchy's own check (omarchy_security_assert_root_directory /run 755) refuses; after the rule is applied it passes. I have not yet run a whole update from 4.0.6 on a phone booted from an old boot image, so I'm leaving this open until I have, or until one of you tells me it finished. If it stops again, the last lines of the update's output and stat -c '%a %U' /run are what I need.

    A new boot image with #437 is still worth building and pushing for your device; this rule just means the update no longer depends on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions