[lug] Testing CDs and ISO Images

Bear Giles bgiles at coyotesong.com
Mon Jun 10 15:45:56 MDT 2002


> I usually do a:
> 
>    find . -type f | xargs md5sum | sort >/tmp/cmpfile
> 
> on both the source directory and the destination ISO.  If they're
> different, there is a problem...

Better yet, do 'find . -type -f -exec md5sum {} \; >> MD5SUMS' in 
the source image, then after burning the disk run 'md5sum -c MD5SUMS'.

That way, your discs are self-validating and the tests can be run at
any time.

Even if your source image was just a blind dd(1) copy, I believe you
can use mkisofs(1) to merge the MD5SUMs file into the disc image.

This is also a useful way to copy any blasted CD keys onto a CD, or
an image of the floppy used to prove ownership for upgrades.  (Not 
that I'm encouraging anyone to break IP laws, but I insist on exercising
my right to a bona fide archival copy of all original media, and that
includes anything necessary to reinstall the application.)

...

The other thing to watch for is that there are some limitations in the
ISO 9660 file system spec.  If you're archiving a directory with more
than 1024 porn ima... I mean more than 1024 source files, mkisofs(1) will
quietly truncate the directory.  I think there's also a limit of 30 
characters in filenames.  This can lead to nasty surprises - if you're
archiving to CD you really need to wrap the data somehow.

Bear



More information about the LUG mailing list