Re: dd / netcat / md5sums: hashes do not match

From: Mark Hittinger (bugs_at_pu.net)
Date: 09/18/03


Date: Thu, 18 Sep 2003 15:29:02 GMT

Casper H.S. *** <Casper.***@Sun.COM> writes:
>>B# nc -l -p 6789 | dd of=./hda1.img bs=512 conv=noerror,sync
>>A# dd if=/dev/hda1 bs=512 conv=noerror,sync | nc <B's IP> 6789

>I wouldn't use "sync" because sync causes blocks to be
>padded with NULLs; this is certain to corrupt
>the file.

If his hard drive has a bad spot you need sync to fill the bad read with
nulls. If you don't do this then the blocks on the output side will be
mis-aligned after the bad spot.

Now that we know he's doing this on a live file system I guess the mystery
is solved.

Later

Mark Hittinger
bugs@pu.net


Quantcast