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

Re: Two more corrupt .debs found from 2.2_rev0 images



On Tue, 22 Aug 2000, Christian T. Steigies wrote:

> On Tue, Aug 22, 2000 at 10:18:38AM +0100, Philip Hands wrote:
> > "J.A. Bezemer" <costar@panic.et.tudelft.nl> writes:
> > 
> > > In fact, I've just corrected my private copy of the Bin-2 image (how I love
> > > mc(1)! Offset 0x148554de), the new md5sum of the image is:
> > > 
> > > be04cd6d17159d66978ad227b26ed17d  binary-i386-2.iso
> > > 
> > I quite like this idea -- the only problem is that we don't know if
> > there are bit errors outside the package files (i.e. in the files
> > generated during the debian-cd run).
> > 
> > Given that it's a single bit error, it will rsync quickly.
> > 
> > So. Are we going to simply mention the two md5sums in the release
> > notes, with the fix if you happen to have the one with a bit error?
> Any posibility to have a script or something that performs this bitflip?

Excellent idea! Attached below. (You can probably do this in perl too, but I
know perl read-only ;-)

Phil: I think you'd best apply this to a copy of binary-i386-2.iso and then
rename the patched copy to the original name; that way possibly running rsyncs
aren't affected.

> And maybe something that can correct the deb for already burned CDs on
> harddisk?

Dowload the thing from the nearest mirror. It's only 212 kB.
(Okay okay, changing POS to 0x64de should work.)

> > Does anyone have any fundamental objections to this?
> > 
> > I'm a bit uncomfortable about having two versions of the same thing
> > around, but given that it's a simple data error, it seems reasonable
> > to allow people to fix it if they realise there's a problem, and it's
> > not too serious if they don't realise, because there's an easy to
> > work-around.
> I got a report from somebody whom I have sent the "corrupt" CDs. He upgraded
> from slink, wanted to install pdksh. He says the upgrade procedure stopped,
> he rebooted and got into sever problems (X unconfigured, etc). He had severe

Sorry, I don't buy that. You don't reboot once during slink->potato, package
errors are supposed to be handled correctly (I think apt-get dist-upgrade will
say "dpkg --configure --pending" which should work, then dpkg --remove pdksh,
and apt-get dist-upgrade again) and if X worked it should remain working even 
on a half-upgraded system. Either he paniced and pressed the reset button
(without sync) or had hardware problems.


Regards,
  Anne Bezemer

------------------------------------------------------------------------------
/* correct-i386-2.c
   Corrects the Debian 2.2 rev0 i386 Binary-2 CD for a single-bit error.

   COMPILE: gcc -Wall -O2 -o correct-i386-2 correct-i386-2.c
   USAGE:   ./correct-i386-2 binary-i386-2.iso
   NOTE: This is an in-place correction - it doesn't require any disk space.

   Old md5sum: c4a8591b64efe58e0acd39f7eac30ac6  binary-i386-2.iso
   New md5sum: be04cd6d17159d66978ad227b26ed17d  binary-i386-2.iso

   Copyright (C) 2000 J.A. Bezemer
   Licensed under GNU GPL -- NO WARRANTY WHATSOEVER -- USE AT YOUR OWN RISK!
 */

#include <stdio.h>

#define POS 0x148554de
#define OLD 0xc8
#define NEW 0xc0

int
main (int argc, char *argv[])
{
  FILE *f;
  unsigned char o, n = NEW;

  if (argc == 2 &&
      (f = fopen (argv[1], "r+")) != NULL &&
      fseek (f, POS, SEEK_SET) == 0 &&
      fread (&o, 1, 1, f) == 1 &&
      o == OLD &&
      fseek (f, POS, SEEK_SET) == 0 &&
      fwrite (&n, 1, 1, f) == 1 &&
      fclose (f) == 0)
    {
      fprintf (stderr, "Correction successful\n");
      return 0;
    }
  else
    {
      fprintf (stderr, "Usage error, file error, wrong file or already "
               "converted file\n");
      perror ("This may be the error message");
      return 1;
    }
}



Reply to: