Md5sums and burning CDs
Gary W. Swearingen
garys at opusnet.com
Sat Jul 22 14:55:38 UTC 2006
Gabriel M Dragffy <dragffy at yandex.ru> writes:
> I can find out the MD5 of the .iso by doing md5sum foo.iso
> But finding out the MD5 of a written CD by doing,
> md5sum /media/dvdrecorder/* gives me differing results.
There's a bit extra on the ISO CD (at the end) than in the ISO file.
Here's some script to figure amount of /dev/cdrom to check.
blockbytes=2048 ## Block size of ISO CDs. Nothing else will work (esp, in dd command).
filebytes=$(stat -f "%z" "${FILENAME}")
fileblocks=$(( ${filebytes} / ${blockbytes} ))
if [ $(( ${fileblocks} * ${blockbytes} )) != ${filebytes} ]; then
echo "ERROR: '${FILENAME}' is not a multiple of the CD blocksize, ${blockbytes}. Nothing done."
exit 3
fi
Add some "dd",etc. BTW, IIRC, using "diff" should be better than
md5sum, if you've already checked the md5sum of the file.
More information about the ubuntu-users
mailing list