[TriLUG] Error checking for dd?

Bill Farrow via TriLUG trilug at trilug.org
Tue Dec 20 21:48:31 EST 2016


On Wed, Dec 21, 2016 at 10:50 AM, vikram sai balaji ulaganathan via
TriLUG <trilug at trilug.org> wrote:
> Md5 sum check.
>
> Also do you sync (command sync) after DD and before taking the SD card out.

To sum that all up...

FILENAME=disk-image-file
FILESIZE=$(stat -c%s "$FILENAME")

dd if=$FILENAME of=/dev/sdX bs=4K
sync
dd if=/dev/sdX bs=1 count=$FILESIZE | md5sum
md5sum $FILENAME


More information about the TriLUG mailing list