Skip to contentSkip to conversation

GRUB doesn't work on CRC enabled fs

DISCUSSION Markus Trippelsdorf 2 participants 2 messages Aug 12, 2013 – Aug 13, 2013

lore
Share & tools
lore
#1 lore raw
Quoted 3 lines · Markus Trippelsdorf

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.

Quoted 2 lines

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...

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs