RPM Community Forums

Mailing List Message of <rpm-users>

Re: I killed my RPMDB --- any rescue possible?

From: Eric MSP Veith <eveith@wwweb-library.net>
Date: Mon 13 Jun 2011 - 17:05:55 CEST
Message-Id: <201106131505.56105.eveith@wwweb-library.net>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 13 June 2011, Jeff Johnson <n3npq@mac.com> wrote:
> (...)
> You can try reading the rpmdb with pre-rpm-5.3 to assess how much data
> is savable. (...)

Ok, I salvaged what I could and replaced the rest from a backup. I found out 
that there (a) was a corrupted RPMDB, but re-running (b) dbconvert.sh later 
on in a futile attempt to fix it made things worse. So byteswapping and 
rebuilding largely helped.  TA!

> > Do you have any hint/idea why "rpm -r /my/chroot -Uvh
> > /some/package.rpm" kills the RPMDB *outside* of the chroot? Did I miss
> > anything here?
> 
> I don't know what operations were run, and with what utilities, so
> I cannot hazard a guess.

Only one, which is "rpm -r /srv/vm/buildroot -Uvh $(< 
~/Packaging/baseset.txt)". I.e., basic chroot populating.

> If you believe that rpm is confused about outer <-> inner chroot(2)
> behavior, then you need to run
> 	strace -e open -o /tmp/xyzzy -f rpm …
> and examine the paths that were opened.
> 
> In _ALL_ cases, doing
> 	chroot /your/chroot /bin/bash
> and avoiding -r "works".

Ok, I'll do that.

What's the preferred way to initially populate a chroot? 

TIA,
			Eric
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iQIcBAEBAgAGBQJN9idTAAoJEIXD2TZ1epVB9KoP+wVB4YNEdGyMaA7FyLNG3Bc5
ZC5CUXf4nV8KD+YcBFfTgFdroGGF8vx8ZmcEl5zPQTloIorgpGEbwcd0AqtdCONl
/nVsn1Q84o4F1O5Yxy+15IPaPJZKYrFBTdQvEriH9IepEKjwooDGW1MUID3SuPEq
mbaLBJV6sym1cSBAkQ/bp/GO2BjSwAssuRiBjZX/k80d9p0Fa3E3tVvFRvq3YbaN
pK7way2w7kgkl8eb/IlxTY9XdUYQQt/kfDVKRr7qVq/aascEypH/0/+a7OYJywFv
VEz6O1kpC6WsKDwTB7zrR67rFkeMpiVxTWT0FwszGfnTZdfDNl5kcPmfeikZZkL5
idBKmIHTrkYyUgi4Uf2ea1+gLfZtUpARkapCUAh0WQ9Ca2ThG/uJViI3yJ6utI0Q
/CFmDpTdjIUXwrNoEMR7vRSMYtqYfRY3i+h8U0hKSTgBRFS852RpSTY+acwi4zZ5
/R3zMJhOUtNmX04VZymZTl/KzfktQvZEBElBXdf9W5S2Nkqs8OrZzUqE41ymA8mI
FPVETS8mETO/Y3uz8jtIBPAU3d7N97FTyxjTG5jL8Ll/gZTrjUFf0nPp7d/xxoj0
+U1HZQ2yDpSciecwddJEt4t5eO3AYFMkkRzZTO9ie7xGPpMt4G59xWv0tt5hxURC
VBOn0dMT/BBbL84QC+7l
=S9FW
-----END PGP SIGNATURE-----
Received on Mon Jun 13 17:05:59 2011
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.