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

Re: thanx -> Re: [debian-knoppix] check CD-R



Hi Dirk,

On Tue, Jan 07, 2003 at 16:32:10 +0100, Dirk Kamp wrote:

> Thank to everyone for the fast help
> Good information, but bad for me.
> 
> 4 of 7 CDs that i bought of Debian Distro are damage and that after the
> storekeeper send me the third package of this Distro. In the first two
> packages there also included damage CDs. :-(

Just to make it clear: If dd complains about the last two sectors only,
the CD is probably _not_ corrupted.

A better check for Debian CDs would be testing the .deb files.
Since binary .deb files are ar archives that contain two tarballs
control.tar.gz and data.tar.gz, it is easy to write a shell skript:

#!/bin/bash
: > checkdebs.log
find /cdrom -type f -name "*.deb" |
while read pkg
do
  ar p $pkg data.tar.gz 2>/dev/null | tar tzf - >/dev/null 2>&1
  if [ $? != 0 ] ; then
    echo "$pkg is damaged" >> checkdebs.log
  fi
done

The results will be collected in the file checkdebs.log.
Repeat the process for each CD.

bye,
  Chris
-- 
Christian Perle                                   perle@itm.tu-clausthal.de
Grunaer Str. 31                      http://www.itm.tu-clausthal.de/~perle/
01069 Dresden                   LinuxGuitarKitesBicyclesBeerPizzaRaytracing
_______________________________________________
debian-knoppix mailing list
debian-knoppix@linuxtag.org
http://mailman.linuxtag.org/mailman/listinfo/debian-knoppix


Reply to: