[fedora-virt] Re: febootstrap question

Richard W.M. Jones rjones at redhat.com
Fri Jun 19 22:57:23 UTC 2009


On Fri, Jun 19, 2009 at 05:44:52PM -0400, Christopher Johnston wrote:
> Now to get this going for my testing I am comfortable using rootfs
> (pivotroot and switchroot dont seem to work in nash).

I'm a bit surprised about that, because obviously switchroot is used
all the time in mkinitrd-built initrds, eg. look at the following
lines in mkinitrd:

emit "echo Switching to new root and running init."
emit "switchroot"
emit "echo Booting has failed."
emit "sleep -1"

When you say dont seem to work, is there any diagnostic?

> What I have done in my testing here is generate a linuxrc which I posted.  I
> attmpted to use bash instead of nash and have it just fork /sbin/init but
> that also did not work (upstarts init does not seem to work well here).
> 
> I looked over the script you are using here for your virtual machine, but
> what are you actually doing to start init so the usual RC stuff can start
> running?

Well in the init script we use, we _don't_ run any rc stuff.  It's
just for a small appliance, so we set up what we need (ifconfig lo and
eth0), modprobe a few modules, and then run our daemon directly.

Having said that, it should easily be possible to use febootstrap to
run the ordinary scripts, but the problem probably isn't febootstrap,
but some bug/difference/sensitivity in /init, nash, permissions etc.

Is the upstart %post script failing?  febootstrap runs all %post
scripts under fakeroot+fakechroot, and they can sometimes behave
differently.

Are you booting these on real hardware?  I suggest testing it under
qemu - it's much more controllable, and allows you to test things
faster.

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 75 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora




More information about the Fedora-virt mailing list