<div>Rich,<div><br></div><div>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.</div>
<div><br></div><div>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.</div>
<div><br></div><div>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?</div>
<div><br></div><div><br></div><div>CHROOT:</div><div><div>[root@ns4 /]# cd /var/lib/rpm/</div><div>[root@ns4 rpm]# ls <br></div><div>Basenames     Dirnames     Group       Name      Providename     Pubkeys      Requireversion  Sigmd5       __db.000  __db.002  __db.004</div>
<div>Conflictname  Filedigests  Installtid  Packages  Provideversion  Requirename  Sha1header      Triggername  __db.001  __db.003</div><div>[root@ns4 rpm]# rm -f __db.00*</div><div>[root@ns4 rpm]# rpm --rebuilddb</div><div>
[root@ns4 rpm]# rpm -qa</div><div>[root@ns4 rpm]# ls -ltr</div><div>total 5920</div><div>-rw-r--r-- 1 7103 users   12288 Jul  2 17:01 Pubkeys</div><div>-rw-r--r-- 1 7103 users   12288 Jul  2 17:02 Conflictname</div><div>-rw-r--r-- 1 7103 users   12288 Jul  2 17:02 Triggername</div>
<div>-rw-r--r-- 1 7103 users 4526080 Jul  2 17:02 Packages</div><div>-rw-r--r-- 1 7103 users   12288 Jul  2 17:02 Name</div><div>-rw-r--r-- 1 7103 users  684032 Jul  2 17:02 Basenames</div><div>-rw-r--r-- 1 7103 users   12288 Jul  2 17:02 Group</div>
<div>-rw-r--r-- 1 7103 users   65536 Jul  2 17:02 Requirename</div><div>-rw-r--r-- 1 7103 users   86016 Jul  2 17:02 Providename</div><div>-rw-r--r-- 1 7103 users  118784 Jul  2 17:02 Dirnames</div><div>-rw-r--r-- 1 7103 users   45056 Jul  2 17:02 Requireversion</div>
<div>-rw-r--r-- 1 7103 users   32768 Jul  2 17:02 Provideversion</div><div>-rw-r--r-- 1 7103 users   12288 Jul  2 17:02 Installtid</div><div>-rw-r--r-- 1 7103 users   12288 Jul  2 17:02 Sigmd5</div><div>-rw-r--r-- 1 7103 users   24576 Jul  2 17:02 Sha1header</div>
<div>-rw-r--r-- 1 7103 users  684032 Jul  2 17:02 Filedigests</div><div><br></div></div><div><br></div><div>BOOTED SYSTEM:</div><div><br></div><div><div>[root@core021 yum.repos.d]# rpm -qa</div><div>rpmdb: /var/lib/rpm/Packages: unsupported hash version: 9</div>
<div>error: cannot open Packages index using db3 - Invalid argument (22)</div><div>error: cannot open Packages database in /var/lib/rpm</div><div>rpmdb: /var/lib/rpm/Packages: unsupported hash version: 9</div><div>error: cannot open Packages database in /var/lib/rpm</div>
</div><br><div class="gmail_quote">On Fri, Jun 19, 2009 at 6:57 PM, Richard W.M. Jones <span dir="ltr"><<a href="mailto:rjones@redhat.com" target="_blank">rjones@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Fri, Jun 19, 2009 at 05:44:52PM -0400, Christopher Johnston wrote:<br>
> Now to get this going for my testing I am comfortable using rootfs<br>
> (pivotroot and switchroot dont seem to work in nash).<br>
<br>
</div>I'm a bit surprised about that, because obviously switchroot is used<br>
all the time in mkinitrd-built initrds, eg. look at the following<br>
lines in mkinitrd:<br>
<br>
emit "echo Switching to new root and running init."<br>
emit "switchroot"<br>
emit "echo Booting has failed."<br>
emit "sleep -1"<br>
<br>
When you say dont seem to work, is there any diagnostic?<br>
<div><br>
> What I have done in my testing here is generate a linuxrc which I posted.  I<br>
> attmpted to use bash instead of nash and have it just fork /sbin/init but<br>
> that also did not work (upstarts init does not seem to work well here).<br>
><br>
> I looked over the script you are using here for your virtual machine, but<br>
> what are you actually doing to start init so the usual RC stuff can start<br>
> running?<br>
<br>
</div>Well in the init script we use, we _don't_ run any rc stuff.  It's<br>
just for a small appliance, so we set up what we need (ifconfig lo and<br>
eth0), modprobe a few modules, and then run our daemon directly.<br>
<br>
Having said that, it should easily be possible to use febootstrap to<br>
run the ordinary scripts, but the problem probably isn't febootstrap,<br>
but some bug/difference/sensitivity in /init, nash, permissions etc.<br>
<br>
Is the upstart %post script failing?  febootstrap runs all %post<br>
scripts under fakeroot+fakechroot, and they can sometimes behave<br>
differently.<br>
<br>
Are you booting these on real hardware?  I suggest testing it under<br>
qemu - it's much more controllable, and allows you to test things<br>
faster.<br>
<div><br>
Rich.<br>
<br>
--<br>
Richard Jones, Emerging Technologies, Red Hat  <a href="http://et.redhat.com/~rjones" target="_blank">http://et.redhat.com/~rjones</a><br>
</div>Read my programming blog: <a href="http://rwmj.wordpress.com" target="_blank">http://rwmj.wordpress.com</a><br>
Fedora now supports 75 OCaml packages (the OPEN alternative to F#)<br>
<a href="http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora" target="_blank">http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora</a><br>
</blockquote></div><br></div>