Repository navigation
os/mini: log what /data can hold, on the stick, at boot (#706) - #768
Conversation
The data partition is grown at prepare time (prepare-stick.sh: sgdisk -e, size=+, resize2fs), proved on a loop copy of the image (2.1 -> 5.8 GiB) and on the owner's 64 GB stick (58G total, 54G free, measured read-only). What was missing is the line the issue asks for: the result in /data/boot.log, where it outlives the boot and can be read from another system. init now records "/data: <total> total, <free> free on <device>" with the other stage markers, right after the data partition is mounted.
|
Preparing review... |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY
At fbf091b5 — first review, build green. One file, os/mini/init.sh, +5 −0 (plus a mode fix 100644 → 100755 on an executable script, which is correct).
The #706 close-out: the appliance now logs what /data can actually hold, in the place that outlives the boot:
if grep -q " /data " /proc/mounts; then
stage "/data: $(df -h /data 2>/dev/null | awk 'NR==2 {print $2" total, "$4" free"}') on ${data:-?}"
fiThree things make this the right shape rather than decorative:
- it goes through
stage, so the line lands on the screen, ttyS0 and/data/boot.logat once — the same three destinations as every other wait line, which is what the gates and the 26 Oct debugging reads; - it is guarded by the mount check, so a boot with no
/dataprints nothing rather than adferror or a bogus "? total"; - it prints the device as
${data:-?}, so the line says which partition it is reporting on — the distinction #711 was about, and the reason this is useful rather than just a size.
That is the pair to #724's prepare-stick.sh growth: the growth happens at prepare time and this is "the first place the result is visible from inside the appliance", as the comment says. A 2 GiB /data and a 58 GiB one now look different in the boot log, which is exactly what was missing when no catalogue model could be pulled on the live system.
pr_agent was failing on this head when I looked; that check has been unreliable all session (coder-llm availability) and does not gate content — build is green.
Not verified: the line on a real boot (needs the QEMU gate or the board). The df -h parsing is the standard NR==2 row and the mount guard is the same idiom used elsewhere in this file.
tprs-ready applied.
PR Reviewer Guide 🔍(Review updated until commit e59aba7)Here are some key observations to aid the review process:
|
|
Persistent review updated to latest commit 8d048c4 |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY
Confirmation at 8d048c4a: Merge branch 'main' into os/mini-data-size-log, author commit unchanged
(fbf091b), own diff still the single +5 hunk in os/mini/init.sh.
Re-checked the content at this head rather than trusting the rebase: bash -n os/mini/init.sh clean, and the two
lines are the ones reviewed — stage "stick mounted at ${data:-nothing}" (line 121) and the df -h /data line
(125), both through stage so they reach the screen, ttyS0 and /data/boot.log, and ${data:-?} so the line names
which partition. Label stays.
|
Persistent review updated to latest commit b0f2a07 |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY
Confirmation at b0f2a070: Merge branch 'main' bringing #766's Laya gitlink into the branch; the PR's own content is
still the one fbf091b commit, +5 in os/mini/init.sh, unchanged. bash -n os/mini/init.sh clean at this head, and
the two stageed lines are as reviewed (stick mounted at ${data:-nothing}, and the df -h /data readout with
${data:-?}). Label stays.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY
Confirmation at e59aba7c: merge-of-main, the PR's own commit fbf091b unchanged (+5 in os/mini/init.sh), so the
content is byte-identical to what I reviewed and re-checked (bash -n clean, both stageed lines present, ${data:-?}
naming the partition). Label stays.
|
Persistent review updated to latest commit e59aba7 |
Closes #706 with the measurement and the line it asked for.
Measured on the real stick (the c19 image on the owner's 64 GB UDisk, after
prepare-stick):54 GB free is more than the biggest catalogue file (27B 17.6 GB, Coder-30B 18.6 GB), so the live appliance can pull a model.
What this PR adds is the last piece of the issue's own wording: the result in
/data/boot.log, where it outlives the boot:— written with the other stage markers, right after the data partition is mounted, and only when
/datais actually mounted.What was already there (and is not changed here):
prepare-stick.shgrows the partition at prepare time withsgdisk -e+size=++resize2fs,--checknever grows anything, and the growth is proved on a loop copy (2.1 → 5.8 GiB) as well as on the device.sh -nclean.