/system/current holds the system, /data the state that survives an update
(docs/NEXT.md §6, Konrad: "it sucks that with an update we have to configure
everything"). base/initramfs/init mounts the partition once and sets up:
/ bind of /system/current
/home /root /var/lib binds of /data/...
/etc overlay: lower = the system's /etc, upper = /data/etc/upper
/data /system binds, so the system sees them
An image without /system/current (before 2026-11-09) is still mounted as the
whole partition -- measured on the phone: "layout: whole partition (image
without /system/current)", switch_root at 1.45 s.
Measured on the host (2026-11-09): the mount sequence works; a /etc write
lands in /data/etc/upper; remount,ro on the bind flips the whole file
system (so Void's stage 1 fsck still checks the partition) and remount,rw
undoes it; /proc/mounts names the device for /, so 03-grow-root.sh keeps
working. The partition mount cannot be moved into the new root -- the
target lies inside the source (the bind makes it so) -- so it stays at
/sysroot.real without a path after switch_root; the overlay and the binds
hold it.
Kernel: CONFIG_OVERLAY_FS=y (was m; the initramfs loads no modules).
tools/mkrootimg.sh writes /system/current/ and keeps /data out of the
image; the tree assembly is tools/assemble-rootfs.sh, shared with the new
tools/mkroottar.sh (make roottar) and tools/update-root.sh (make
update-root VERSION=...; unpack into /system/<v>, rename current, /data
untouched). update-root is written and syntax-checked, not yet measured.
Initramfs pin renewed: 6d1bd30b2a6fd815 (4950e286679ca4fa before).
Measured on the phone (hotdogb, 2026-11-09): flash-root of the new image,
first boot creates /data and copies /var/lib and /root, file system grown
to 96 GiB; after restoring the phone's /etc/NetworkManager, /etc/ssh and
/var/lib state into /data: WLAN reconnects with the saved profile
(192.168.1.127), the ssh host key is the old one, rtc-offset and the clock
survive a reboot, upper has the profile, the keys and runit's supervise
dirs.