Battlebox WSL rebuild — finishing handoff

2026-07-30 08:00 CET · for an agent operating via SSH from another machine · continuation of handoff-battlebox-disk-wsl-rebuild-20260730-1201

Summary

All repo work on battlebox's old WSL distro is committed and pushed (zero unpushed commits, audited). Ubuntu 26.04 ("Ubuntu26") is installed on D: and fully bootstrapped (user, dotfiles, SSH, agent CLIs, agent state, t3cc). Backups are staged to D:\wsl-rescue. Remaining: finish/verify D: copies and archives, mirror archives to G:\My Drive\260730_battlebox_backup, verify Ubuntu26 over a few days, then archive the old VHDX and wsl --unregister Ubuntu (frees ~242 GB on C:). The retirement step MUST be done from outside the old distro — hence this handoff.

Access & environment

Known trap: WSLInterop binfmt flush recurring

The old distro repeatedly loses its WSLInterop binfmt entry (first flush coincided with Ubuntu26's first systemd boot; per-distro binfmt instances have since diverged). Symptom: any *.exe from inside the old distro fails with Exec format error. Fix from PowerShell:

wsl -d Ubuntu -u root bash -c "echo ':WSLInterop:M::MZ::/init:PF' > /proc/sys/fs/binfmt_misc/register"

Note: long-lived shells inside the old distro may hold a stale mount namespace and still not see the entry — new sessions do. systemd-binfmt.service is already masked in Ubuntu26, but the flush still recurred at least once afterwards (second flusher unidentified). Self-heal without Windows access: ssh root@127.0.0.1 (from inside the old distro, battlebox key) and write the register line there — a fresh ssh session always lands in the live namespace.

Current state (as of 2026-07-30 ~08:00)

Repos — all safe verified

Data moves

Ubuntu26 — bootstrapped working

t3cc incident partially recovered

Every file in /home/ai/dev/t3cc was truncated to 0 bytes on 2026-07-29 ~11:22 (cause unknown). Source (771 lines, 8 modules) restored from the uv-built wheel (~/.cache/uv/sdists-v9/.../t3cc-0.1.0-py3-none-any.whl); pyproject/README reconstructed from wheel metadata; committed to a fresh local-only git repo (c5b26ab). Tests are lost (only cpython-314 .pyc files remain). No remote exists — create ioholding/t3cc on Bitbucket or keep the D: copies safe.

Next steps (ordered)

  1. Done by the in-distro agent — D: staging, all archives, and the G: mirror are complete and size-verified (see Current state). Only remaining check: confirm the Drive client finished uploading 260730_battlebox_backup (system-tray / GoogleDriveFS activity) and that N:\...\03_Working folder\tcs_cache finished syncing, before calling either durable.
  2. Ubuntu26 verification (days, per original plan): nvidia-smi / CUDA via WSL driver; re-clone repos (Bitbucket SSH already works) or seed from D:\wsl-rescue\dev; . ./scripts/nexus_credentials.sh && uv sync in lanefinder; run a small pipeline step; launch claude/codex/cursor-agent/t3cc once each.
  3. Retire old distro — only after Miro signs off: wsl --shutdown, locate ext4.vhdx via (Get-ChildItem HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss | Get-ItemProperty | ? DistributionName -eq 'Ubuntu').BasePath, copy to D:\wsl-backup\Ubuntu2004-ext4.vhdx, then wsl --unregister Ubuntu (frees ~242 GB on C:). The 33 lanefinder stashes + 3 others live only in this VHDX (Miro chose not to push them).
  4. Optional C: cleanup still pending Miro's approval (from the first handoff): C:\Autodesk 66.8 GB, old download zip 54.9 GB, Google Drive cache 29 GB, misc ~16 GB.

Risks & open questions