Skip to content

rootfs: iSH-AOK is no longer a host that rejects the chroot mounts - #2

Open
emkey1 wants to merge 1 commit into
R0GUEEE:mainfrom
emkey1:chroot-mounts-ish-aok
Open

rootfs: iSH-AOK is no longer a host that rejects the chroot mounts#2
emkey1 wants to merge 1 commit into
R0GUEEE:mainfrom
emkey1:chroot-mounts-ish-aok

Conversation

@emkey1

@emkey1 emkey1 commented Aug 13, 2026

Copy link
Copy Markdown

Second of two PRs from the iSH-AOK side. Independent of #1, either order is fine.

What is out of date

rootfs_mount_chroot_fs carries this note:

Restricted hosts such as iSH-AOK may reject one or more mount types

That was true when it was written. It is not true now. As of iSH-AOK build 548 all build types are supported, and I verified all five mounts this function makes on an aarch64 iSH-AOK guest:

mount -t proc    -> OK        mount --bind /dev      -> OK
mount -t sysfs   -> OK        mount --bind /dev/pts  -> OK
                              mount --bind /AOK      -> OK

with /proc populated and /AOK showing real content afterwards. On our side that is bind mounts and MS_MOVE landing, devtmpfs becoming a real filesystem rather than a no-op, and proc/sysfs/devpts/tmpfs/devtmpfs all being registered mountable filesystems.

What this PR does not do

It does not remove the fallback. Older iSH-AOK builds are in the field and other restricted hosts exist, so the try-and-degrade structure stays exactly as it is. The only thing removed is the claim that failing is the expected outcome on iSH-AOK.

What it adds instead

The warnings become actionable. On an iSH-AOK older than 548, a failed mount now says so and names the build that fixes it:

Could not mount proc in /tmp/x — iSH-AOK build 547 predates full mount
support (build 548+); the build continues without it.

Anywhere else the message is unchanged, since the generic wording is all that can honestly be said.

Build detection reads the number out of uname -v (iSH-AOK 1.3 (547) built ...) rather than the marketing version, which we do not bump between builds and which therefore cannot tell two builds apart. That is a trap worth knowing about generally if you ever key behaviour off an iSH-AOK version.

Testing

Exercised by sourcing the module with tui_* stubbed, on four hosts/cases:

case result
real iSH-AOK guest, reports 547 names build 547 and the 548+ requirement
simulated build 501 same
simulated build 548 generic message, no misleading upgrade advice
malformed uname -v generic message, no error
non-iSH host (Darwin) generic message

bash -n clean. tests/*.sh give identical results before and after (test-audit-fixes 3 failing, test-features 49 failing, other three green; both of those also fail on a pristine 5a0b3fd, so they are unrelated to this change).

🤖 Generated with Claude Code

rootfs_mount_chroot_fs carried a note that "restricted hosts such as iSH-AOK
may reject one or more mount types". That is out of date. As of iSH-AOK build
548 all build types are supported, and all five mounts this function makes
were verified working on an aarch64 iSH-AOK guest:

  mount -t proc    OK      mount --bind /dev      OK
  mount -t sysfs   OK      mount --bind /dev/pts  OK
                           mount --bind /AOK      OK

with /proc populated and /AOK showing real content afterwards.

The try-and-degrade structure is deliberately kept: older iSH-AOK builds are
in the field, and other restricted hosts exist. Only the claim that this is
the expected outcome on iSH-AOK is removed.

The warnings are now actionable instead. On an iSH-AOK older than 548 a failed
mount says so and names the build that fixes it, rather than leaving the user
with an unexplained warning during a rootfs build. Anywhere else the message is
unchanged, since the generic wording is all that can honestly be said.

Build detection reads the number out of `uname -v`
("iSH-AOK 1.3 (547) built ..."), not the marketing version, which is not
bumped between builds and so cannot distinguish them.

Verified on a real iSH-AOK guest (reports 547, warns about 548+), with
simulated builds 501 and 548, with a malformed uname -v, and on a non-iSH
host: only the pre-548 cases get the extra text and none of them error.

tests/*.sh give identical results before and after this change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

2 participants