[Gloucs] Never ask me to admin your server!

Thomas Adam thomas_adam at bonbon.net
Mon Jul 5 19:49:53 BST 2004


On Mon, 5 Jul 2004 19:45:49 +0100
Paul Broadhead <lug at twinmoons.clara.co.uk> wrote:

> rm -rf/var/lib, yes /var/lib!  Oops, there goes my entire /var/lib
> directory tree, not just the cvs directory.  No backup yet, Bum!

Well, that was silly! Generally my approach to that sort of thing is to:

1. If you have a /var tree (and I am assuming Debian here) on a similar
box, copy that over. Don't worry about a mis-match of packages that
can be sorted out later. You can then:

% apt-get update 

etc etc.

If that is not an option, then you can try:

2. (This is all theoretical on my part)

/var is critical to package management. But, for it to function
properly, it needs the files contained under it. So, create the
following directories:

/var/cache/debconf
/var/log
/var/cache/apt/archives
/var/lib/dpkg/info
/var/lib/dpkg/parts
/var/lib/dpkg/alternatives
/var/lib/dpkg/methods
/var/lib/dpkg/updates

When debian runs, it checks the following file:

/var/lib/dpkg/status

This tells it what packages are in what state at any given time. "libc6"
is *the* critical package, so as an extract from my system, you should
add the following into that file:

Package: libc6
Status: install ok installed
Version: 2.3.2.ds1-13

Having added that, run the following commands:

# dpkg --clear-avail
# apt-get update 
# apt-get -u dist-upgrade
# cd /var/cache/apt/archives
# dpkg -i *.deb

Then, reinstall libc6 to pull dependencies down based on new
information:

# apt-get --reinstall install libc6
# apt-get dist-upgrade

That's it. (I hope....)

(extracted from Hants-LUG archives).

-- Thomas Adam

--
"Annie Hall leaves New York in the end. Press rewind, and Woody gets her
back again." -- "Look Inside America", Blur.




More information about the gloucs mailing list