Greetings!
On Thu, 16 Feb 2006 18:31:42 +0800
Willard Van Dyne <[EMAIL PROTECTED]> wrote:
> I'm trying to properly clone a 4.3GB (it's old, I know) hard disk
> which unfortunately has a lot of bad sectors.
[...]
> dd if=/dev/hdb of=/mnt/hda7/image.dd conv=noerror,sync
>
> My problem is that the md5 hash of the image file is different from
> that of the original HD (acquired via the command: dd if=/dev/hdb
> conv=noerror,sync | md5sum > /mnt/hda7/orig_disk_md5sum.txt)
[...]
> Can anyone please enlighten me as to what I'm doing wrong?
I guess the harddisc does not have CONSTANT errors, but varying
(probably increasing) errors reading the disc. You will probably get
more complete images with ddrescue which is a bit more
insisten/consistent reading over/around errors.
As long as you are not sure that your disc (hardware) stays CONSCTANT in
reading behaviour, taking a checksum directly from the disc
*at*a*different*time* than when taking the image will of course give
different results.
Try taking both at the same time, like:
dd if=/dev/hdb conv=noerror,sync \
| tee /mnt/hda7/image.dd \
| md5sum > /mnt/hda7/orig_disk_md5sum.txt
This will not be possible with ddrescur, though, as that will copy
non-sequential when stumbling over an error, trying smaller block sizes,
reading backward after an error, etc.
Bye
Volker
--
Volker Tanger http://www.wyae.de/volker.tanger/
--------------------------------------------------
[EMAIL PROTECTED] PGP Fingerprint
378A 7DA7 4F20 C2F3 5BCC 8340 7424 6122 BB83 B8CB