Tutorial :DD img different MD5's?



Question:

We have a smart media card with a linux install on it that we need to duplicate. We created an img with DD and then used dd to write the img back to a couple of new smart media cards. We have compared the MD5 checksum of both the original and the new copies and they are different.

Here is what we used:

dd if=/dev/sdb of=myimage.img

dd if=myimage.img of=/dev/sdb

dd if=/dev/sdb of=newimage.img

Anyone have any ideas of why these come out different?


Solution:1

If the cards are different sizes, dd'ing the smaller image to a larger card will not "fill it up", and zeros will remain at the end of the card. An image made from this card will be different than the original image.

It's also always possible that data was mis-written, mis-read, or otherwise corrupted in-transit.


Solution:2

The card capacities differ? Running 'ls -l myimage.img newimage.img' might tell you something. Running 'cmp -l myimage.img newimage.img' might tell you something.


Solution:3

If you mounted /dev/sdb in between it would be an answer. If I remember correctly ext2 and ext3 have a "mount counter".


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »