You are not logged in.
Hi,
I'm trying to verify a cd with md5sum, but it doesn't work. I don't know why, but after many tries it seems to resists...
The steps that i follow are:
# Create .iso of files to burn:
mkisofs -pad -J -r -o imagen.iso /directory/to/burn/
# Create md5 checksum:
md5sum imagen.iso > imagen.iso.md5
# Burn iso image to CD:
cdrecord -v -eject dev=/dev/scd0 -data imagen.iso
# With the burned cd and isoinfo, i get volume size and block size:
volume size = isoinfo -d -i /dev/scd0 | grep "^Volume size is:" | cut -d " " -f 4
block size = isoinfo -d -i /dev/scd0 | grep "^Logical block size is:" | cut -d " " -f 5
# Create iso image from CD:
dd if=/dev/scd0 of=imagen.iso bs=(block size) co=(volume size)
# Check md5sum:
md5sum -c imagen.iso.md5
Someone knows what I'm doing wrong?
Last edited by icrave (2008-05-06 10:09:21)
Offline
When getting the md5sum of a burned CD I have found that I have to point md5sum at the device entry, e.g
md5sum /dev/cdrom
I don't know if that is the 'correct' method but its the only way I found of getting an md5sum from a CD.
Offline
Your command to generate md5 directly from /dev/cdrom doesn't work (input/output error).
Now, I'm trying another method to create image from cd:
dd if=/dev/cdrom | head -c 188160000 | md5sum
Where 188160000 is the exact size on bytes of image (used stat to get it)... but off course, It doesn't work .
Offline
hmm, /dev/cdrom is actually a link to /dev/sr0 on my system, try to find out the proper device that your cdrom maps to and use that instead
Offline
I think that the problem isn't /dev/cdrom, because i can do "cat /dev/cdrom | md5sum" (yes, the md5sum are incorrect).
Using the original dev (in my case /dev/sr0, too), i have the same error.
Offline
but are you sure that the cdrom md5sum should be equal to the .iso one?
because to close the session the cd recorder writes some (I'm not a technician so I don't know which) bits...
I think it is normal the md5sum results incorrect, am I wrong?
Offline
Just for this, I use head or isoinfo to read only the exact number of bytes with dd.
Offline
ah.. thanks for your explanation.. ^^"
Offline
icrave, What speed did you burn the disc at? I've just done a test on an old sidux disc I have and I get the same results from the CD as the iso on my hard disk
$ md5sum /data/media/Downloads/distro_downloads/sidux64-2007-04-200711210257-eros-kde-full.iso
1ef35f3aad9682e85ebb5f706b11a856 /data/media/Downloads/distro_downloads/sidux64-2007-04-200711210257-eros-kde-full.iso
$ md5sum /dev/cdrom
1ef35f3aad9682e85ebb5f706b11a856 /dev/cdrom
If you are still seeing differences then it might be that you actually do have a bad burn.
Offline
To verify if I have a bad burn, I check md5sum of files separately and the result is... checksums corrects.
So, I'm not sure where is the problem.
I will keep trying...
EDIT:
AHA! Finally I got it. The problem seems to be in mkisofs and it's resolved adding -pad to the make-image-to-burn command. Before, I only added -pad to make-image-to-check command
EDIT2:
The problem maybe was in use -follow-links in mkisofs, too.
EDIT3:
Forget -pad and -follow-links... the error was more simple... I create image(1) and i burn it. I create image(2) and I check burned cd with it. Checksums of image(1) and image(2) are not the same...
Last edited by icrave (2008-05-06 10:30:33)
Offline