[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Using dd to verify a dvd and avoid the readahead bug.



j t wrote:
Hi,

I have an iso file (which contains an iso9660/udf filesystem) that
I've written to a dvd-r using growisofs, thus:

# growisofs -dvd-compat -speed=1 -Z /dev/hdc=myDVD.iso

In the past, I have been able to check (verify) the burn finding the
iso size (using "isoinfo -d -i <isoFile>") and then by comparing the
output from:

# dd if=myDVD.iso bs=2048 count=<volSize> | md5sum
with
# dd if=/dev/hdc bs=2048 count=<volSize> | md5sum
(and checking /var/log/syslog for any read errors)

Now I have started getting read errors close to the lead-out, so I
append 150 2k blocks to the end of the iso file using:

# dd if=/dev/zero bs=2048 count=150 >> myDVD.iso

and I even disable readahead using hdparm:
# hdparm -a 0 /dev/hdc

Unfortunately that probably wasn't the problem in the first place, you need to tell the o/s to stop doing readahead for performance, and the command to do that is blockdev:
 blockdev --setra 0 /dev/hdc
does what you want, although see below, I don't think that's your problem.
But I still get read errors around near the end of the dvd:
# dd if=/dev/hdc bs=2048 count=2002922 | md5sum
dd: reading `/dev/hdc': Input/output error
1938744+0 records in
1938744+0 records out

Could someone please tell me:
1) Is this the dreaded readahead bug again?

No.

2) Can I use dd to verify my burns and avoid the readahead bug?

yes.
3) If not, how can I verify my dvd burn?

You did, the burn is bad.
Thank you for your help.

--
bill davidsen <davidsen@tmr.com>
 CTO TMR Associates, Inc
 Doing interesting things with small computers since 1979



Reply to: