F9: Using dd to clone a drive...

Daniel B. Thurman dant at cdkkt.com
Sat Jul 19 07:10:38 UTC 2008


Mikkel L. Ellertson wrote:
>
> Dan Thurman wrote:
> >
> > I used dd off the Gnome Live CD, so that neither
> > drives were mounted nor active. Next I proceeded
> > to use dd as follows:
> >
> > dd if=/dev/sda of=/dev/sdb
> >
> > It took approx. 6 hours to copy over 450GB of data.
> >
> You would be better off using gparted or clonzilla to do the
> copping. With DD, it has to copy every byte. The others understand
> file systems and only copy data, not empty space.
>
I tried Gparted-Live.

Unfortunately, it failed to copy 85% of the way complaining
about a bad block on the source drive!  I have run the 'Check'
and it does not even see any problems with the source drive!
I even did a check on the destination drive and it says it does
not see any problems either - even when the copy failed!

Is there any tool besides fsck that really does a through job
making sure to detect bad-blocks (if there really was any)
and add it to the bad block list?  Or, perhaps there is a problem
with Gparted-Live v0.3.7.7.1 version?

Source:          /dev/sda6
Destination: /dev/sdb6

Copy stops with a message on the source saying something like:

/dev/sda6:
Copied 86948585 of 604106921
Error while reading block at 937752324

The sda6 partition size is correctly 604106921 (~300GB) so why
the heck is Gparted reading 937752324, probably somewhere
in the 7th partition (5GB swap) or even possibly at the end of
the750GB  drive itself?

Of the 300GB / partition, only 49GB is actually used while the
rest is actually empty space.  Is that the problem?  Is Gparted
smart enough not to copy over empty space and end after 49GB
of data?

I  have tried everything I could throw at it:

 Gnome-Live & Gparted Live:
1) mount /dev/sda6 /mnt/a
     mount /dev/sdb6 /mnt/b
     setenforce 0
    a)  cp -acpx /mnt/a/.  /mnt/b
    b)  tar --xattrs  -cpf - /mnt/a | (cd /mnt/b tar --xattrs -xpf - .)

Nothing seems to work!

Why am I not able to get the / partition copied over
successfully?  Everything is bootable *except* / !

Please advise!

Thanks,
Dan




More information about the fedora-list mailing list