I have an ISO file and a DVD burned from that ISO file. Is there a way I can validate that the DVD contains the same as the ISO file and that nothing is wrong with the DVD?

I have the tools available on the System Rescue CD.

link|improve this question

68% accept rate
it suprises me that a rescue cd doesn't have an md5sum or shaXsum utility. – aking1012 Dec 9 '10 at 11:28
@aking1012: It does! Several of them actually. I just don't know how to use them to compare an ISO with a DVD :p – Svish Dec 9 '10 at 11:56
okay I just didn't see it on the included utilities list in the link, perhaps I overlooked it...in that case harrymc should get the check unless you specifically request a shasum – aking1012 Dec 9 '10 at 13:21
What disc burning software do you use? Most of them have a 'verify burn' option that compares the ISO/Disc checksums. – wez Dec 9 '10 at 14:41
@wez, That I know. Thing is this is a DVD i burned a while ago and I think it might have gotten buggy or something. I was able to install my OS from it back then, but now it is giving me lots of trouble. Could be my hardware going bad too, but I'd just like to rule out a faulty install disk :) – Svish Dec 9 '10 at 23:03
feedback

2 Answers

up vote 2 down vote accepted

The following command compares the contents of two binary files, and print the offset of the first differing byte. Replace /dev/dvd by the path to the DVD device (/dev/cdrom, /dev/scd0, /dev/hdc, …).

cmp /dev/dvd /path/to/foo.iso

I'm not sure if all DVDs contain an indication of where the data ends (I think some CDs don't); you can limit the comparison to the size of the image file.

ls -l /path/to/foo.iso  # copy the file size, e.g. 123456789 bytes
cmp -l 123456789 /dev/dvd /path/to/foo.iso

You can also compute a checksum for the image file, compute a checksum for the disk, and check that they match. This is slower for a single comparison, but faster if you need to compare many disks against one image, and allows the image and the disk to be on different computers. To detect accidental corruption, md5sum is perfectly suitable.

md5sum /path/to/foo.iso
md5sum /dev/dvd     # if the size can be determined; otherwise:
head -c 123456789 | md5sum
link|improve this answer
feedback

I assume from your post that you are on Linux.

See this article : Verify a burned CD/DVD image on Linux.

The main idea is simple :

cat iso-file.iso | md5sum
dd if=/dev/hdc | md5sum
link|improve this answer
1  
Useless use of cat and useless use of dd. Simpler (and indistinguishable speedwise): <iso-file.iso md5sum, </dev/hdc md5sum. But suboptimal for a one-shot comparison. – Gilles Dec 9 '10 at 22:38
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.