Hi.
While thinking about making some free CDs to give out to people, it occurred to me that I'm suggesting people but CDRs of dubious provenance into their PCs and boot from them, which is probably not a good thing to be suggesting.
I was wondering if there was any way people could verify their CD's md5sum against the 'official' one from the distro site. The two hurdles that immediately present themselves are:
1) I don't know how to get an md5sum from a CD once it's been burnt, or whether it would generate the same md5sum as the iso anyway
and
2) The target users won't have a Gnu/Linux system with the relevant utilities on.
Any suggestions?
Joe
PS my apologies for nasty pronoun disagreement in second para - feel free to suggest more grammatical rewordings
On 2004-05-22 15:06:15 +0100 Joe Button alug@joebutton.co.uk wrote:
to me that I'm suggesting people but CDRs of dubious provenance into their PCs and boot from them, which is probably not a good thing to be suggesting.
The paranoid can unplug sensitive devices, or disable them in BIOS.
- I don't know how to get an md5sum from a CD once it's been burnt,
or whether it would generate the same md5sum as the iso anyway and 2) The target users won't have a Gnu/Linux system with the relevant utilities on.
So, unless you can find ways to do this with other common operating systems too, you probably lose. They won't believe programs included on the CD, will they? ;-)
On Sat, May 22, 2004 at 03:06:15PM +0100, Joe Button wrote:
While thinking about making some free CDs to give out to people, it occurred to me that I'm suggesting people but CDRs of dubious provenance into their PCs and boot from them, which is probably not a good thing to be suggesting.
If they are windows users, then they have probably already done this more than once in the past.....
Adam
I was wondering if there was any way people could verify their CD's md5sum against the 'official' one from the distro site.
Hi there
I had this very same problem the other day. I found a couple of ways round it. The simplest solution is if you use something like k3b. K3b has an option to verify the md5sum of the written data against that of the image you are trying to burn. I'm using version 0.11.6. From this it is obvious that there is a way of doing md5sums on cds, you could look in the k3b source to find out how. I have no idea.
I have a second method which will compare an iso with the contents of the cd it produces. I devised this method to find out which files differ from the original when I found that my cd burner is somewhat dubious in its abilities. So it is bit overkill, but it will find out if there is a difference in any single file. Basically mount the iso like this:
mount -o loop -t iso9660 <iso file name> <some_directory_for_iso>
and mount your cd Then write a script that will do an md5sum on every file on each directory kinda like this:
#!/bin/bash
current=`pwd` cd $1 for i in `find .`; do [ -f $i ] && [ -s $i ] && md5sum $i done cd $current
save it as say getmd5 and make it executable.
chmod u+x getmd5
the script will get the md5sum of every individual file and print it to standard output. So now you can do something like
#<path to getmd5>/getmd5 <some_directory_for_iso> > md5iso #<path to getmd5>/getmd5 <your_cd_mount_directory> > md5cd
If everything was ok both command should produce the same output so
#diff md5iso md5cd
will verify that and show the differences if there are any. I have to stress that is a very over the top way of doing things it also takes a while to run on big cds but it's nice if you want to pinpoint the failures and at it should solve your problem.
Cheers
Charles
On Sat, 2004-05-22 at 15:06, Joe Button wrote:
Hi.
While thinking about making some free CDs to give out to people, it occurred to me that I'm suggesting people but CDRs of dubious provenance into their PCs and boot from them, which is probably not a good thing to be suggesting.
I was wondering if there was any way people could verify their CD's md5sum against the 'official' one from the distro site. The two hurdles that immediately present themselves are:
- I don't know how to get an md5sum from a CD once it's been burnt, or
whether it would generate the same md5sum as the iso anyway
Under a sane os, You can generate an md5 of the CD as a whole with md5sum /dev/<cdrom> and this should be the same as your iso.
and
- The target users won't have a Gnu/Linux system with the relevant utilities
on.
md5summer.org is probably the most userfriendly for those who are not used to md5. I can't remember if you can do a md5sum of "e:" under windows (where e:\ is the cdrom and md5sum of e:\ == md5sum of iso).
If it does produce the correct md5's then it's easy... that will match the one the distributor posts on their website. The md5sum of the ISO is of the raw filesystem on the cd rather than all the individual files.