Repository navigation
fix: Wi-Fi forgotten at reboot (data-persist), plus first-boot hardening - #13
Merged
Merged
Conversation
…ersisted
/etc/ssh/ssh_host_* are symlinks into /data (stage 20). Both restore and
save cp'd each key onto its own target, cp refused ("are the same file"),
and set -e ended the script before the NetworkManager step. A Wi-Fi joined
from the setup hotspot lived only in RAM, and every boot after the first
logged syncphony-data-prepare/-save as failed.
copy_key skips a copy when both paths are already the same file. The new
bats test uses the box's real layout (symlinked keys); it fails without
the fix.
name= renamed the box (hostnamectl) but left the image's old name in /etc/hosts, so the box couldn't resolve itself: sudo printed "unable to resolve host" on every call. config.SetHostname now syncs that line, on the boot path and on boxd's setup save (which called hostnamectl itself before). SB_HOSTS points it elsewhere in tests.
…lock jump cage blocks VT switching unless started with -s, so a box whose kiosk died showed a frozen screen and no way to log in from its own keyboard. The consoles still ask for a password. syncphony-update.timer plans its next 04:00 from the boot clock. A box with no RTC boots in the past; once NTP corrects the clock that 04:00 is gone and the timer fires immediately, mid-setup. boxd update now skips a non-manual run outside the 04:00 hour.
…ixes systemd's default start limit (5 starts in 10 s) stopped a fast-failing kiosk for good, leaving the TV on a dead console. StartLimitIntervalSec=0 keeps Restart=always true.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found setting up an x86 box from the ISO: it joined Wi-Fi from the setup hotspot, showed the pairing code, then the kiosk died. After a reboot it was "offline" and asked for Wi-Fi again.
The main bug: joined Wi-Fi never persisted
/etc/ssh/ssh_host_*are symlinks into/data(stage 20).data-persistcp -p'd each key onto its own target in bothrestoreandsave.cprefuses ("are the same file"), and underset -ethe script stopped before the NetworkManager step. So:data-persist savefailed, and the connection lived only in the tmpfs overlaysyncphony-data-prepare/syncphony-data-saveas failed, and restored no Wi-Ficopy_keyskips a copy when both paths are already the same file (-ef). The new bats test uses the box's real symlinked layout; it fails without the fix. This affects Pis too (sharedrootfs/step).Smaller fixes from the same session
/etc/hosts:name=changed the hostname but left the old name on the127.0.1.1line, sosudosaid "unable to resolve host".config.SetHostnamenow syncs it, on the boot path and on boxd's setup save.SB_HOSTSpoints it elsewhere in tests.cage -s: Ctrl+Alt+Fn was blocked, so a dead kiosk left no way to reach a console from the box's keyboard.StartLimitIntervalSec=0: systemd's default start limit could stop a fast-failing kiosk for good.syncphony-update.timerplans 04:00 from that clock, and fires immediately once NTP corrects it.boxd updatenow skips non-manual runs outside the 04:00 hour.ADRs 0002 and 0012 and the CHANGELOG are updated.
Testing
make test(64 bats + Go tests) andmake lintpass in agolang:1.26-trixiecontainerStill open
Fatal Wayland communication error: Broken pipe, cage exiting under Chromium, about a minute after pairing showed) is unexplained. That boot's journal wasn't captured. Withcage -sand the start-limit fix it should now recover, and be inspectable if not.Failed unmounting data.mountat shutdown (seen in the journal, not investigated).