LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-13-2007, 12:15 PM   #1
jhsu
Member
 
Registered: Mar 2007
Posts: 35

Rep: Reputation: 15
How do I use md5 to check CD quality?


I understand that those md5sum files on the download sites are there so you can check the quality of a file you downloaded.

Exactly how do I check the md5sum of the ISO on my computer? And how do I check the md5sum of a CD? I HATE having something not work right, especially when I have no idea why. I want to be able to eliminate poor CD quality is a culprit.
 
Old 04-13-2007, 12:34 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
run "md5sum myfile.iso" and check the output string to the listed one.
 
Old 04-13-2007, 01:22 PM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
For the full CD, I would create an iso again from it and calculate the MD5 over that new iso. Should be the same as the original.
 
Old 04-13-2007, 02:22 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
well you wouldn't need to make a new iso. an iso is a byte identical image of a cd, so you can either dd the data directly from the cd into md5sum "dd if=/dev/hdc | md5sum" or presumably even just run "md5sum /dev/hdc"
 
Old 04-13-2007, 02:30 PM   #5
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
Quote:
Originally Posted by acid_kewpie
well you wouldn't need to make a new iso. an iso is a byte identical image of a cd, so you can either dd the data directly from the cd into md5sum "dd if=/dev/hdc | md5sum" or presumably even just run "md5sum /dev/hdc"
I always check distro cds and backups with just "md5sum /deb/hdc".

I have been told that this is not necessarily a good idea, I think due to some burners adding in extra checksum data. I have never had any problems though, but if anyone knows anything about this, please let us know.

--Ian
 
Old 04-13-2007, 03:27 PM   #6
idol007
LQ Newbie
 
Registered: Sep 2006
Posts: 9

Rep: Reputation: 0
I think most of the popular CD writer programs already have a feature to verify the CD contents after writing.
 
Old 04-13-2007, 03:40 PM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
yes but this is to verify the official published images, not the fact that the dodgy file you downloaded from a dubious site, or to a corrupted drive is just as dodgy or corrupted after the burn.
 
Old 04-13-2007, 07:35 PM   #8
jhsu
Member
 
Registered: Mar 2007
Posts: 35

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by IBall
I always check distro cds and backups with just "md5sum /deb/hdc".

I have been told that this is not necessarily a good idea, I think due to some burners adding in extra checksum data. I have never had any problems though, but if anyone knows anything about this, please let us know.

--Ian
I tried, but I got the error message:
md5sum: hdc: Input/output error
 
Old 04-13-2007, 09:34 PM   #9
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
You probably need to be root.

--Ian
 
Old 04-14-2007, 11:54 AM   #10
jhsu
Member
 
Registered: Mar 2007
Posts: 35

Original Poster
Rep: Reputation: 15
Why are my md5sums SO different?

The md5sum for Puppy Linux 2.14 should be:
5012d1fd6d9bb5907ea358ecfd865153

I have Puppy Linux 2.14 booted up from CD and running in RAM. Running md5sum through dev gives me:
sh-3.00# dd if=dev/hdc | md5sum
dd: reading `dev/hdc': Input/output error
177120+0 records in
177120+0 records out
794b1d7c5140f8483ec1df8116274248 -

Running md5sum through mnt gives me:
sh-3.00# dd if=mnt/hdc | md5sum
dd: reading `mnt/hdc': Is a directory
0+0 records in
0+0 records out
d41d8cd98f00b204e9800998ecf8427e -

So why do NONE of these md5sums match? By the way, it doesn't matter whether the CD-ROM is mounted or unmounted.

Is my CD THAT messed up? I burned the CD at 1x speed. If my Puppy Linux CD is that messed up, that would explain why it doesn't work on my laptop, why it's so slow on my other desktop PC, and why I was unable to install it on this PC (even though I successfully did this a few weeks ago) even though it seems to work fine as a live CD on this desktop PC.

Last edited by jhsu; 04-14-2007 at 12:01 PM.
 
Old 04-14-2007, 12:38 PM   #11
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
well just look at the output, first time it had an io error, second time it didn't even read any data to validate... note that you should probably consider md5 sums are "random" it's not like they can be close enough... a single 1 where there should be a 0 and it'll be totally different.
 
Old 04-22-2007, 09:00 PM   #12
kirkpuppy
Member
 
Registered: Jun 2006
Posts: 36

Rep: Reputation: 15
Try this:


dd if=/dev/hdc | head -c `stat --format=%s myfile.iso` | md5sum | cut -f 1 -d



Where /dev/hdc is you CD and myfile.iso is the file you burned to the CD.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Frequent CD Integrity Check Errors (MD5)? a49002 Linux - Software 3 03-04-2007 10:03 PM
How to check the MD5 sum Gins Linux - General 12 05-21-2006 11:32 AM
Slackware md5 check Rojon Slackware 4 11-15-2005 01:18 PM
FC4 ISOs failed MD5 check henny Fedora 5 08-17-2005 08:00 AM
Auto MD5 check program APB_4 Linux - Software 15 02-28-2005 03:14 PM


All times are GMT -5. The time now is 07:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration