[wplug] Mysteries of md5sum

Bob Supansic rsupansic at libcom.com
Mon Aug 1 19:20:52 EDT 2005


I have been copying CDs with cdrecord for several years
now and never gave much attention to verifying the copies.
The copies seemed to work, aside from bothersome I/O
errors sometimes encountered the end of a copy.

Recently I tried to verify some copies against the
original using md5sum and found I had opened a can
of worms.  The MD5 sums varied from one device
to the next and even varied on successive runs of
the same device.

An Internet search led me to Steve Litt's Coasterless
CD Burning web site 
(www.troubleshooters.com/linux/coasterless.htm)
where i found the following script (simplified here
from the original):

#######################################################

#! /bin/sh

DEVICE=$1
BLOCKSIZE=`isoinfo -d -i $DEVICE | /
      grep "^Logical block size is:" | cut -d " " -f 5`
BLOCKCOUNT=`isoinfo -d -i $DEVICE | /
      grep "^Volume size is:" | cut -d " " -f 4`
dd if=$DEVICE bs=$BLOCKSIZE count=$BLOCKCOUNT /
      conv=notrunc,noerror

#######################################################

This script was invoked from the command line as follows:

./RawRead /dev/xxxxx | md5sum

and generated the following outputs from the same
source CD:

1. b0ab8deba158ff39343e39440aba6f28  -
2. d41d8cd98f00b204e9800998ecf8427e  -
3. d41d8cd98f00b204e9800998ecf8427e  -
4. 68027e2983ae801bf5688fa7a5af6bd3  -
5. 8613a1d2cb7073607af4c751dc611bbc  -
6. 8613a1d2cb7073607af4c751dc611bbc  -

1. This sum was obtained from /dev/scd0, the SCSI CD-RW
    device It generated successive I/O errors at dd records
    9417-9420.
2. This sum was obtained from /dev/hdc, the IDE CD-RW
    device.  It read no records.
3. This sum was obtained from /dev/cdrom, the (link)
    IDE CD-RW device.  It read no records.
4. This sum was obtained from /dev/hdd, the IDE CD-ROM
    device.  It generated no I/O errors.
5. This sum was obtained from /dev/cdrom2, the (link) IDE
    CD-ROM device.  It generated no I/O errors.
6. This sum was obtained from a second run from /dev/hdd,
    the IDE CD-ROM device.  It generated no I/O errors.

Same CD, four different sums, two of which were from the 
same device.  What am I to believe?


More information about the wplug mailing list