Marek Pawinski wrote:
I picked this up, i don't know if it pertains to the issue:
Bad Md5sums? (maybe not)
Just burned a CD from an ISO image and the md5sum doesn't match? The
CD may be just fine... what you may be experiencing is padding which
alters the md5sum. Before throwing away the CD and cursing, try this:
cmp /dev/cdrom ISO_image
For example, I got a bad md5sum from my 9.2beta1 CD1:
$ dd if=/dev/cdrom | md5sum
1333216+0 records in
1333216+0 records out
e82309091ad6b44a1218dc6f33c3b058 -
It should be:
7a0479dc917d35bd822cecb558c8d432
So, I tried:
$ cmp /dev/cdrom /ISO/Mandrake/MandrakeLinux-9.2beta1-CD1.i586.iso
cmp: EOF on /ISO/Mandrake/MandrakeLinux-9.2beta1-CD1.i586.iso
The EOF on the ISO image means that the CD image is an EXACT copy PLUS
padding. An EOF on /mnt/cdrom would have meant the CD was incomplete.
Just to prove the CD was really OK, I issued this piped string of
commands:
$ dd if=/dev/cdrom | head -c 682575872 | md5sum
1333162+0 records in
1333161+0 records out
7a0479dc917d35bd822cecb558c8d432 -
Got the correct md5sum... :^) BTW, 682575872 is simply the length of
that particular ISO image.
So, more generically, we can use this pipe stream:
dd if=/dev/cdrom | head -c `stat --format=%s ISO_image` | md5sum
i.e.,
$ dd if=/dev/cdrom | head -c `stat --format=%s
/ISO/Mandrake/MandrakeLinux-9.2beta1-CD1.i586.iso` | md5sum
1333162+0 records in
1333161+0 records out
7a0479dc917d35bd822cecb558c8d432 -
For the purists, the size can be passed as an argument to dd like
this (not verified):
dd if=/dev/cdrom bs=`stat --format=%s ISO_image` | md5sum
Marek
Marek,
This is very interesting.
I did not know of the cmp command.
You have to be in the directory of the iso image I take it
when you compare it to the bytes on the disc ?
I'll have a go at this tomorrow.
As you say it's padding that quite often corrupts the md5sums
John
____________________________________________________
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com
____________________________________________________