[fedora-virt] Re: febootstrap question

Richard W.M. Jones rjones at redhat.com
Tue Jul 7 15:26:25 UTC 2009

On Tue, Jul 07, 2009 at 10:58:32AM -0400, Christopher Johnston wrote:
> Wanted to updated you on what I was working on using febootstrap.  I managed
> to get a fully booted F10 system that can be PXE booted and pivot the rootfs
> filesystem into tmpfs.  It then forks init off to start the usual boot
> process.  Very happy so far with how it is coming along with the project.
>  The source of the problem turned out to be the upx binary minimize process,
> once I disabled that it worked great.

Yes I should probably just remove upx support, since it's nothing but
trouble and saves very little space.

> I am running into another smaller issue where the rpmdb gets corrupted after
> the system boots.  I am also not running the minimizer to remove the rpmdb
> as I need this at boot time when the system is up and running to install
> some required RPMs.

For febootstrap, remember that you are using the host yum/rpm to
initially create the initramfs.  When you later boot the system you're
using the installed yum/rpm, which could well be different versions.
(Same thing happens with mock BTW).

> Here is the chroot environment for the image, strangely rpm -qa doesnt
> report anything yet the files are all in tack (strings Packages even shows
> data).  Have you seen this where the rpmdb gets corrupted at boot time?
> [root at ns4 /]# cd /var/lib/rpm/
> [root at ns4 rpm]# ls
> Basenames     Dirnames     Group       Name      Providename     Pubkeys
>  Requireversion  Sigmd5       __db.000  __db.002  __db.004
> Conflictname  Filedigests  Installtid  Packages  Provideversion  Requirename
>  Sha1header      Triggername  __db.001  __db.003
> [root at ns4 rpm]# rm -f __db.00*

Is this running using 'febootstrap-run' or using a plain fakechroot or
are you really running this as root?

Using 'rm' directly on files in the chroot is usually a bad idea.  See
the discussion here:


> [root at ns4 rpm]# rpm --rebuilddb

Similarly, it's only safe to use 'febootstrap-run' to run commands.
Or run the commands only in a booted system.

> [root at core021 yum.repos.d]# rpm -qa
> rpmdb: /var/lib/rpm/Packages: unsupported hash version: 9
> error: cannot open Packages index using db3 - Invalid argument (22)
> error: cannot open Packages database in /var/lib/rpm
> rpmdb: /var/lib/rpm/Packages: unsupported hash version: 9
> error: cannot open Packages database in /var/lib/rpm

See above on difference between host and installed RPM.


Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.

More information about the Fedora-virt mailing list