On Wed, Feb 18, 2015 at 09:41:52AM -0500, Leonard Basuino wrote:
On Wed, Feb 18, 2015 at 6:52 AM, Richard W.M. Jones
<rjones(a)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 is pretty strange, and may, I suppose, indicate a kernel bug of
some kind. I imagine it's possible that (a) the ext4 driver doesn't
understand some very obscure ext2 feature, and (b) since hardly anyone
uses ext2, this bug has never been discovered before. Or it may be as
Pino says that the filesystem is really truncated and ext4.ko is
correctly moaning about that, but ext2.ko in RHEL 6 ignored it.
Does running `e2fsck -n /dev/sda1' under virt-rescue show up any
errors?
Anything interesting in the output of `tune2fs -l /dev/sda1'?
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html