Reputation:
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?
Upvotes: 4
Views: 809
Reputation: 7654
If you mounted /dev/sdb in between it would be an answer. If I remember correctly ext2 and ext3 have a "mount counter".
Upvotes: 1
Reputation: 26769
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.
Upvotes: 2
Reputation: 5870
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.
Upvotes: 1