[Libguestfs] libguestfs fails to mount VBox file

Richard W.M. Jones rjones at redhat.com
Mon Sep 6 14:22:11 UTC 2021

On Mon, Sep 06, 2021 at 03:13:03PM +0200, Joerg Schiermeier wrote:
> On Monday, September 6, 2021 at 11:05:43 Richard W.M. Jones wrote:
> > Also is util-linux listed in
> > /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages ?
> "tail /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages" told me:
> sleuthkit
> squashfs-tools
> syslinux
> systemd-sysv
> tar
> udev
> util-linux
> uuid-runtime
> xz-utils
> zerofree
> This means: yes!
> >   supermin --build -v -v -v --copy-kernel -f ext2 --host-cpu x86_64
> >  /usr/lib/x86_64-linux-gnu/guestfs/supermin.d -o /tmp/appliance.d
> > which should produce a lot more debugging and help to see what's going on.
> The output of the command above:
> $ supermin --build -v -v -v --copy-kernel -f ext2 --host-cpu x86_64 /usr/lib/x86_64-linux-gnu/guestfs/supermin.d -o /tmp/appliance.d

Interestingly there is no plain 'mount' command in that output, which
is quite strange.

On Fedora:

  $ ls -l /usr/bin/mount
  -rwsr-xr-x. 1 root root 49048 Aug 17 09:59 /usr/bin/mount
  $ rpm -qf /usr/bin/mount

(util-linux depends on util-linux-core in Fedora so that's how we get
the mount command).

On Debian:


Oh wait, there's no "mount" command in util-linux on Debian!

It turns out it's in a new subpackage called "mount":


Does it fix the problem if you do:

  echo mount > /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/zz-mount

I'm a bit surprised this worked before.  Something must have changed
in the dependencies so we were pulling this in implicitly before and
now we're not.  Anyway the patch below should fix this properly.

diff --git a/appliance/packagelist.in b/appliance/packagelist.in
index b5f9d9dc7..d0c4f52c6 100644
--- a/appliance/packagelist.in
+++ b/appliance/packagelist.in
@@ -75,6 +75,7 @@ dnl iproute has been renamed to iproute2
   dnl syslinux 'suggests' mtools, but in reality it's a hard dependency:
+  mount                     dnl util-linux subpackage containing mount cmd


Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.

More information about the Libguestfs mailing list