[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: corrupted RPM db - need help

On Tue, Aug 21, 2001 at 05:20:30PM -0700, Grant Goodale wrote:
> 	As my Packages file is exactly 18948096 bytes in size, the reason for the
> failure seems obvious - red-carpet succeeded in writing a partial record to
> the rpm db, and then the disk filled up.  I'm not familiar with the format
> of the Packages file, so I don't know how to go in and simply elide the
> offending section via dd.  I've attempted to match up the package numbers
> produced by rpm --rebuilddb -vv with the names I get using
> rpm -qi --querybynumber, but It would appear that the numbering schemes are
> not the same (querybynumber seems to be sorted ascending alphabetic, which
> the rebuilddb output is ascending data of install).

Format is a Berkeley db hash, key is a monotonically increasing interger,
value is an unloaded header from a package. Yup, rebuilddb has no specific

> 	Anyone have any suggestions as to how I can repair the damage without
> starting from scratch?

Try doing (you need db3-utils installed)
	cd /var/lib/rpm
	mv Packages Packages-ORIG
	db_dump Packages-ORIG | db_load Packages
That's the 1st step anyways.

73 de Jeff

Jeff Johnson	ARS N3NPQ
jbj@jbj.org	(jbj@redhat.com)
Chapel Hill, NC

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []