On Fri, 2003-03-07 at 09:23, Ed Wilts wrote:
> On Fri, Mar 07, 2003 at 06:36:07AM -0800, Randy Arnold wrote:
> > 
> > I am sure that this is self inflicted.
> > I did an upgrade to RH 8.0 from 7.3.
> > 
> > I had many problems with RPM, and seemed to have them
> > resolved them with the help of this list.
> > 
> > Now, for some reason my RPM database is gone.
> > 
> > When I do rpm -qa all I see is the rpm packages.
> > 
> > rpm --rebuild takes all of one second to complete.
> > rpm --initdb does not help.
> 
> If you did an --initdb, the database really is gone now if it wasn't
> before.  That's the purpose of initdb.  man rpm would have told you
> that.  
> 
> > The packages *are* installed and everything works, with
> > exception of up2date which makes sense.
> > 
> > Any ideas?
> 
> If you have backups of /var/lib/rpm, restore them.  If not, you've got 2
> basic choices, both ugly:
> 1.  Find every file on the system and attempt to determine which package
> they came from.  Then rpm -ivh --justdb <package>.  If you registered
> and updated via RHN, then go to the web site and extract the package
> list.  That will save you a *lot* of work.  If you've done an up2date -p
> since you corrupted your database, you've dug yourself deeper in a hole.
> 2.  Do a fresh install.
> 
> That's why we have backups.  If you accidently corrupt something
> critical, like you did, you can restore.  At an absolute minimum, backup
> the output of rpm -qa. A Red Hat Linux system without a valid rpm
> database is extremely difficult to manage.
> 
> If you have an accurate package list from RHN or your backups, use
> option 1.  If you don't, use option 2. 
> 

Ed I don't use RHN but seems like the script I wrote that buzzed the
file system looking for file that don't belong to packages or have
changed cold be used to lookup the package name in this database you are
talking about and then return a list of packages that own files by the
same name as those on the system.  I am assuming at that point it would
be trivial to pipe the package names into rpm for the --justdb step.

I will play with rpmdb ( I have never even installed it ) and see what
can be done.  I am sort of curious.  btw the script I am talking about
is at :

www.elevating.com/bret/fcf.pl  

(find config files)

Bret



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

Reply via email to