Creating clone of a HDD including boot partition

Warren Block wblock at wonkity.com
Wed Dec 15 19:20:07 UTC 2010


On Wed, 15 Dec 2010, bsd wrote:

> Is there a way to dd to a file to create an iso image and then restore (still using dd from this image).
> I only have one IDE <--> USB cable so this is the reason why It'd more simple for me to create an iso image of the disk and then restore.

Use dd's of= parameter to send output to a file.  If it really has to be 
an ISO, pipe it to mkisofs.  Using dd like that makes big files with 
lots of wasted space.  The article I posted earlier shows how to save 
some of that by filling the disk's empty space with zeros.  Then gzip 
can do some useful compression.

> Using dump won't be very useful because I won't be able to get the first 63 segments where boot info are written, I need something of lower level (obviously dd will be my friend).

A hybrid approach would be to save the first 63 blocks with dd, then use 
dump for the UFS filesystems.

dd if=/dev/ad0 of=mbr.bin count=63

PS: top-posting bad, inline with trimmed irrelevancies good.


More information about the freebsd-questions mailing list