Verifying MD5 checksums and media

  • 3926996
  • 31-Jul-2006
  • 27-Apr-2012

Environment


Novell SUSE Linux Enterprise Desktop 10
Microsoft Windows 2000
Microsoft Windows XP Professional

Situation

It is often necessary to verify that the downloaded ISO image is valid, and after burning the image to a CD-ROM or DVD-ROM that the process was successful. This document describes various methods to check that the CD-ROM or media is good.

In this document, the term "MD5 checksum" will be used. The"MD5 checksum" has also been referred to as an "MD5 hash", and is actually the result of feeding data into an MD5 encryption tool. The result is the "hash" representation of the data.

Resolution

Checking the downloaded ISO image :

Using Linux :

This is a simple process. First, identify the location of the ISO image just downloaded (and the name of that ISO image). Next, run :
md5sum name_of_image.iso
This will print out the MD5 checksum of the image. Compare this with the MD5 checksum listed where the media was obtained. These checksums must match in order for the ISO image to be valid. If they do not match, repeat the download process until you get a matching ISO image. If one cannot be obtained, and the provider has verified that the source file is valid, then there may be a problem with the download process or connectivity through the internet especially when downloading large DVD images.

Using Microsoft Windows :

If a checksum generator has already been obtained, use this to verify that the MD5 checksum is valid when comparing to the checksum listed where the image was obtained.

If a checksum tool has not been obtained, they are available by searching for "md5 checksum" using a favorite Internet search engine. Each may be slightly different in how they are used. It is advised to take a moment and become familiar with any new tools to be used.

For example, you can use the GUI tool from http://www.md5summer.org/ by choosing the folder to which the image was downloaded. This will actually generate the MD5 checksums for each file. Many command line based tools are available, as well.

Checking the burnt media :

Using Linux :

With SUSE Linux, place the media into the drive. SUSE will auto-mount the CD-ROM - something that could take it a few seconds to spin up the media device and read the table of contents. Next, run:
mount
with no options. This will print a table of the currently mounted media. Look for the existence of anything mounted in /media, as in :
/dev/hda2 on / type reiserfs (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/hda3 on /home type reiserfs (rw,acl,user_xattr,usrquota,grpquota)
usbfs on /proc/bus/usb type usbfs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
/dev/hdc on /media/SLED100_001 type subfs (ro,nosuid,nodev,fs=cdfss,procuid)
This will help to identify the CD-ROM device. Once the CD-ROM device has been identified, run the following command (of course, replacing /dev/hdc with the device of your CD-ROM device) :
dd if=/dev/hdc bs=2k count=$(($(isosize /dev/hdc)/2048)) | md5sum
This will print the media contents using a block size of 2048 (2 Kb), and pipe it to the md5sum command. The command will print the MD5 checksum of the media contents. Compare this to the MD5 checksum that was available from where the ISO image was downloaded. If the checksums are exact, the media is valid. If the checksums do not match, verify the ISO image checksum (using the above processes). Once a good ISO image is available, you will need to repeat the CD-ROM burning process until you get a verified media.

Using Microsoft Windows :

Unfortunately, most of the Windows versions will not verify a media that has been burnt. The few that do are not free. A simple method to check (does not verify the MD5 checksum, or guarantee that the media has been burned properly) is to copy the entire contents from the new CD-ROM onto a local hard drive. If there are problems reading any of the files, verify the ISO image check sum, and then repeat the burning process.

Additional Information

Some web browsers have trouble with files larger than 2 Gb. This is not an issue with web servers or web sites, but an issue with various web browsers. Downloading ISO images that are larger than 2 Gb can cause inherint problems with the image due to the browser problems. Download agents that are known to have problems are :
wget (Version 1.9 or less)
Internet Explorer (any version)
Microsoft's command line ftp client
Mozilla, Firefox, Anything based on Gecko
Agents that are known to work :
wget (Version 1.10 or greater)
gftp
Also note that some Operating Systems will not work with large ISO images. For example, anything based FAT16 has a 2 Gb limit on file size. These systems include MS-DOS, Windows 3.x, Windows 95, Windows 98, and some Windows 2000 systems. Check your Operating System for file size limitations.

For more generalized information reguarding CD's and ISO's, see the document at https://support.novell.com/techcenter/sdb/en/2005/07/rdassen_iso_images.html