System is Mandrake 10.0
Thanks
Did you look at rpm --rebuilddb
Scott
--
http://popfile.sourceforge.net POPFile Opensource Mail Classifier
> Sputnik wrote:
>
>> how to recreate /var/lib/rpm/Packages from an already installed system? I
>> had a problem with my /var partition, and it screwed rpm's DB.
>>
>> System is Mandrake 10.0
>>
>> Thanks
>
>
> Did you look at rpm --rebuilddb
>
> Scott
>
doesn't work:
[root@zeus rpm]# rpm --rebuilddb
rpmdb: /var/lib/rpm/Packages: file size not a multiple of the pagesize
error: cannot open Packages index
I've googled around all day, and the only solutions found seem to be redhat
only. I mean, there are a couple of programs included in redhat, but i
couldnt find them for mdk.
You might need to rpm --initdb first. Not sure though and I'm certainly
no expert at this.
Good luck.
http://www.rpm.org/hintskinks/repairdb
VA
those programs are not in my mandrake install....
rpm --rebuilddb
]rpm --rebuilddb
Does anyone know how that works? If the /var/lib stuff is gone, then the
only way would seem to be to go through every file on the disk and check
the stuff in the various packages to see if the file belongs. This seems
both likely to get stuff (eg the wrong package for something for example
built from a tar) that is wrong, or miss stuff (eg that package you
downloaded into /tmp and installed from there then erased). How does it
actually work?
In alt.os.linux Bill Unruh <un...@string.physics.ubc.ca> suggested:
> Jacques <jacque...@arcanthea.com> writes:
> ]rpm --rebuilddb
AFAIK there are a few options left:
The most important which doesn't seem to apply here, just grep
those missing files from the last BACKUP and run --rebuilddb if
needed.
Reinstall the system.
If you know which packages are installed, you might get away with
a fake install of all packages, "rpm -ihv --justdb xxx.rpm
yyy.rpm ..." and hopefully get your rpm db to a usable state.
rpm -qa --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}.rpm\n' \
> installed.rpm_packages-`date -I`.txt
It would be quite helpful to have this small file, if you don't
have any backup at all, you should if your data is worth anything
to you.
A few small hints, about the process which seems to be rather
badly documented, even if perhaps it didn't got my attention,
because of no problem at all in this direction?
http://www.rpm.org/hintskinks/repairdb/
--
Michael Heiming (GPG-Key ID: 0xEDD27B94)
mail: echo zvp...@urvzvat.qr | perl -pe 'y/a-z/n-za-m/'
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQFAvM6yAkPEju3Se5QRArTEAKDWo7G+q1j7PUQNgJ4pB1P3BeSAEQCeLgLu
r8wLwK+Bw3iZ3GKTmV7uNx8=
=Ba34
-----END PGP SIGNATURE-----