OpenRiot v7.9.18 — The One Where We Learned to Read dmesg
“It said sd0 was available. We believed it. The kernel laughed.” — The OpenRiot Crew, discovering that
AVAILABLEandALREADY IN USEcan both be true at the same time
Release Overview
v7.9.18 ships the Disk Manager (openriot --disk) — a Bubble
Tea TUI for discover, mount, umount, format, encrypt, and benchmark
operations. Drive detection now works correctly on systems with
softraid crypto root.
⚠️ Experimental. The Disk Manager builds, passes tests, and correctly discovers/enumerates drives on this system, but read-write operations (mount/umount/format/encrypt/benchmark) have not been thoroughly tested. Use with caution.
The Drive Detection Fix Saga
The softraid-aware drive detection was broken in several layers:
-
parseSoftraid()randoas bioctl softraid0which failed silently — no PATH, no stderr capture, no fallback. All softraid awareness collapsed: noIsChunk, noIsEncrypted, no cross-mount mapping. -
DiscoverDrivesonly read root from dmesg, which can show the physical chunk (root on sd1a) with or without a/dev/prefix, and didn’t trace through softraid. -
filterDrivesexcluded ineligible drives from action lists instead of showing them as non-selectable — users couldn’t see WHY a drive was blocked. -
parseMountsonly cross-mapped virtual→physical, missing the reverse direction when mount output showed the physical chunk. -
MountDrive, like Format/Encrypt/Umount before it, had no backend safety guard — root/chunk protection relied entirely on filtering.
The fix: independent flag detection with dmesg fallback
Instead of relying on a single bioctl-based softraid mapping, each drive gets its flags from multiple independent sources:
| Flag | Primary source | Fallback |
|---|---|---|
IsChunk |
parseSoftraid |
hasRAID from disklabel |
IsEncrypted |
parseSoftraid |
isVirtualOnSoftraidBus from |
| dmesg | ||
IsRoot |
mount output ( on / ) |
dmesg root on |
The isVirtualOnSoftraidBus helper parses dmesg for devices
attached to a scsibus owned by softraid0 — no pairing
heuristics, works with any number of volumes.
All drives now appear in all action lists with their status
([ROOT], [CHUNK], [MOUNTED], [ENCRYPTED], [AVAILABLE]).
Selection-time guards block operations on ineligible drives with a
clear message instead of silently hiding them.
A system integration test (diskintegration_test.go) verifies the
detection on this hardware:
sd0 3726 GB chunk=true raid=true ← NVMe chunk
sd1 3725 GB root=true mounted=true ← virtual root
encrypted=true
Highlights
New: openriot --disk (⚠️ Experimental)
- Bubble Tea TUI with menu, drive list, confirm, password prompt, benchmark presets, and result screens
- Discover, Mount, Umount, Format, Encrypt, Benchmark operations
- softraid-aware: virtual devices and physical chunks mapped independently
- Root/chunk drives shown but non-selectable
- Benchmark presets: Quick (512MB/15s), Standard (2GB/60s), Thorough (4GB/180s)
Fixed: Drive detection reliability
- Root detection from mount output (preferred), dmesg fallback
- dmesg
/dev/prefix stripped when parsing root device parseMountsbidirectional cross-map (virtual↔physical)parseSoftraidusesCombinedOutput,/sbin/bioctl, anyVolumeline (not just CRYPTO), and falls back to dmesgisVirtualOnSoftraidBusdmesg helper — no pairing heuristics
Fixed: Safety
filterDrivesshows ALL drives; selection blocked at runtimeIsChunkguard added toupdateDriveListselectionMountDrivecallsguardDrive()like Format/Encrypt/UmountMountfilter blocksIsRootandIsChunkat the UI level
🧾 Files Changed
| File | Change |
|---|---|
source/disk/disk.go |
NEW — --disk entry point |
source/disk/model.go |
NEW — model, key map, presets |
source/disk/view.go |
NEW — all rendering |
source/disk/update.go |
NEW — key handlers, async cmds |
source/disk/backend.go |
NEW — backend ops, softraid |
source/disk/filter.go |
NEW — action-aware drive filter |
source/disk/export_test.go |
NEW — test bridges |
source/disk/diskintegration_test.go |
NEW — system test |
source/commands/commands.go |
Added --disk command |
source/settings/settings.go |
Added Disk Manager menu entry |
config/rofi/apps.txt |
Added openriot_disk window class |
config/window/icons.toml |
Added openriot_disk icon |
install/packages.yaml |
Added fio-3.41 |
README.md |
Disk Manager section (Experimental) |
assets/disk.webp |
NEW — Disk Manager screenshot |
Specs/DiskManager.md |
Bug tracker (26 issues resolved) |
🗣️ Final Words
“We spent six sessions chasing an empty map. The answer was in dmesg the whole time.” — The OpenRiot Crew, on
isVirtualOnSoftraidBus