[KLUG Members] Harddrive Imaging

Adam Williams members@kalamazoolinux.org
19 Jan 2003 08:02:37 -0500


>>>Does anyone know of any open source harddisk imaging software.
>>What kind of filesystems do you wish to "image".
>>If you want to copy Linux partitions, it can be done with the 
>>standard tools that come with any distribution.
>Simple enough:
>  dd if=/dev/hda of=/dev/hdb
>I use this for making images of floppies...
>  dd if/dev/fd0 of=<file>
>then
>  dd if=<file> of=/dev/fd0

Specifying a block size (bs=512) may make it go faster.

You can also backup/restore partition tables using the standard
utilities -

Backup:
 dd if=/dev/hda of=backup-hda.mbr count=1 bs=512
 sfdisk -d /dev/hda > backup-hda.sf

The first file is a copy of the master boot record, the second is a copy
of any extended partition linked list descriptors.

Restore:
 dd if=backup-hda.mbr of=/dev/hda
 sfdisk /dev/hda < backup-hda.sf

Both dd and sfdisk are standard utilities, at least on RedHat.