how to check integrity of burned image & cmp : /dev/cdrom: Input/outputerror

source : debian-user-digest # 1229,1230.

Use-case : I am trying :

$ cmp /dev/cdrom debian-505-powerpc-netinst.iso
This works on CD-RW, but it fails on CD-R with the following :
cmp: /dev/cdrom: Input/output error

[ A ] "checkiso" script : http://www.debian.org/CD/faq/index.en.html#verify

[ B ]
$ md5sum path-to-your-.iso-file

$ dd /dev/cdrom bs=$blocksize count=$blockcount conv=notrunc,noerror | md5sum 

The variable, $blocksize, $bolkcount, depend of the CD or DVD, to get this info :

$ isoinfo -d -i /dev/cdrom
the result must be the same.

[ C ] The advantage to using cmp is you get a byte by byte, exact match check.

$ dd /dev/cdrom bs=$blocksize count=$blockcount conv=notrunc,noerror | cmp - path-to-your-.iso-file
The above command the stdin from dd with the file.

Note : The issue with using cmp directly on the device has to do with how the device driver handles what would be considered EOF. All that happened in your cmp run was an attempt to read beyond the end of the device. Unless 'cmp' produced a "files differ: byte xxxx, line yyy" type of message, the 'cmp' actually succeeded in properly comparing the two images.
 
 
Creative Commons License
This work by maniac.vardhan is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
 
 

0 comments :: how to check integrity of burned image & cmp : /dev/cdrom: Input/outputerror

Post a Comment