[plug] Debian base reinstall

Bernard Blackham bernard at blackham.com.au
Sun Dec 28 22:05:42 WST 2003


On Sun, Dec 28, 2003 at 07:23:01PM +0800, Cameron Patrick wrote:
> apt, dselect and dpkg work fine when Perl isn't installed - even when
> perl-base is missing, in fact - so this shouldn't be necessary.  If
> dpkg's database is severely corrupted (which I've never seen happen, but
> you never know...), you might be able to rm -rf /var/lib/apt /var/lib/dpkg
> and then run debootstrap to reinstall[1].  (Installing debootstrap without
> using dpkg is left as an exercise to the reading.  dpkg -x may do the
> trick; if that doesn't work, well, .deb files are standard 'ar'
> archives which can probably be extracted somehow.)

At a guess:

cd /tmp
ar x /path/to/foo.deb
tar xzvf control.tar.gz
cd /
tar xzvf /tmp/data.tar.gz
/tmp/postinst configure

> [1] I've no idea how debootstrap copes with being run over an existing
> system, but...), but I see no reason why it shouldn't work.  You'll be
> left with a whole bunch of files that the package system knows nothing
> about, so perhaps a complete reinstall would be simpler and better.

Maybe cruft could help determine which packages need apt-get
--reinstall'ing.

And on that note, dpigs is also a handy program I found recently
from debian-goodies :)

Bernard.

-- 
 Bernard Blackham <bernard at blackham dot com dot au>



More information about the plug mailing list