Jaunty Jackalope (RESOLVED)

Rashkae ubuntu at tigershaunt.com
Tue Nov 3 03:49:17 UTC 2009


NoOp wrote:
> On 11/02/2009 07:07 PM, NoOp wrote:
>> On 11/02/2009 06:50 PM, Karl Auer wrote:
>>> On Mon, 2009-11-02 at 16:02 -0800, NoOp wrote:
>>>>> No. The md5sum will change when you transfer the iso.
>>> Why? The .iso is just a file, shouldn't it always have the same md5sum?
>>> In fact, if it doesn't, what is the point of the md5sum?
>>>
>>> Not contradicting you, just surprised and curious.
>>>
>>> Regards, K.
>>>
>>>
>> Can't find the exact thread just now, but I do recall a thread where
>> this was discussed & made a point of it in this thread back in March:
>> https://lists.ubuntu.com/archives/ubuntu-users/2009-March/176290.html
> 
> Here is a recent real life example. I downloaded the most recent karmic
> liveCD so that I could test an inplace reinstall on karmic for Emil
> Payne (see the "Dist Upgrade" thread. Note to Emil - works with Karmic
> live CD BTW so there is hope).
> 
> I now check the md5sum of the iso:
> 
> $ md5sum ubuntu-9.10-desktop-i386.iso
> 8790491bfa9d00f283ed9dd2d77b3906  ubuntu-9.10-desktop-i386.iso
> 
> and see that it matches:
> http://releases.ubuntu.com/karmic/MD5SUMS
> 8790491bfa9d00f283ed9dd2d77b3906 *ubuntu-9.10-desktop-i386.iso
> 
> Now I burn the iso to a cd & check the md5sum of that cd:
> $ md5sum /dev/cdrom
> 8790491bfa9d00f283ed9dd2d77b3906  /dev/cdrom
> 
> And I've just now proven myself wrong :-( The md5sum of the CD matches
> that of the iso. So apologies to the list, and to John Graddy. I'll
> still see if I can find the thread tomorrow, but mea culpa & apologies
> to all.
> 
>

You're comparing the md5sum from a file to that of a CD.  They will
sometimes not match because the lead out from writing to a cd appends
some nulls.  It seems to depend on type of drive and exact command used
to burn cd, but either way, you cannot reliably compare md5sum of an iso
with the cdrom dev device.  Rather, use isoinfo command to get the
exactly number of bytes, and use dd to pipe that from the cd to md5sum

Example:   isodinfo -d -i /dev/cdrom will in the output, include a
'Volume size' number.  For example, say it's 1000

dd if=/dev/dvd bs=2048 count=1000 | md5sum -

That md5sum should always match the iso file that was used to burn the cd.

None of this matters in John's case, however, since all he did was copy
the file from one hard drive to another, in which case, the md5sum
should absofuckinglutely not change.  Either the thumb drive is
defective, or one the pc's has bad ram, or is corrupting data in the IO
path.






More information about the ubuntu-users mailing list