Mailinglist Archive: opensuse (4626 mails)

< Previous Next >
Re: [opensuse] How to Clone a whole disk?
  • From: "Greg Freemyer" <greg.freemyer@xxxxxxxxx>
  • Date: Sat, 13 Jan 2007 12:48:57 -0500
  • Message-id: <87f94c370701130948i51b48165lb5327c2062aa32b8@xxxxxxxxxxxxxx>
On 1/13/07, Reinhard Gimbel <opensuse@xxxxxxxxxxxxx> wrote:
Hello Bo, hello community !

Bo wrote / schrieb:

> I've just been lurking so far but
> I would be happy to recieve some help on the topic of how to clone an
> entire disk (with
> partitions and diferent filesystems and all) on a dual boot home systen.
> No servers or anything.

Unix command "dd" (= device dump) is your friend !

Assuming the disk to clone is connected to primary IDE channel as master
(=/dev/hda) and the target disk resides on primary IDE as slave
(=/dev/hdb) the command you need to issue looks like this:

dd if=/dev/hda of=/dev/hdb bs=128M

The option "bs" specifies a buffer of 128MB size. Otherwise "dd" would
copy blocks of 512 byte each ...

I agree with others, that a Ghost like program would be better than
dd, but if you're going to use dd to copy a whole disk, use the read
error options to continue past the occasional bad sector:

dd if=/dev/hda of=/dev/hdb bs=128M conv=noerror,sync

And bs=4k is big enough in my experience. (And I do this a lot
including timing tests etc..) If you're target is a tape, then you
want (need) a big blocksize like above, but be sure to label your disk
with the blocksize you used. I've found that a lot of tapes can only
be read if you use the same blocksize as you wrote.

Greg Freemyer
The Norcross Group
Forensics for the 21st Century
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups