I have a ~1GB image that I'm writing to a 8GB SD card via the dd
tool. I'd like to verify that it was written without corruption by reading it back and comparing its hash with original one.
Obviously, when I read it back via dd
the size of resulting image matches size of my SD card, therefore checking hashes are useless.
I believe that I should somehow interpret the output of writing invocation to configure the skip
/ count
parameters to read it back properly.
Command that I used to write my image:
> sudo dd if=my.img of=/dev/sdc bs=1M
8+50581 records in
8+50581 records out
3947888640 bytes (3.9 GB) copied, 108.701 s, 36.3 MB/s
Command that I used to read my image:
> sudo dd if=/dev/sdc of=same_as_my.img
15523840+0 records in
15523840+0 records out
7948206080 bytes (7.9 GB) copied, 285.175 s, 27.9 MB/s