On Fri, 2008-10-17 at 10:47 +0200, BALLABIO GERARDO wrote:
> Hi all,
> I'd like to ask for suggestions on how to check a cd-rom (or dvd-rom) against 
> the original iso image to verify that it has been burned correctly.
> 
> I tried a couple of methods, but I am not sure that they work.
> 
> One was to mount the iso via the loop device and compare the contents with 
> "diff -qr". This can tell me that the files' contents are equal, but with 
> bootable cd's, I'm not sure that it guarantees that the boot sector is 
> recreated correctly. (Actually, this started from a real life experience 
> where I burned a live-cd and it didn't boot.)
> 
> The other was to copy back the cd-rom to disk with "dd if=/dev/hdb 
> of=cdrom.iso". I assumed that by doing this, I would obtain an iso image 
> identical to the original one; but to my surprise, I discovered that it was 
> shorter by several kilobytes (exactly 156 512-bytes blocks, or 78 KiB). I 
> verified that the two images are actually equal except for the missing bytes, 
> and that those are all zeros. Is it always so? Can I assume that if I copy 
> back a cd-rom with dd and then append 78 KiB of zeros, I'll always recover 
> the original iso image? Or did I make some error and dd will, in fact, give 
> me the untruncated iso if I do it the right way?
> 
> Thank you.
> 
> Gerardo
> 
> 

I'm a bit late to the discussion, but I did not see this as a suggested
method for checking a CD:

  dd if=/dev/cdrom ibs=10x1024k | cmp - image.iso

Specifying the block size will improve the read performance.  Since
output is to a pipe, the block size only needs setting for input.

One way or the other, you need to read the cd disk.  Doing it this way,
if one or the other image is shorter for some reason, cmp will report
'EOF on ...', or if the same length, simply exit, indicating in both
cases there are no data inconsistencies (except for the extra null
padding).  Or it will report a data mismatch and exit.

Then, if the result is a good compare, you follow Doug's suggestion to
use 'cdck' to verify the CD timing is OK.
 
-- 
Bob McGowan

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to