The rig's stage-2 init starts /usr/bin/warden-ui directly as root, so it
never ran S03warden-accounts, S99lvgl or warden-ui-run: no privilege drop,
respawn loop or safe mode was exercised, and the BusyBox setpriv bug of
flare-edge #1903 left every rebuild image without a UI while CI was green.
- mkimage.sh: ROOTFS_OVERLAY lays a directory of panel files over the
rootfs of both slots, modes kept. Only etc/ and usr/ at its top, no
symlinks; a refused overlay writes no image.
- sbin/init: with warden.initchain on the command line it runs
/etc/init.d/S00-S09 before the bus and S10-S99 after the payload daemons,
in place of the direct UI start (warden_init_chain in warden-lib.sh). The
splash handover is marked done and warden-ui-run gets "-b fbdev". A chain
boot without scripts prints WARDEN-QEMU-INITCHAIN-EMPTY and starts no UI.
- warden_rig_bus_owners: when the accounts exist, cred/ui belongs to
warden-ui and the cred directory to group warden-bus, as S10bus does.
- Tests: init-chain-test.sh (19 checks, also under busybox sh) and
rootfs-overlay.sh (17 scenarios, images read back with debugfs), both in CI.
Refs flare-edge#2210
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KerYPVh72hhNgKi3wS5ijG