Hi all,
I have a server that crashed. I took the hdd out in order to investigate.
I would like know to whole list of packages (from the RPM base) on the server that crashed.
How can i querry this offline RPM database from another system ?
Thanks
Hi all,
I have a server that crashed. I took the hdd out in order to investigate.
I would like know to whole list of packages (from the RPM base) on the server that crashed.
How can i querry this offline RPM database from another system ?
Thanks
Couldn’t you chroot in and do it that way or am I missing something?
something like this
mount /dev/sda2 /mnt
mount /dev/sda3 /mnt/home
mount --bind /dev /mnt/dev
mount --bind /dev/pts /mnt/dev/pts
mount --bind /dev/shm /mnt/dev/shm
mount --bind /proc /mnt/proc/
mount --bind /sys /mnt/sys
mount --bind /tmp /mnt/tmp
chroot /mnt
Before my hdd died I was doing this frequently to run Suse apps from another distro, including yast and rpm queries.
I’ve never tried this before … Is the HDD still good? Any chance you could boot with to this hdd (as the boot drive) in a separate (approx similar) diagnostic PC ? ie physically connect this HDD to make this HDD the boot drive.
Then Boot to run level 3 (text prompt) so you don’t have to mess around with different graphics adapters.
Then when in run level 3 you can type:
rpm -qa --last > somefile.txt
Then plug in a USB stick, mount it manually, and copy somefile.txt to that USB stick. Umount and remove the USB stick. Shutdown the PC. Then restore the original HDD in that diagnostic PC, and examine the text file offline.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
~From the man page, assuming you can access the path to the database on
that hard drive:
rpm -qa --dbpath /mnt/mountedDrive/var/lib/rpm > /tmp/oldDriveRPMs.txt
Good luck.
RedLightDistrict wrote:
| Hi all,
|
| I have a server that crashed. I took the hdd out in order to
| investigate.
|
| I would like know to whole list of packages (from the RPM base) on the
| server that crashed.
|
| How can i querry this offline RPM database from another system ?
|
| Thanks
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIUnWP3s42bA80+9kRArWDAJ95Ua3hSV7zS2XtUr6huOuBTpboOQCfQkTf
p+5bczqHAS+ZYEy94cv14Zk=
=Qdpb
-----END PGP SIGNATURE-----
Yes my HDD are still good.
Ok, i will mount them and i will use the
rpm -qa --dbpath /mnt/mountedDrive/var/lib/rpm > /tmp/oldDriveRPMs.txt
I will let you know
Thanks
I made a test with the command you said, and, unfortunately, I have no results.
I first mounted the external hard drive, and then copied all /var/lib/rpm folder content in the /tmp folder on my system.
mars:/# ls -alh /tmp/rpmdb
total 9.7M
drwxr-xr-x 2 root root 4.0K 2008-06-02 18:23 .
drwxrwxrwt 3 root root 4.0K 2008-06-02 18:22 ..
-rwxrwxrwx 1 root root 16K 2008-06-02 18:21 conflictsindex.rpm
-rw-r--r-- 1 root root 24K 2008-06-02 18:23 __db.001
-rw-r--r-- 1 root root 1.3M 2008-06-02 18:23 __db.002
-rw-r--r-- 1 root root 440K 2008-06-02 18:23 __db.003
-rwxrwxrwx 1 root root 2.9M 2008-06-02 18:21 fileindex.rpm
-rwxrwxrwx 1 root root 16K 2008-06-02 18:21 groupindex.rpm
-rwxrwxrwx 1 root root 16K 2008-06-02 18:21 nameindex.rpm
-rw-r--r-- 1 root root 12K 2008-06-02 18:23 Packages
-rwxrwxrwx 1 root root 6.2M 2008-06-02 18:21 packages.rpm
-rwxrwxrwx 1 root root 84K 2008-06-02 18:21 providesindex.rpm
-rwxrwxrwx 1 root root 44K 2008-06-02 18:21 requiredby.rpm
-rwxrwxrwx 1 root root 16K 2008-06-02 18:21 triggerindex.rpm
mars:/#
And now, when I query this RPM base, I have no results:
mars:/# rpm --dbpath /tmp/rpmdb --query --all
mars:/#
Any ideas ?
Thanks