Imagine, you did the checksum on the ISO and you burned the CD, still
you want to double check the integrity of the files on the CD . . . .

Here is a little script that will do the checksum on your CDs. You do
need the original checksum to compare with the outcome of this script.

Steps

1. Open terminal and type

$ vi checkcd
press "i" ( to put vi in insertmode )

2. Type the following code in vi editor

#!/bin/sh
#checkcd

device=$1

blocksize=`isoinfo -d -i $device | grep "^Logical block size is:" |
cut -d " " -f 5`
if test "$blocksize" = ""; then
     echo catdevice FATAL ERROR: Blank blocksize >&2
     exit
fi

blockcount=`isoinfo -d -i $device | grep "^Volume size is:" | cut -d " " -f 4`
if test "$blockcount" = ""; then
     echo catdevice FATAL ERROR: Blank blockcount >&2
     exit
fi

command="dd if=$device bs=$blocksize count=$blockcount conv=notrunc,noerror"
echo "$command" >&2
$command

3. Save the file with suitable name, here for example save it as "chechcd".

4. Give the read and execute permission to that file

$ sudo chmod 755 checkcd

5. Execute the following command to check CD

$ sudo ./checkcd /dev/cdrom | md5sum

--
விஷ்ணுராஜ். க

Kanchi Linux User Group Rocks !

http://kanchilug.wordpress.com

My Experiments In Linux are here

http://gnutuxfollower.wordpress.com
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to