Skip to content

fix: add /usr/sbin and /sbin to PATH in update-script - #2163

Open
ErnestHysa wants to merge 1 commit into
getumbrel:masterfrom
ErnestHysa:fix/update-script-path-for-sfdisk
Open

fix: add /usr/sbin and /sbin to PATH in update-script#2163
ErnestHysa wants to merge 1 commit into
getumbrel:masterfrom
ErnestHysa:fix/update-script-path-for-sfdisk

Conversation

@ErnestHysa

@ErnestHysa ErnestHysa commented May 31, 2026

Copy link
Copy Markdown

Summary

The update-script does not include /usr/sbin or /sbin in its PATH, causing rugix-ctrl to fail with No such file or directory when it runs sfdisk (located at /usr/sbin/sfdisk) during OS updates. This was reported in issue #2153.

As described in that issue:

  • The update hangs at 93% with the bundle fully written to the inactive slot
  • The boot-slot switch never happens because rugix-ctrl cannot execute sfdisk
  • system.updateStatus reports running: true indefinitely

Fix

Added the standard sbin directories to PATH at the top of scripts/update-script:

export PATH="/usr/local/sbin:/usr/sbin:/sbin:$PATH"

This follows the suggested approach from the issue — it scopes the PATH fix to the update flow only, making it a safe and targeted change.

Testing

The issue author verified that running rugix-ctrl system info with the same truncated PATH reproduces the error. With the PATH corrected, sfdisk is found and rugix-ctrl can read the partition table.

Fixes #2153

The update subprocess spawned by umbreld inherits a PATH that does
not include /usr/sbin or /sbin, causing rugix-ctrl to fail with 'No
such file or directory' when it tries to run sfdisk to read the
partition table during OS updates.

This results in the update hanging at 93% with the bundle fully
written but the boot-slot switch never happening.

This fix follows the suggested approach from issue getumbrel#2153: adding the
standard sbin directories to PATH at the top of the update-script,
scoping the change to the update flow only.

Fixes: getumbrel#2153
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.

OS update hangs at 93% — rugix-ctrl can't find sfdisk because /usr/sbin is missing from PATH

1 participant