33

I've just downloaded a CD image of Ubuntu. I know the installer has a check CD option, but how can I check that the image is good before burning it to CD?

1
  • One plus that I would like to add: If the ISO file you have downloaded fails, you may not need to download the whole file again. You can use zsync. It checks the file's checksum in "parts" and downloads only the sections that have differences. Check: help.ubuntu.com/community/ZsyncCdImage Aug 28, 2012 at 11:19

5 Answers 5

33

First look up the hash of the ISO you download here:

(or in general find your Ubuntu release here)

Then check the hash by following this video or these instructions:

After checking the hash it's safe to burn the image to CD/DVD.

7
  • 4
    it's so dumb that the checksums are hosted on a page that's accessible only through plain http (no https) Oct 21, 2015 at 6:17
  • I'm assuming that the hashes for 14.04 is just as valid for 14.04.3 as it is for 14.04.4? I'm trying to install 14.04.4 and would just like to know if those are the correct hashes. Mar 18, 2016 at 22:50
  • Can someone explain to me why you need to do this? Shouldn't it be trusted coming from the official website? Jan 3, 2017 at 5:23
  • @KolobCanyon From here: "While we hope you can usually trust your Ubuntu download, it is definitely reassuring to be able to verify that the image you have downloaded is not corrupted in some way, and also that it is an authentic image that hasn't been tampered with."
    – pomsky
    Jan 18, 2019 at 8:10
  • @pomsky But if they hosted the images from an HTTPS webpage, there would be no risk of man in the middle tampering attacks. That's what gets me about it Jan 18, 2019 at 18:49
6

Linux..

Ubuntu comes with a program called md5sum that you can use to check the integrity of a downloaded ISO file.

Manual method..

Generate a hash of your ISO file like this:

md5sum /path/to/ubuntuISO.iso  

This will print out the MD5 hash of your ISO. Now open up the Ubuntu Hashes wiki page which lists the MD5 hashes of all the Ubuntu ISOs and compare the hash you got from md5sum with the hash the wiki page says is correct for that ISO. If the hashes match you should have an uncorrupted file.

Automatic method..

A more automatic method would be to use the MD5SUMS.txt file (which you can download from your distributions download page at releases.ubuntu.com). Make sure you save the file in the same directory has your ISO file.

Now run:

md5sum -c MD5SUMS.txt  

You will receive an error for every ISO you haven't downloaded. That's OK. Most likely you will only have one ISO to check. Here is some sample output:

md5sum: ubuntu-8.10-alternate-amd64.iso: No such file or directory
ubuntu-8.10-alternate-amd64.iso: FAILED open or read
md5sum: ubuntu-8.10-alternate-i386.iso: No such file or directory
ubuntu-8.10-alternate-i386.iso: FAILED open or read
md5sum: ubuntu-8.10-desktop-amd64.iso: No such file or directory
ubuntu-8.10-desktop-amd64.iso: FAILED open or read
ubuntu-8.10-desktop-i386.iso: OK
md5sum: ubuntu-8.10-netbook-remix-i386.img: No such file or directory
ubuntu-8.10-netbook-remix-i386.img: FAILED open or read
md5sum: ubuntu-8.10-server-amd64.iso: No such file or directory
ubuntu-8.10-server-amd64.iso: FAILED open or read
md5sum: ubuntu-9.04-server-i386.iso: No such file or directory
ubuntu-8.10-server-i386.iso: FAILED open or read
md5sum: wubi.exe: No such file or directory
wubi.exe: FAILED open or read
md5sum: WARNING: 7 of 8 listed files could not be read

In this case we were only testing the 8.10 i386 desktop ISO, so we can ignore all the other warnings.

This line here:

ubuntu-8.10-desktop-i386.iso: OK  

Says that our ISO hash matches the correct one, meaning we have a clean file.

Windows..

gui..

You can use winMD5sum in Windows to check file hashes.

Open Windows Explorer and locate your CD image. Right click on it and select "Send to.." then click "winMD5sum".

enter image description here

WinMD5sum will automatically calculate the hash and display it.

enter image description here

Paste the hash for your release (which you got from Ubuntu Hashes) into the "Compare" box and click "Compare". A popup dialog should confirm that the hashes match.

enter image description here

cygwin..

If you have cygwin installed you can use md5sum as if you were in Ubuntu. Since I've already covered md5sum in the Linux section above, I'll just give a quick recap here.

md5sum /path/to/ubuntuImage  

Will print the MD5 hash of the image for you.

Source: How To MD5SUM - Ubuntu Wiki

1
  • Notice that in your last image, you forgot to make your username unreadable ... Jul 16, 2020 at 7:38
4

MD5SUMs, SHA1SUMs and SHA256SUMs (all checksums) for all CD variants of the current release (Precise: Desktop, Server and Alternate) are also available directly at http://releases.ubuntu.com/precise:

enter image description here

2

You may download the ubuntu from www.ubuntu.com website. and Checksums are available at:

To generate checksums for you ubuntu iso, run md5sum [ubuntu-iso-name.iso] and match the resulting checksum with the one available at the website (the second link).

2

On OS X, the md5 command is installed by default. It can be invoked as such from the Terminal:

$ md5 /path/to/myFile
MD5 (/path/to/myFile) = b046a6bd326bb705349162abad3dce65

Compare the hash you got from the .iso file with the appropriate hash from Ubuntu Hashes.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .