Stephen Gran on Sun, 17 Nov 2002 16:48:15 -0500


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

Re: [PLUG] Weird APT error message


On Sun, Nov 17, 2002 at 03:44:24PM -0500, Mike Leone said:
> Stephen Gran (steve@lobefin.net) had this to say on 11/17/02 at 13:30: 
> 
> > And, back to Mike - if it's 'just' the /usr/ partition trashed, it
> > may
> 
> Haven't seen errors from any others. I'm thinking filesystem
> corruption, because I had to do a "reiserfsck --rebuild-tree" a number
> of times, until it finally finished. It kept "aborting".
> 
> > You can try booting with the rescue CD, reformatting that partition,
> > and reading back in your package selections with a combination of
> > dpkg --set-selections and apt-get install --reinstall.  Painful, but
> > it may be easier than a full reinstall.
> 
> How can I do that from the rescue CD shell? I'm not visualizing this
> set of steps properly.

You would have to boot the rescue CD, format your /usr/ partition, and
then mount it somewhere.  Then copy in dpkg, apt-get and the necessary
libs to get them going, which are:
/usr/lib/libapt-pkg-libc6.2-3-2.so.3.2 
/usr/lib/libstdc++-libc6.2-2.so.3 
/lib/libm.so.6 
/lib/libc.so.6 
/lib/ld-linux.so.2 
(the last 3 you should still have, hopefully)

Then you can mount the / partition, chroot in, and hopefully get dpkg
and apt-get to restore your box with something like: 
($file being the output of dpkg --get-selections)
for $i in `cat $file | cut -f1` ; do apt-get install --reinstall $i` ; done

This is, of course, assuming that you have a second box, running similar
versions, as the one that crashed.  Or maybe even another box that you
could use to download them, and then copy to a floppy or something and
then move them over.

I have sid running on one of my boxes, so if you need it, I can sendfile
them, or put them online somewhere, if you want to give that a go.

HTH and good luck,
-- 
 ------------------------------------------------------------------------------
|Stephen Gran                  | Every country has the government it           |
|steve@lobefin.net             | deserves.   -- Joseph De Maistre              |
|http://www.lobefin.net/~steve |                                               |
|                              |                                               |
 ------------------------------------------------------------------------------

Attachment: pgp4HbX9bzAl3.pgp
Description: PGP signature