Wednesday, January 09, 2008

Checking integrity of cdrom drives

I had this problem for a while, so I wanted to take a look at it... how do i check the integrity of the drive.
I did this... to find that it was quite okay... the same can be done with md5sum but sha1sum is better sometimes

$ sha1sum KNOPPIX_V5.1.1CD-2007-01-04-EN.iso | grep cdc0e9181d9dd2f2fc71aa9c59391001c46afa3e
cdc0e9181d9dd2f2fc71aa9c59391001c46afa3e *KNOPPIX_V5.1.1CD-2007-01-04-EN.iso
but then again, after burning the cd, I wasn't too sure if it had data integrity. So, I had to check if it was working
I tried md5sum on /dev/cdrom but that was taking a lot of time.
Then I saw a description on

The process goes like this:
$ isoinfo -d -i /dev/cdrom
CD-ROM is in ISO 9660 format
System id: LINUX
Volume id: KNOPPIX
Volume set id:
Publisher id: KNOPPER.NET
Data preparer id:
Copyright File id:
Abstract File id:
Bibliographic File id:
Volume set size is: 1
Volume set sequence number is: 1
Logical block size is: 2048
Volume size is: 356532
El Torito VD version 1 found, boot catalog is in sector 763
Joliet with UCS level 3 found
Rock Ridge signatures version 1 found
Eltorito validation header:
Hid 1
Arch 0 (x86)
Key 55 AA
Eltorito defaultboot header:
Bootid 88 (bootable)
Boot media 0 (No Emulation Boot)
Load segment 0
Sys type 0
Nsect 4
Bootoff 312 786
See the things in bold? that's the data we're interested in: logical block size and volume size. So, we just output the data and md5sum that instead of just the /dev/cdrom

$dd if=/dev/cdrom bs=2048 count=356532 conv=notrunc,noerror | md5sum
356532+0 records in
356532+0 records out
730177536 bytes (730 MB) copied, 233.479 seconds, 3.1 MB/s
379e2f9712834c8cef3efa6912f30755 -

$ cat KNOPPIX_V5.1.1CD-2007-01-04-EN.iso.md5 | grep 379e2f9712834c8cef3efa6912f30755
379e2f9712834c8cef3efa6912f30755 *KNOPPIX_V5.1.1CD-2007-01-04-EN.iso
so it works...

another method is to redirect the dd output to the iso and run diff on it.


Adams Kevin said...

I ADAMS KEVIN, a representative of Aiico Insurance plc, we trust and respect for individual differences in day out a loan. We will provide 2% of the loan's interest rate. If you are interested in this business contact us by e-mail ( now transfer their loan documents issued properly. Do you need a loan to set up business or school if you are very welcom to aiico insurance can also contact us by email( we first week can request a balance transfer.

व्यक्तिगत व्यवसायका लागि ऋण चाहिन्छ? तपाईं आफ्नो इमेल संपर्क भने उपरोक्त तुरुन्तै आफ्नो ऋण स्थानान्तरण प्रक्रिया गर्न