[Libguestfs] Mounting disk images with ext2 filesystems on RHEL7

Leonard Basuino lenny at releaseonellc.com
Wed Feb 18 14:41:52 UTC 2015


On Wed, Feb 18, 2015 at 6:52 AM, Richard W.M. Jones <rjones at redhat.com>
wrote:

> On Tue, Feb 17, 2015 at 01:37:55PM -0500, Leonard Basuino wrote:
> > I get the following debug info:
> >
> > mount -o /dev/sda1 /
> > [ <time> ] EXT4-fs (sda1): mounting ext2 file system using the ext4
> > subsystem
> > [ <time> ] EXT4-fs (sda1): bad geometry: block count 104388 exceeds size
> of
> > device (103408 blocks)
> > mount: wrong fs type, bad option, bad superblock on /dev/sda1
>
> It looks as if the image is properly corrupt.  My suggestion
> is to try 'virt-rescue' on it.
>
> virt-rescue --suggest -a <image>

Inspecting the virtual machine or disk image ...

This disk contains one or more filesystems, but we don't recognize any
operating system.  You can use these mount commands in virt-rescue (at the
><rescue> prompt) to mount these filesystems.

# /dev/sda1 has type 'ext2'
mount /dev/sda1 /sysroot

So I tried ...

><rescue> mount /dev/sda1 /sysroot
[<time>] EXT4-fs (sda1): mounting ext2 filesystem using the ext4 subsystem
[<time>] EXT4-fs (sda1): bad geometry: block count 104388 exceeds size of
device (103408 blocks)
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
           missing codepage or helper program, or other error

          In some cases useful info is found in syslog - try
          dmesg | tail

I don't think the image is corrupt because a colleague is able to mount it
with guestfish on a RHEL 6 box.


> > This has me wondering because the debug messages from guestfish -v -x
> > indicate it is mouting ext2 with ext4.
> > EXT4-fs (sdb): mounting ext2 filesystem using the ext4 subsystem
>
> This is just the way that RHEL 7 works. ie. CONFIG_EXT4_USE_FOR_EXT23=y
> is now always used.  http://lwn.net/Articles/378913/
>
> Rich.
>
> --
> Richard Jones, Virtualization Group, Red Hat
> http://people.redhat.com/~rjones
> Read my programming and virtualization blog: http://rwmj.wordpress.com
> virt-top is 'top' for virtual machines.  Tiny program with many
> powerful monitoring features, net stats, disk stats, logging, etc.
> http://people.redhat.com/~rjones/virt-top
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20150218/bff7a8bf/attachment.htm>


More information about the Libguestfs mailing list