[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Verify the integrity of Debian CDs



> Maybe the MD5SUMS files should include the length of each image? Also, as
> the OP's request shows, maybe they should be kept for a couple of months.

All cds include the size of the ISO themselves, I made this script which I
call cdread to read a cd, it is not perfect, but works, and does only depend
on isoinfo that comes in the mkisofs package:

#!/bin/sh
if [ $# -ne 1 ]
then
   echo $0 source_device >&2
else
   sectorsize=`isoinfo -d -i $1 |sed -n 's/Logical block size is: \(.*\)/\1/p'`
   sectors=`isoinfo -d -i $1 |sed -n 's/Volume size is: \(.*\)/\1/p'`
   bytes=$(($sectorsize*$sectors))
   echo CD size: $bytes bytes $sectors $sectorsize bytes sectors >&2
   echo Reading... >&2
   dd if=$1 bs=$sectorsize count=$sectors
fi

You only need to call cdread /dev/cdrom | md5sum and that's it.

Hope this helps.

Regards...
-- 
Manty/BestiaTester -> http://manty.net



Reply to: