> It just zero's the last bit and allocates the rest as-is. Its instant,
> which is nice, but obviously gave me a garbage mbr and partition
> table.

That's not obvious to me.

If plan9.img does not yet exist, running:

        dd if=/dev/zero of=plan9.img seek=$((1024 * 1024 * 1024 - 1)) bs=1 
count=1
        dd if=/dev/zero of=plan9.img bs=1048576 count=1024

should appear to behave exactly the same.  (The second actually
chews through 1GB of disk while the first does not, but in both
cases, subsequent reads anywhere in the file should give you
zero bytes.)

Russ

Reply via email to