quick (and perhaps foolish) question: MD4sum of CD

Mikko Paananen mikko at ipi.fi
Fri Sep 26 08:56:56 UTC 2003


On 2003-09-26 at 07:36, Tom Diehl wrote:

> "md5sum /dev/cdrom" The problem with that is that it is possible for it
> to fail and the cd still be good or so I am told.

That won't usually work, md5sum will try to read past end of the disc,
generate an error and give you wrong checksum.

You have to read exactly right amount of data, isosize will give the
size of iso9660 filesystem on disc:

dd count=$[`isosize /dev/cdrom`/2048] bs=2048 if=/dev/cdrom | md5sum -

(2048 is the block size on cdrom.)





More information about the fedora-test-list mailing list