Tag Archive for 'dd'

Copy sparsebundle to disk on Linux

I’ve figured out an pretty easy way to copy the contents of a OS X sparsebundle onto a whole disk on linux.
First go into the Image.sparsebundle directory and have a look at the Info.plist. You need the values for size and band-size.
Now in a shell enter:
for i in $(seq 0 $(({size}/{band-size}-1))) ; dd if=`printf "%x" $i` of={/dev/sdx} bs={band-size}c seek=$i ; done
All in one line and replace everything in curly braces with the desired value, e.g. “{band-size}” => “8388608”.