[Top] [All Lists]

Re: GRUB doesn't work on CRC enabled fs

To: Markus Trippelsdorf <markus@xxxxxxxxxxxxxxx>
Subject: Re: GRUB doesn't work on CRC enabled fs
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 13 Aug 2013 11:13:32 +1000
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20130812202924.GA354@x4>
References: <20130812202924.GA354@x4>
User-agent: Mutt/1.5.21 (2010-09-15)
On Mon, Aug 12, 2013 at 10:29:24PM +0200, Markus Trippelsdorf wrote:
> Just a heads-up: GRUB currently doesn't work on a CRC enabled
> file-system. It will print the following error message:
>  "not a correct XFS inode"

Yup, that is expected. grub digs around in the on disk format, and
we changed it. So, grub won't work with v5 superblocks.

> GRUB's xfs implementation can be found here:
> http://bzr.savannah.gnu.org/lh/grub/trunk/grub/annotate/head:/grub-core/fs/xfs.c

    if (grub_strncmp ((char *) inode->magic, "IN", 2))
          return grub_error (GRUB_ERR_BAD_FS, "not a correct XFS inode");

So it's failing a magic number test. That means it's read the wrong
location for an inode, so it's getting something badly wrong. Almost
certainly it doesn't grok the new inode format and so isn't finding
the data fork of the inode correctly.

No surprise, really, it hard codes the location and size of the
inode literal area (to 156 bytes or 9 extents) and so will not parse
anything other than a 256 byte version 2 inode correctly. It doesn't
even realise that the literal area might contain an attribute
fork, or that inodes might be larger than 256 bytes.

This pretty much sums up why grub is fundamentally broken...


Dave Chinner

<Prev in Thread] Current Thread [Next in Thread>