[Libguestfs] libguestfs fails on FreeBSD9.3, MINIX3 qcow2 images
Richard W.M. Jones
rjones at redhat.com
Thu Sep 18 22:13:00 UTC 2014
On Thu, Sep 18, 2014 at 03:38:05PM -0400, Assaf Gordon wrote:
> Hello Richard,
>
> On 09/18/2014 02:47 PM, Richard W.M. Jones wrote:
> >Note that you can do useful things with libguestfs without necessarily
> >needing inspection to work. Libguestfs will open any disk image, but
> >without inspection you won't be able to detect OSes in the disk image
> >nor map devices to mountpoints, unless you do it yourself.
>
> Two more related issues:
>
> -1-
> With minix, "virt-df" returns negative values:
>
> =====
> $ virt-df -a ./minixR330.qcow2
> Filesystem 1K-blocks Used Available Use%
> minixR330.qcow2:/dev/sda5 2075188 11892 2063296 1%
> minixR330.qcow2:/dev/sda6 1215924 -94776 1310700 -7%
> minixR330.qcow2:/dev/sda7 1895536 312296 1583240 17%
> =====
virt-df should never print negative numbers like this. So this is a
bug -- please file it using the link from the http://libguestfs.org
front page.
> -2-
> With the FreeBSD, "guestfish" can't mount the "ufs" filesystem:
> =====
> $ guestfish -a ./freebsd93.qcow2
> ><fs> run
> ><fs> list-filesystems
> /dev/sda1: unknown
> /dev/sda2: ufs
> /dev/sda3: unknown
> ><fs> mount-ro /dev/sda2 /
> libguestfs: error: mount_ro: /dev/sda2 on / (options: 'ro'): mount: wrong fs type, bad option, bad superblock on /dev/sda2,
> missing codepage or helper program, or other error
> In some cases useful info is found in syslog - try
> dmesg | tail or so
> =====
>
> The "dmesg" (from without guestfish) shows this:
> =====
> [ 17.052574] You didn't specify the type of your ufs filesystem
> [ 17.052574]
> [ 17.052574] mount -t ufs -o ufstype=sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep ...
> [ 17.052574]
> [ 17.052574] >>>WARNING<<< Wrong ufstype may corrupt your filesystem, default is ufstype=old
> [ 17.068725] ufs_read_super: bad magic number
> =====
This one is a fairly well-known problem in the Linux kernel / *BSD
filesystem. See:
http://libguestfs.org/guestfs-faq.1.html#ufs-disks-as-used-by-bsd-cannot-be-opened
There's no good answer to this except for BSD to start properly
identifying all the variants of UFS.
Rich.
--
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.
http://fedoraproject.org/wiki/MinGW
More information about the Libguestfs
mailing list