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
Hi Marek,
I've been giving your CL examples a try today,
been a bit busy lately,
anyway this is how it worked for me.
cmp /dev/scd0 /mnt/Win-g/disc3.iso
cmp: EOF on /mnt/Win-g/disc3.iso
Now this result surprized me.
I used cdrecord to create the installation CD
I don't remember using any command that
would of added padding to the burnt disc.
I use -dao almost without exception, nothing
else that adds Zero's etc between data tracks.
But still this says I did.
I just wondered why ?
and what would it return if an exact copy ?
then,
dd if=/dev/scd0 | head -c 669016064 | md5sum
5ad870e696953f4bbd0a91936873890e -
1306673+0 records in
1306672+0 records out
which agrees with,
5ad870e696953f4bbd0a91936873890e disc3.iso
the correct md5sum
I note you can pass the iso file size direct to head CL
OK, so everything looks fine so far.
Now for the problem,
dd if=/dev/scd0 bs=`stat --format=%s /mnt/Win-g/disc3.iso` | md5sum
1+1 records in
1+1 records out
526cfebe2c2da7c6e464bed37969e4c9 -
OK, I did something obvious wrong.
but what ?
By the way, NICE !
I like it.
John
____________________________________________________
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com
____________________________________________________