Debian: Need help with corrupted dpkg database

Bob George plug-discuss@lists.PLUG.phoenix.az.us
Tue, 17 Apr 2001 23:40:26 -0700


Well, I'm stuck good and hard. Had an unfortunate encounter with a power
cord, and after a painful run-through with fsck, "apt-get upgrade" or
anything similar ends with an ugly "dpkg: parse error, in file
`/var/lib/dkpg/available' near line 2" I noticed a number of problems with
files that seem related when going though the fsck process, so I suspect the
database is corrupted. I've run through the manual pages for dpkg and
others, but nothings jumping out at me. Can anyone give a quick hint as to
where to start rebuilding a corrupt database?

Also, I'd like to be able to reproduce this box. It's VERY standard, and my
only customizations consist of a handful of scripts. Is there a way to
extract what packages are installed, then automatically re-create a similar
config on a new (clone) box?

Any tips appreciated. Thanks!

- Bob