feat: add pbs (Intel NUC5i5RYB) drive map + USB-NVMe SMART & root support #26

Merged
jared merged 1 commits from feature/pbs-nuc-drive-map into main 2026-07-16 10:08:11 -04:00
1 Commits
Author SHA1 Message Date
jaredandClaude Opus 4.8 028e7bf1bb feat: add pbs (Intel NUC5i5RYB) drive map + USB-NVMe SMART & root support
Lint / Shell (shellcheck) (pull_request) Successful in 7s
Lint / Shell (shellcheck) (push) Successful in 7s
Adds a `nuc` chassis type and a `pbs` mapping: one internal 2.5" SATA (OS/boot)
plus two rear USB 3.0 ports (stacked top/bottom) carrying USB-attached NVMe.

The two JMicron USB bridges report an identical serial, so the drives are keyed
by USB *port path* (usb-0:N), not by-id. Physical top/bottom was confirmed with
an LED blink test: TOP = port 3-4 (usb-0:4), BOTTOM = port 3-3 (usb-0:3).

Supporting changes so it works on the NUC:
- maybe_sudo(): run privileged commands directly when already root (PBS/minimal
  Debian may not have sudo installed at all).
- smart_collect(): auto-select a smartctl -d for USB bridges (sntjmicron/
  sntrealtek/sntasmedia/sat); plain calls can't read NVMe behind a bridge and
  were mislabeling the drives (wrong type, false failed-health ✗).
- Detect NVMe reported via a USB bridge (device is sdX) for correct TYPE.
- Render usb-* bays in the drive table; align the nuc controller line.

Verified live on pbs: correct top/bottom map + full SMART (type/temp/health/
model/serial) for the internal SATA and both USB NVMe drives.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-15 22:34:15 -04:00