On 8/30/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> ----- Original Message -----
> From: Carl Lowenstein <[EMAIL PROTECTED]>
> Date: Tuesday, August 30, 2005 9:29 am
> Subject: Re: CD Tests in Fedora Install
> 
> > On 8/30/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > >
> > > ----- Original Message -----
> > > From: DJA <[EMAIL PROTECTED]>
> > > Date: Monday, August 29, 2005 7:35 pm
> > > Subject: CD Tests in Fedora Install
> > >
> > > > The Media test in Fedora Core's Installer, at least since FC3, is
> > > > broken
> > > > and its results thus unreliable either way. Don't use it. In fact,
> > > > the
> > > > FC maintainers are going to remove that test in future
> > versions. It
> > > > was
> > > > supposed to have been removed from FC4, but was missed.
> > >
> > > Can you recommend a good test, from linux and/or windows that would
> > > ensure the iso has been burned correctly?
> >
> >
> > Here is something I wrote a month ago, when I discovered that the
> > "check the
> > burned disk" code in K3b was slow and also did not check DVDs
> > properly. See
> > attached shell script.
> >
> > It takes advantage of the fact that the source file and the burned
> > CD are
> > both present on the same computer at the same time. So there is no
> > need to
> > waste time computing MD5 sums. Just compare the two files byte-by-
> > byte.
> > Stopping when you get to the end, as delimited by 2kB blocks.
> 
> Did I miss something, or was it supposed to be an attachment?
> 
> Rich

My copy shows a little paperclip symbol, and gmail offers to open the
attachment.
Just for the sake of completeness, since it isn't very big, here is
the real thing:

[EMAIL PROTECTED] bin]$ cat isocmp
#!/bin/sh
# -rwxrwxr-x  1 cdl cdl 747 Jul 22 21:42 /home/cdl/src/burncd/isocmp
# isocmp
#  compare image on burned {cd,dvd} with its source file
#   size=$(isosize -d 2048 $2)
#  don't use isosize, in case the image is not really iso9660

case $# in
        2) ;;
        *) echo "usage:  $0 /dev/cdrom /source/file.iso"; exit 2;;
esac

# a few sanity tests
if test ! -r $1
        then echo "can't read $1"; exit 2
fi
if test ! -r $2
        then echo "can't read $2"; exit 2
fi
if test ! -f $2
        then echo "$2 is not a file"; exit 2
fi

# compute size of file in 2kB blocks
size=$( dc -e "$(ls -l $2 | gawk '{print $5}') 2048/p")

# do the real work here, compare device file and source file byte by byte
dd if=$1 bs=2k count=$size 2>/dev/null | cmp -s $2 -

# report result
case $? in
        0) echo "good"; exit 0;;
        *) echo "bad"; exit 1;;
esac
[EMAIL PROTECTED] bin]$

-- 
    carl lowenstein         marine physical lab     u.c. san diego
                                                 [EMAIL PROTECTED]


--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to