Manuel Bouyer, 03/23/09 23:58:
On Sat, Mar 21, 2009 at 06:56:02PM +0200, Cem Kayali wrote:Hello!I have iso files and burned cds and need to verify cd content using NetBSD5 OS.Well, i would like to know -most- convenient way to do so ie; 1- sha1 < /dev/cd0d ; sha1 isofile.iso 2- cat /dev/cd0d | sha1 ; sha1 isofile.iso 3- diff -r {mounted.iso.image} {mounted.cdrom} I would do a variant of 3, that is use the original files and not the mounted iso. This way you can check that the image was properly generared.
Thanks for info... That's ideal one, though i do not have access to original files - only iso.
For future references,1 and 2 sometimes fail especially if the burned medium is DVD. I have tested various burned CDs and DVDs and these are two ways to verify CD/DVD content against its iso image:
diff -rq {mounted.iso.image} {mounted.cd} => This forces binary comparison diff -ra {mounted.iso.image} {mounted.cd} => This forces text comparison and isoinfo -d -i {iso.image} => Get block size, which is probably 2048dd ibs=2048 count={KB/2048} if=/dev/cd0d | sha1 => Read number of blocks written which is size of iso divided by block size 2048
Regards, Cem