dd errors with certain DVDs

Paul Smith phhs80 at gmail.com
Sun Mar 25 13:49:48 UTC 2007


On 3/25/07, Charles Curley <charlescurley at charlescurley.com> wrote:
> > >> I am getting the errors below when I execute the command
>
> > >To answer your other email, you can validate a freshly minted DVD
> > >similarly.
> >
> > Thanks, Charles. Yes, it was the error regarding dd that was causing
> > the md5sums mismatch (reported in the other post of mine). However,
> > the method that you suggest works fine, and my problem is solved. The
> > command dd is not very reliable, indeed.
>
> The dd command is quite reliable. It does exactly what you tell it to
> do, not what you think you told it to do. Had you given it a count of
> sectors to read (calculated to match exactly the size of the ISO), it
> would have read only those sectors. E.g.:
>
> dd bs= count= if=/dev/dvd of=dvd1.iso
>
> The CD burning software pads the ISO with blank data to round its size
> up to a multiple of sectors. (I'm not sure why; perhaps someone more
> familiar with CDs can explain this.) So what you got back was larger
> than the original ISO. So of course the MD5 sums were different.
>
> However, giving dd an exact count of sectors would not have
> helped. Apparently CD burning software also mucks with a field in the
> CD header as it burns the CD/DVD. So I would say that dd is quite
> reliable, it just wasn't appropriate for what you wanted to do.

The script I use is the following:

-------------------------------------------
#!/bin/sh

blocos=`echo $(( $(ls -l "$1" | awk '{ print $5 }') / 2048 ))`
disksum=`dd if=/dev/dvd bs=2048 count=$blocos | md5sum - "$1"`

echo "$disksum"
-------------------------------------------

So, it does give the bs and count parameters to dd. Notwithstanding, I
get an error with dd. For other DVDs, this very script has worked
fine.

Paul




More information about the fedora-list mailing list