Found and fixed the bug that Chad found last week and did not check
in. Sigh. Took me too long to find this. On the other hand, there is more debugging and more asserts in the code. Also a -d option to turn on progressive levels of debugging. Also changed the operation of imageunzip so that individual slice writes (ie, to unzip the BSD or Linux partition instead of the entire disk). Using the slice device (/dev/rda0s1) is actually a problem on BSD since it snoops writes to where the disklabel should be and alters the offsets. Even worse, on non BSD partitions it craps out completely because there is no disk label at all. This is really a dumb thing. So, I added code to read the MBR when the -s (slice) option is given, and use the MBR to compute the offsets from the beginning of the raw disk. Must always use the raw disk device now, and the new operation is: imageunzip all.ndz /dev/rad0 imageunzip -s 2 rhat.ndz /dev/rad0 Note that if you give a slice instead of a disk device, and there is a valid looking MBR in the slice (which is very possible), then things will get very confused. Not sure what to do about that yet.
Showing with 164 additions and 23 deletions