[Libguestfs] appliance VM won't start, can't find /init, but /init is in the image.
Richard W.M. Jones
rjones at redhat.com
Thu Aug 11 18:17:28 UTC 2011
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.
You may need to force the cached appliance to be rebuilt between tests
by doing:
rm -rf {/tmp,/var/tmp}/.guestfs-*
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/
More information about the Libguestfs
mailing list