Update: Using Toad’s very useful comment this post now uses a better method. Thanks Toad!
As noted on the Xubuntu website, there is a most urgent need for testers of Xubuntu’s next release, 7.10, dubbed Gutsy Gibbon. Now, obviously you are eager to help out, so you download Xubuntu’s latest ISO image in order to burn it onto a CD. However, you realize that, when you report a bug in Launchpad, the error might just be caused by an incorrect download. How are you to know that your download completed successfully?
That’s where MD5 comes in. MD5 is an algorithm to convert input to a 32-character text string. When provided the same input, it will always return the same output. What’s more, it can even take a file as argument, including your ISO image!
You get it: if the MD5 sum (the output) of the image you downloaded is the same as the sum of the image on the server, your image is the same as the image on the server, and you know your download was not corrupted :)
So how do you get Xubuntu to calculate the MD5 sum of your ISO image? It’s simple, really. First, of course, you need the image itself, so go and download that, save it in a folder of your choice. You also need the
MD5SUMS file listed on the same page, so click the MD5SUMS link.
You will see a text file that will look something like this:
As you can guess, this file lists the MD5 sums that are associated with the files listed on the server. Save the file (in Firefox: File->Save Page As) into the same folder you downloaded the ISO image to.
When the download is complete, open Thunar (Applications->Accessories->Thunar File Manager) and browse to the folder you downloaded the image to. Right-click the part of Thunar where the contents of the folder is displayed and select “Open Terminal Here” (yes, you have to work in a terminal window, but it’s not scary or anything). A terminal window opens, in which you have to enter the
md5sum command, with the
-c argument and instruct it to use the
MD5SUMS file. In short, enter this:
md5sum -c MD5SUMS
This will look for each file listed in the MD5SUMS file and, if it is present, calculate the MD5 sum of that file and compare it with the one listed in the file.
The output should be similar to this:
md5sum: xubuntu-7.10-alternate-amd64.iso: No such file or directory
xubuntu-7.10-alternate-amd64.iso: FAILED open or read
md5sum: xubuntu-7.10-alternate-i386.iso: No such file or directory
xubuntu-7.10-alternate-i386.iso: FAILED open or read
md5sum: xubuntu-7.10-desktop-amd64.iso: No such file or directory
xubuntu-7.10-desktop-amd64.iso: FAILED open or read
md5sum: WARNING: 3 of 4 listed files could not be read
As you can see, it encounters a few errors about files not found, because, well, it can’t find some files… There are four files listed in the MD5SUMS file, but I only wanted to check the MD5 sum of one:
xubuntu-7.10-desktop-i386.iso in my case. And look what it says:
My MD5 sum is correct!
However, the image might still get corrupted when burning it onto a CD! Luckily, Xubuntu can check the MD5 sum when you boot the CD, by choosing
Check CD for defects in the menu.
It will then “check the integrity” of the CD.
Once it has finished, it will notify you whether errors were found.
If no errors were found both in the downloaded image and burned CD, then you know that any errors encountered are not caused by a corrupt download or an error in burning the CD. Obviously, this means it is a bug and should be reported in Launchpad ;)
(And by the way, thanks for testing ;) )