Tag Info

New answers tagged

1

What we did was to md5um the actual partition. It doesn't exactly allow you to checksum the image with the disk, but if you have a few disks (like we do), you are able to establish the 'proper' checksum. For instance, in our case the partitions look like this: $ sudo fdisk -l /dev/sdc Disk /dev/sdc: 7948 MB, 7948206080 bytes 245 heads, 62 sectors/track, ...


2

Determine the size of the image, for example with \ls -l my.img (not ls -lh, that would give you an approximate size; \ls protects against an alias like ls='ls -h') or with stat -c %s my.img. If you want to check the copy against the original just this once, then just compare the files. Using hashes is useless for a one-time comparison, it would only make ...


0

sudo sh -c ' dd bs=64k if="$1" of="$2" ! cmp -- "$1" "$2" 2>&1 | grep -qvF "EOF on $1" ' -- my.img /dev/sdc cmp will compare two files byte for byte and return based on whether or not they are identical. If one is shorter than the other, but both files were identical for the entire length of the shorter file, then cmp will return 1 ...


0

Are you writing it to a filesystem on the SD card ? Or directly ? You need count if you want to limit the run length of the compared data ? dd should tell you how many bytes were copied. This needs to be captured and used with appropriate bs=x and count=y. This is to avoid hashing garbage in a cluster tip. EDIT capture the output, this is the line you ...


0

md5sum would be a good solution here, to compare the value of the image file with that of the SD card.



Top 50 recent answers are included