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

Re: [Libguestfs] libguestfs-test-tool on ubuntu: kernel panic



First, thanks for the in-depth assistance.  See responses inline below.

On Tue, Aug 9, 2011 at 2:08 AM, Richard W.M. Jones <rjones redhat com> wrote:
On Mon, Aug 08, 2011 at 03:55:07PM -0700, David Konerding wrote:
> Hi,
>
> I am trying to get libguestfs-test-tool working on ubuntu.  The first
> problem I had was that HiveX won't compile on ubuntu to due to some missing
> symbols (rpl-getopt, I see this has already been reported).  Second problem
> is that if HiveX is not available, guestfish doesn't link because code
> refers to symbols which aren't compiled into libguestfs (I was able to work
> around this by #ifdeffing references to those functions).

Which version of Ubuntu is this?

hivex should be in Ubuntu already, thanks to Hilko Bengen:
http://packages.ubuntu.com/oneiric/libhivex-dev


It's a Lucid Lynx derivative,  and we don't have that package.  Maybe I can shoehorn it in.

The problem with missing hivex/pcre causing libguestfs builds to break
is known:
https://bugzilla.redhat.com/show_bug.cgi?id=723474


Thanks.   I simply went into inspect_icon.c, and wherever you called an undefined function, I set the value to NULL, which in most cases invokes the error path.  IE:

diff -ru libguestfs-1.12.3/src/inspect_icon.c /usr/local/home/dek/libguestfs-1.12.3/src/inspect_icon.c
--- libguestfs-1.12.3/src/inspect_icon.c        2011-07-20 10:20:58.000000000 -0700
+++ /usr/local/home/dek/libguestfs-1.12.3/src/inspect_icon.c     2011-08-08 14:19:31.000000000 -0700
@@ -75,7 +75,11 @@
   int favicon, highquality;
   size_t size;
 
+#if defined(HAVE_HIVEX)
   fs = guestfs___search_for_root (g, root);
+#else
+  fs = NULL;
+#endif
   if (!fs)
     return NULL;

> Anyway, including the diagnostic output in case it helps.
[...]
> 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              040750 4096 23083:5000
>    13 d boot             040750 4096 23083:5000
>    14 d etc              040750 4096 23083:5000
>   109 d lib              040750 4096 23083:5000
>   156 d sbin             040750 4096 23083:5000
>   157 d usr              040750 4096 23083:5000
>   534 d var              040750 4096 23083:5000
>   690 - init             100750 3264 23083:5000
> febootstrap: debug: listing directory /bin
>    12 d .                040750 4096 23083:5000
>     2 d ..               040755 4096 88619:5000
>   540 l rbash            120777 4 0:0 -> bash
>   541 l sh               120777 9 0:0 -> /bin/bash
> febootstrap: debug: listing directory /lib
>   109 d .                040750 4096 23083:5000
>     2 d ..               040755 4096 88619:5000
>   110 d cryptsetup       040750 4096 23083:5000
>   113 d firmware         040750 4096 23083:5000
>   145 d init             040750 4096 23083:5000
>   146 d modules          040750 4096 23083:5000
>   147 d security         040750 4096 23083:5000
>   148 d udev             040750 4096 23083:5000
>   551 l libaio.so.1      120777 15 0:0 -> libaio.so.1.0.1
>   552 l libbsd.so.0      120777 15 0:0 -> libbsd.so.0.2.0
>   553 l libdbus-1.so.3   120777 18 0:0 -> libdbus-1.so.3.4.0
>   554 l libdrm_intel.so.1 120777 21 0:0 -> libdrm_intel.so.1.0.0
>   555 l libdrm_nouveau.so.1 120777 23 0:0 -> libdrm_nouveau.so.1.0.0
>   556 l libdrm_radeon.so.1 120777 22 0:0 -> libdrm_radeon.so.1.0.0
>   557 l libfuse.so.2     120777 16 0:0 -> libfuse.so.2.8.1
>   558 l libgcrypt.so.11  120777 19 0:0 -> libgcrypt.so.11.5.2
>   559 l libglib-2.0.so.0 120777 23 0:0 -> libglib-2.0.so.0.2400.1
>   560 l libnih-dbus.so.1 120777 20 0:0 -> libnih-dbus.so.1.0.0
>   561 l libnih.so.1      120777 15 0:0 -> libnih.so.1.0.0
>   562 - libntfs-3g.so.75.0.0 100644 266616 0:0
>   563 l libntfs-3g.so.75 120777 20 0:0 -> libntfs-3g.so.75.0.0
>   564 l libparted.so.0   120777 18 0:0 -> libparted.so.0.0.1
>   565 l libpcre.so.3     120777 17 0:0 -> libpcre.so.3.12.1
>   566 l libply-boot-client.so.2 120777 27 0:0 -> libply-boot-client.so.2.0.0
>   567 l libply-splash-core.so.2 120777 27 0:0 -> libply-splash-core.so.2.0.0
>   568 l libply-splash-graphics.so.2 120777 31 0:0 ->
> libply-splash-graphics.so.2.0.0
>   569 l libply.so.2      120777 15 0:0 -> libply.so.2.0.0
>   570 l libpng12.so.0    120777 18 0:0 -> libpng12.so.0.42.0
>   571 l libpopt.so.0     120777 16 0:0 -> libpopt.so.0.0.0
>   572 l libslang.so.2    120777 17 0:0 -> libslang.so.2.2.2
>   573 l libss.so.2       120777 12 0:0 -> libss.so.2.0
>   574 l libudev.so.0     120777 16 0:0 -> libudev.so.0.6.1
>   575 l libulockmgr.so.1 120777 20 0:0 -> libulockmgr.so.1.0.1
>   576 l libusb-0.1.so.4  120777 19 0:0 -> libusb-0.1.so.4.4.4
> febootstrap: debug: listing directory /lib64

The problem is that both /bin/bash and libc are completely missing
from the appliance.


i see.
 
During the build, was febootstrap able to download all the packages it
needed?


Looks like it (I see a bunch of package downloads, none of them failed).
However, I re-ran this, and I see this (the list is some ~thousands of files, I guess the entire unpacked root filesystem?)

febootstrap: warning: some host files are unreadable by non-root
febootstrap: warning: get your distro to fix these files:
        /bin/bash
        /bin/cat

I am going to try to reproduce this step with strace to see what the underlying problem is.  Well, that wasn't very useful- I don't see any calls to /bin/bash in the host file system that are failing.

Which version of febootstrap are you using?  (Generally speaking, you
should always try to use a recent version)


My distribution had 2.1-4, but I downloaded febootstrap-3.8 and used that. 

Do /bin/bash and /lib/libc.so.* appear in appliance/supermin.d/hostfiles?


I see /bin/sh and /bin/rbash.  no /bin/bash and no libc.so at all. 
 
Do the paths to the programs / libraries in hostfiles match up with
what is available on the host filesystem?

Hmm, not sure.  i could check this but I'm wondering if the problem I noted above is significant enough that I don't need it.
 
 
Have you installed (on the host) all the packages that are listed in
appliance/packagelist?


I hadn't (zfs-fuse, gfs2 and a few others were missing).  They are installed now.  But it didn't make any difference.

 
Is febootstrap downloading packages which match up with the packages
installed on the host?  You'll have problems if your apt configuration
is significantly different from what is actually installed on your
host, eg. if 'unstable' packages are installed on the host, but the
unstable repo is disabled in sources.list.


Nope, I've got no unstable packages installed.
Rich.

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


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