-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 14 August 2002 03:41 pm, Hal Burgiss wrote:
> On Wed, Aug 14, 2002 at 02:25:35PM -0500, whitroth wrote:
> > Hi.
> >
> > Runnig 6.2 on my firewall, no X, went to apply patches, etc, and
> > wanted to start using up2date...and realized that when my second
> > hard drive crashed, months ago, taking *all* of /var with it, that
> > the rpm database is gone.
> >
> > So, short of re-installing RH, is there any way to recreate it?

> Having been through something similar a while back, my conclusion is
> 'no, there is no easy way out'. So now I back up all the /var/lib/rmp
> stuff :)
>
> I didn't go the re-install route, since I had a lot of non-RH
> packages, and wasn't sure I could remember those. So what I did,
> re-install all the beefy stuff (glibc, gcc*, etc), and anything
> obvious off the CD (man pages, init scripts, etc). Factor in updates
> and do those first. For me this got maybe 80-90% of it back. Then wrote
> a short script to 'rpm -qf' every file on the system, and grepped for
> those that it failed on (sorted and uniq'd), and then checked all
> those. Some were obvious, some not.
>
> Maybe there is a quicker/slicker way that somebody knows about now. If
> its a stock install, re-install would be faster.

This won't help the origional poster, since he lost /var, and even if /var 
was available log rotation would have removed the needed data by now, but 
this may help others:

You should have the file /var/log/rpmpkgs available. That file contains a 
complete list of every rpm installed on the system.
Using the data in that file, it should be possible to then run:
rpm -ivh --justdb for each package in listed in the file. It's still a lot 
of work, and obviously you need to have the package.rpm available, but 
it's better than nothing.

- -- 
- -Michael

pgp key:  http://www.tuxfan.homeip.net:8080/gpgkey.txt
Red Hat Linux 7.{2,3} in 8M of RAM: http://www.rule-project.org/
- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAj1awaMACgkQn/07WoAb/SslfACfcxidI+GN/hLjezPP1MpRRkaS
5zIAnRchaAlFwFZx+WdxV4fUQb+oX5TT
=6SSx
-----END PGP SIGNATURE-----



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to