[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] appliance VM won't start, can't find /init, but /init is in the image.



BTW, as a quick check I did:
febootstrap --verbose --names bash libc6
I never see the libc6 package being downloaded
if I do
febootstrap --verbose --names libc6
then libc6 *is* downloaded.

On Thu, Aug 11, 2011 at 4:06 PM, David Konerding <dek konerding com> wrote:


On Thu, Aug 11, 2011 at 11:17 AM, Richard W.M. Jones <rjones redhat com> wrote:
On Thu, Aug 11, 2011 at 07:10:21PM +0100, Richard W.M. Jones wrote:
> On Wed, Aug 10, 2011 at 05:16:13PM -0700, David Konerding wrote:
> > Hi,
> > Still trying to get libguestfs appliance test to work on Ubuntu Lucid.  I
> > figured out my umask was causing problems and fixed that.  now I'm on to a
> > new problem.  libguestfs-test-tool reports the following:
> >
> > febootstrap: mounting new root on /root
> > febootstrap: chroot
> > /proc/uptime: No such file or directory
> > execl: /init: No such file or directory
> > febootstrap: debug: listing directory /
> >     2 d .                040755 4096 88619:5000
> >     2 d ..               040755 4096 88619:5000
> >    11 d lost+found       040700 16384 0:0
> >    12 d bin              040755 4096 23083:5000
> >    13 d boot             040755 4096 23083:5000
> >    14 d etc              040755 4096 23083:5000
> >   109 d lib              040755 4096 23083:5000
> >   156 d sbin             040755 4096 23083:5000
> >   157 d usr              040755 4096 23083:5000
> >   534 d var              040755 4096 23083:5000
> >  3701 - init             100750 3264 23083:5000
> >
> > Note, init is indeed a file (a shell script).  I checked the root and initrd
> > images, and they both have init (the initrd has an init binary, the root has
> > a shell script that starts udev etc).
>
> The problem is that the kernel gives the same error "execl: /init: No
> such file or directory" for a whole variety of reasons.  These
> include:
>
>  - /init missing (obviously not the case here)
>
>  - /bin/sh missing
>
>  - any library that /bin/sh needs is missing
>
>  - ld-linux missing
>
> So you need to make sure /bin/sh is there.  If it's a symlink (eg. to
> dash) then the destination file is there.  Then do 'ldd /bin/sh' and
> make sure all of the required libraries and ld-linux are there.

Additionally, these files are pulled at runtime from the host.

So say that /bin/sh needs /lib/libc.so.6 which is a symlink to
/lib/libc-2.14.90.so, then you would need to check:

 - /lib/libc.so.6 listed in appliance/supermin.d/hostfiles

 - /lib/libc-*.so listed in appliance/supermin.d/hostfiles

 - /lib/libc.so.6 exists on the host filesystem and is readable
  by non-root.

 - File(s) matching /lib/libc-*.so exist on the host filesystem and
  are readable by non-root.


So:  /bin/sh is a link to /bin/bash, it dynamic links to libc.so.6, but it appears libc.so.6 is missing from appliance/supermin.d/hostfiles; it looks to me like the libc debian package isn't downloaded during the febootstrap.  There is in libc.so.6 file in the VM image.


You may need to force the cached appliance to be rebuilt between tests
by doing:

 rm -rf {/tmp,/var/tmp}/.guestfs-*


Is there a similar way to clear out the files in appliance/supermin.d so i can re-do the package download/unpack/build img process?  I have been making clean, then make, then make install in src/libguestfs-1.12.3.
 
Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]