Re: Using dd to verify a dvd and avoid the readahead bug.
Hi,
> Have you tried setting both to zero and asking to read just the number
> of blocks in the ISO filesystem?
Interesting proposal.
The image of 3041 blocks is not available any more.
New test candidate looks like this
track: 1 lba: 0 ( 0) 00:02:00 adr: 1 control: 4 mode: 1
track:lout lba: 3193 ( 12772) 00:44:43 adr: 1 control: 4 mode: -1
It is supposed to have 3191 readable paylod blocks.
First let's see wether the bug would occur:
# blockdev --getra /dev/sr2
32
$ dd bs=2048 if=/dev/sr2 >/dev/null
3158+0 records in
I.e. 66 kB missing.
With ra still set to 32 :
$ dd bs=2048 if=/dev/sr2 count=3191 >/dev/null
3158+0 records in
Now i change the drive setting
# blockdev --setra 0 /dev/sr2
# blockdev --getra /dev/sr2
0
$ dd bs=2048 if=/dev/sr2 count=3191 >/dev/null
3158+0 records in
# hdparm -a /dev/sr2
/dev/sr2 not supported by hdparm
It is an USB burner.
--------------------------------------------------------
So i hop to a IDE DVD-ROM:
# blockdev --getra /dev/hdg
8
$ dd bs=2048 if=/dev/hdg count=3191 >/dev/null
It is gnawing more than 30 seconds on these 6 MB
3142+0 records in
98 kB missing ! That's about world record.
# blockdev --setra 0 /dev/hdg
# blockdev --getra /dev/hdg
0
$ dd bs=2048 if=/dev/hdg count=3191 >/dev/null
It tries hard and long but
3142+0 records out
About hdparm there is not much to try:
# hdparm -a /dev/hdg
/dev/hdg:
readahead = 0 (off)
Shrug.
And again to prove that it is not impossible to read
all blocks except the two final ones:
$ test/telltoc --drive /dev/sg2 \
--read_and_print -1 -1 raw:/dvdbuffer/image.iso
...
NOTE : Last two frames of CD track unreadable. This is normal if TAO track.
End Of Data : start=0s , count=3193s , read=3191s
$ ls -l /dvdbuffer/image.iso
-rw-r--r-- 1 * * 6535168 Oct 5 18:06 /dvdbuffer/image.iso
$ expr 6535168 - 3191 '*' 2048
0
Reading skills are indispensable.
Have a nice day :)
Thomas
Reply to: