YET MORE debugging. Memory is being corrupted at physical address 0x200f000-0x200f00b. (Heh, foob). Once corrupted, `mkunix` saves in-memory image to disk, that's why disk file is corrupted. OK. But why corruption? MORE DEBUGGING.
And then, when looking through my 3B2 source code, I figure it out. The CIO card drivers use that EXACT MEMORY LOCATION to write test results to memory on boot-up. Except my implementation had a bug, and was doing it AFTER kernel boot. AUUGGH.
"I appreciate SDF but it's a general-purpose server and the name doesn't make it obvious that it's about art." - Eugen Rochko