[Top] [All Lists]

Re: XFS and grub-0.92

To: Ethan Benson <erbenson@xxxxxxxxxx>
Subject: Re: XFS and grub-0.92
From: Derek J Witt <djw@xxxxxxxxxxxxxx>
Date: Wed, 10 Jul 2002 07:51:23 -0500
In-reply-to: <20020709231817.B32081@xxxxxxxxxxxxxxx>
References: <20020710061931.GA18472@xxxxxxxxxx> <200207100551.g6A5pX5G003057@xxxxxxxxxxxxxxxxxxx> <20020710061931.GA18472@xxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
Good morning, everyone.

A few months back I wrote a patch that will check the partition type of one's root partition (according to the command line or lilo.conf). It checks the first 4 bytes of the partition. If 'XFSB' is found, lilo will then abort with an error. I also created another parameter for those wanting to 'force' lilo to install. In that case, LILO will then display a message that the user must be prepared to run xfs_repair from a boot disc. I also submitted that patch to LILO's maintainer. He said he will include this in his next release of LILO. Back then, LILO was at 22.1 (afaik). It may be included in one form or another in the beta version.

But the bottom line here, if it's an XFS partition, do not install a boot loader on that partition's sector 0. This is in the FAQ ;-) I've done that same mistake until it kicked in (took me three tries).

-- Derek Witt, djw@xxxxxxxxxxxxxx

At 02:18 10-07-02, you wrote:
On Wed, Jul 10, 2002 at 04:19:31PM +1000, Ian Cumming wrote:
> Hi Kelledin,
> I've found this problem too. I tried to install grub onto the root
> partition of a drive, and was not able to boot (with the same error).

thats because you just scribbled the XFS superblock.

> It appears that you cannot install grub onto the root partition without
> corrupting the XFS fs. However, I can install grub into the MBR of the
> drive, and successfully boot from the root partition in this manner.

that is correct.  XFS puts its superblock right at block zero of the
partition instead of block 2 like ext2 (which leaves 1024 bytes of
unused space at the start of the partition for things like

> My knowledge of this problem is very limited, because I could not afford
> to break my system again by investigating it! With this in mind, I can
> only offer an anecdotal intepretation of the problem, howerver I am sure
> that others in this list can offer a far better explanation.

you must install the first stage bootloader in the MBR, you must not
install it on the partition if that partition is XFS, you WILL destroy
the XFS superblock.

this is the same `bug' people kept reporting in lilo until someone
finally patched it (im not sure that patch ever made it upstream) to
check for XFS and refuse to proceed if its detected.

Ethan Benson

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