Thursday, January 3, 2008

Verifying A CD Burned From An ISO Image

After you've burned an ISO image to CD (instructions on how to this can be found in a previous blog entry), you may want to verify that the data was written to CD correctly.

First you need to find out how many 2048-sized blocks the ISO file takes up. Simply divide the size of the file by 2048. For example, for the Debian Etch DVD disc 1, the resulting number is 2294149.

Then, you find the md5sum of the CD or DVD inside your drive (in the following example, /dev/dvd):

$ dd if=/dev/dvd bs=2048 count=2294149 | md5sum

If the resulting md5sum matches the one of the original ISO file, the write was successful.

A more detailed guide on verifying burned CD data can be found here.

No comments: