I use DC3DD to copy Raspberry Pi image files to multiple microSD cards using a Lexar card reader. This has been working well for years, but I've recently encountered a batch of faulty microSD cards.
When copying to a faulty card, the DC3DD command and md5 hash complete successfully, even though the resulting image file is unreadable.
I had assumed (incorrectly it seems) that using the md5 hash validated the write. Is there a better command I could use to confirm a successful copy?
Here is the command I currently use:
sudo dc3dd if=data.img hof=/dev/sdd hof=/dev/sde hof=/dev/sdf hash=md5
Thanks,
Mike
dc3dd
works, but because of buffering, it may be that it actually does not physically read the data back from the card to validate, but uses the data that has just been written to the card and is still present in memory. I would calculate a hash of the input file and store it somewhere, write the cards using eitherdc3dd
or just a regulardd
, physically remove the cards, insert them again, and then read data from cards and compute hashes. – raj Jul 11 '22 at 16:59