[fedora-virt] Re: febootstrap question

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


On Tue, Jul 07, 2009 at 04:26:25PM +0100, Richard W.M. Jones wrote:
> Using 'rm' directly on files in the chroot is usually a bad idea.  See
> the discussion here:
> 
> http://git.et.redhat.com/?p=febootstrap.git;a=blob;f=febootstrap.pod;h=e208603bc9fd670857df1b7419fffd1d2986c024;hb=HEAD#l108
> 
> > [root at ns4 rpm]# rpm --rebuilddb
> 
> Similarly, it's only safe to use 'febootstrap-run' to run commands.

You might also want to consider the hoops that libguestfs goes through
so it only runs commands safely:

http://git.et.redhat.com/?p=libguestfs.git;a=blob;f=appliance/make.sh.in;hb=HEAD

Every time we run a command on the initramfs, it's wrapped in a call
to febootstrap-run or febootstrap-install (the latter to install extra
files).

If you don't do that you can end up with a corrupted/mismatching
fakeroot.log which causes all sorts of subtle and unpredictable
problems.  eg. We had one where "find" would segfault at random times,
and we traced it back to a single use where we had copied a file into
the fakeroot without using febootstrap-install.

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw




More information about the virt mailing list