LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I use md5 to check CD quality? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-use-md5-to-check-cd-quality-545808/)

jhsu 04-13-2007 12:15 PM

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.

acid_kewpie 04-13-2007 12:34 PM

run "md5sum myfile.iso" and check the output string to the listed one.

Wim Sturkenboom 04-13-2007 01:22 PM

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.

acid_kewpie 04-13-2007 02:22 PM

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"

IBall 04-13-2007 02:30 PM

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

idol007 04-13-2007 03:27 PM

I think most of the popular CD writer programs already have a feature to verify the CD contents after writing.

acid_kewpie 04-13-2007 03:40 PM

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.

jhsu 04-13-2007 07:35 PM

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

IBall 04-13-2007 09:34 PM

You probably need to be root.

--Ian

jhsu 04-14-2007 11:54 AM

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.

acid_kewpie 04-14-2007 12:38 PM

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.

kirkpuppy 04-22-2007 09:00 PM

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.


All times are GMT -5. The time now is 11:17 AM.