* Installing grub onto a system with XFS root fs
@ 2007-12-17 0:49 Jason White
2007-12-17 1:07 ` Eric Sandeen
2007-12-17 13:28 ` Martin Steigerwald
0 siblings, 2 replies; 8+ messages in thread
From: Jason White @ 2007-12-17 0:49 UTC (permalink / raw)
To: xfs
I am trying to install Grub onto a system with a single XFS partition serving
as both / and /boot.
Distribution: Debian Unstable (Sid).
Architecture: x86_64
When I run grub-install I get:
Searching for GRUB installation directory ... found: /boot/grub
Due to a bug in xfs_freeze, the following command might produce a segmentation
fault when /boot/grub is not in an XFS filesystem. This error is harmless and
can be ignored.
At this point the install script hangs and the only way to recover is to
reboot the machine (with a hard reset). Needless to say, Grub isn't installed.
Any suggestions?
Note that the installation of grub failed during the Debian installation
process for a reason that wasn't specified (no helpful error message).
I have an x86 "live CD" with grub available if that will help, but it isn't
x86_64.
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Installing grub onto a system with XFS root fs
2007-12-17 0:49 Installing grub onto a system with XFS root fs Jason White
@ 2007-12-17 1:07 ` Eric Sandeen
2007-12-17 1:46 ` Jason White
2007-12-17 13:28 ` Martin Steigerwald
1 sibling, 1 reply; 8+ messages in thread
From: Eric Sandeen @ 2007-12-17 1:07 UTC (permalink / raw)
To: xfs
Jason White wrote:
> I am trying to install Grub onto a system with a single XFS partition serving
> as both / and /boot.
>
> Distribution: Debian Unstable (Sid).
> Architecture: x86_64
>
> When I run grub-install I get:
> Searching for GRUB installation directory ... found: /boot/grub
> Due to a bug in xfs_freeze, the following command might produce a segmentation
> fault when /boot/grub is not in an XFS filesystem. This error is harmless and
> can be ignored.
Hrm, that's funky.
> At this point the install script hangs and the only way to recover is to
> reboot the machine (with a hard reset). Needless to say, Grub isn't installed.
>
> Any suggestions?
>
> Note that the installation of grub failed during the Debian installation
> process for a reason that wasn't specified (no helpful error message).
>
Hard to say - in a nutshell, grub just sucks w.r.t. how it (ab)uses the
filesystem it's trying to install on.
In some invocations, it actually writes directly to the block device
*while it is mounted* - this leads to data corruption and/or filesystem
corruption.
In other cases, in a "verification" phase, it tries to directly read
filesystem structures off the disk *while it is mounted* after a couple
of wishful sync; sync;'s - this often can lead to a grub hang when it
goes off in the weeds on inconsistent disk data that it finds.
I think various distros have tried to hack around these problems in
different ways; the freeze above is probably an effort to coalesce the
filesystem before grub goes groveling around the disk to verify what it
just wrote(!).
If you:
a) don't write to the bdev while mounted
and b) don't try to read the mounted filesystem via the bdev (skip
verification steps)
it should all work ok.
(for fedora grub, a) means passing the path to the stage2 files on the
commandline to grub-install, ymmv):
install --stage2=/boot/grub/stage2 (hd0,7)/grub/stage1 d (hd0)
/grub/stage2 p
(hd0,7)/grub/grub.conf
for some reason this stops grub from writing to the mounted block device.
Otherwise, I'd bug debian - honestly, this isn't an xfs bug.
-Eric
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Installing grub onto a system with XFS root fs
2007-12-17 1:07 ` Eric Sandeen
@ 2007-12-17 1:46 ` Jason White
2007-12-17 3:12 ` Eric Sandeen
0 siblings, 1 reply; 8+ messages in thread
From: Jason White @ 2007-12-17 1:46 UTC (permalink / raw)
To: xfs
On Sun, Dec 16, 2007 at 07:07:11PM -0600, Eric Sandeen wrote:
> Hard to say - in a nutshell, grub just sucks w.r.t. how it (ab)uses the
> filesystem it's trying to install on.
>
> In some invocations, it actually writes directly to the block device
> *while it is mounted* - this leads to data corruption and/or filesystem
> corruption.
>
> In other cases, in a "verification" phase, it tries to directly read
> filesystem structures off the disk *while it is mounted* after a couple
> of wishful sync; sync;'s - this often can lead to a grub hang when it
> goes off in the weeds on inconsistent disk data that it finds.
>
> I think various distros have tried to hack around these problems in
> different ways; the freeze above is probably an effort to coalesce the
> filesystem before grub goes groveling around the disk to verify what it
> just wrote(!).
>
Thanks for the background. The most up to date bug report and discussion I
could find is here:
https://bugs.launchpad.net/debian/+source/grub/+bug/8058
(for Ubuntu).
There are also Debian bugs for this, such as
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=239111
Manually unfreezing the file system with xfs_freeze -u /
worked for me on one machine. (This was done while grub-install was executing,
after it executed xfs_freeze).
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Installing grub onto a system with XFS root fs
2007-12-17 1:46 ` Jason White
@ 2007-12-17 3:12 ` Eric Sandeen
0 siblings, 0 replies; 8+ messages in thread
From: Eric Sandeen @ 2007-12-17 3:12 UTC (permalink / raw)
To: xfs
Jason White wrote:
> Manually unfreezing the file system with xfs_freeze -u /
> worked for me on one machine. (This was done while grub-install was executing,
> after it executed xfs_freeze).
>
>
sounds like a bug in the scripts, then.
-Eric
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Installing grub onto a system with XFS root fs
2007-12-17 0:49 Installing grub onto a system with XFS root fs Jason White
2007-12-17 1:07 ` Eric Sandeen
@ 2007-12-17 13:28 ` Martin Steigerwald
2007-12-17 23:04 ` Jason White
1 sibling, 1 reply; 8+ messages in thread
From: Martin Steigerwald @ 2007-12-17 13:28 UTC (permalink / raw)
To: xfs
Hello Jason,
Am Montag 17 Dezember 2007 schrieb Jason White:
> I am trying to install Grub onto a system with a single XFS partition
> serving as both / and /boot.
>
> Distribution: Debian Unstable (Sid).
> Architecture: x86_64
>
> When I run grub-install I get:
> Searching for GRUB installation directory ... found: /boot/grub
> Due to a bug in xfs_freeze, the following command might produce a
> segmentation fault when /boot/grub is not in an XFS filesystem. This
> error is harmless and can be ignored.
>
> At this point the install script hangs and the only way to recover is
> to reboot the machine (with a hard reset). Needless to say, Grub isn't
> installed.
>
> Any suggestions?
Using grub shell manually always worked for me:
- grub
- find /boot/grub/menu.lst
- root <result from above command>
- setup <place to install too> for example (hd0,0) for first harddisks MBR
Remember to copy over the contents of /usr/lib/grub/i386-pc to /boot
before you do a manual installation.
Ciao,
--
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA B82F 991B EAAC A599 84C7
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Installing grub onto a system with XFS root fs
2007-12-17 13:28 ` Martin Steigerwald
@ 2007-12-17 23:04 ` Jason White
2007-12-18 0:35 ` David Chinner
0 siblings, 1 reply; 8+ messages in thread
From: Jason White @ 2007-12-17 23:04 UTC (permalink / raw)
To: xfs
On Mon, Dec 17, 2007 at 02:28:51PM +0100, Martin Steigerwald wrote:
> Using grub shell manually always worked for me:
>
> - grub
> - find /boot/grub/menu.lst
> - root <result from above command>
> - setup <place to install too> for example (hd0,0) for first harddisks MBR
>
> Remember to copy over the contents of /usr/lib/grub/i386-pc to /boot
> before you do a manual installation.
Thanks.
Apparently there is XFS support in Grub 2 as well, which is where all
development is now taking place. I hope it receives adequate testing and
attention before distributions start using Grub 2.
I'll gladly volunteer to be part of the beta testing once Grub 2 (and its XFS
support) reaches the point of being available for general use and beta
testing.
Also, I've added a note to the Debian bug report on this subject, referring to
this thread.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Installing grub onto a system with XFS root fs
2007-12-17 23:04 ` Jason White
@ 2007-12-18 0:35 ` David Chinner
2007-12-18 22:03 ` Martin Steigerwald
0 siblings, 1 reply; 8+ messages in thread
From: David Chinner @ 2007-12-18 0:35 UTC (permalink / raw)
To: xfs
On Tue, Dec 18, 2007 at 10:04:37AM +1100, Jason White wrote:
> On Mon, Dec 17, 2007 at 02:28:51PM +0100, Martin Steigerwald wrote:
>
> > Using grub shell manually always worked for me:
> >
> > - grub
> > - find /boot/grub/menu.lst
> > - root <result from above command>
> > - setup <place to install too> for example (hd0,0) for first harddisks MBR
> >
> > Remember to copy over the contents of /usr/lib/grub/i386-pc to /boot
> > before you do a manual installation.
>
> Thanks.
>
> Apparently there is XFS support in Grub 2 as well, which is where all
> development is now taking place. I hope it receives adequate testing and
> attention before distributions start using Grub 2.
I just looked at the XFS code in ithe grub 2 CVS repository and had a
read of the wiki (http://grub.enbug.org/).
>From the code and the wiki, I note that there is no indication of grub 2
fixing the worst design mistakes in grub and is persisting with stuffing
around with filesystem internals to find files and get block mappings for
file data. Hence grub 2 will break just like grub if we ever change things on disk
like the inode, directory or extent format. Lucky it doesn't support btree
formats yet, so that won't break if we change them....
And there's plans on doing *journal replay* for filesystems!
(#1 item on the todo list here: http://grub.enbug.org/TodoList). That's
an insane layering violation and completely unsupportable by anyone. I
certainly hope this part of the plan for grub 2 never gets implemented.
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Installing grub onto a system with XFS root fs
2007-12-18 0:35 ` David Chinner
@ 2007-12-18 22:03 ` Martin Steigerwald
0 siblings, 0 replies; 8+ messages in thread
From: Martin Steigerwald @ 2007-12-18 22:03 UTC (permalink / raw)
To: linux-xfs
Am Dienstag 18 Dezember 2007 schrieb David Chinner:
> On Tue, Dec 18, 2007 at 10:04:37AM +1100, Jason White wrote:
> > On Mon, Dec 17, 2007 at 02:28:51PM +0100, Martin Steigerwald wrote:
[...]
> > Apparently there is XFS support in Grub 2 as well, which is where all
> > development is now taking place. I hope it receives adequate testing
> > and attention before distributions start using Grub 2.
>
> I just looked at the XFS code in ithe grub 2 CVS repository and had a
> read of the wiki (http://grub.enbug.org/).
>
> From the code and the wiki, I note that there is no indication of grub
> 2 fixing the worst design mistakes in grub and is persisting with
> stuffing around with filesystem internals to find files and get block
> mappings for file data. Hence grub 2 will break just like grub if we
> ever change things on disk like the inode, directory or extent format.
> Lucky it doesn't support btree formats yet, so that won't break if we
> change them....
>
> And there's plans on doing *journal replay* for filesystems!
> (#1 item on the todo list here: http://grub.enbug.org/TodoList). That's
> an insane layering violation and completely unsupportable by anyone. I
> certainly hope this part of the plan for grub 2 never gets implemented.
Hi David!
I think it may be a good idea to contact the GRUB development team about
your concerns. I bet they won't read this mailing list.
But how do you think GRUB is supposed the kernel and initrd without
knowing at least enough details of the filesystem in order to load the
file. The only other alternative I see is LILO which uses map of the
blocks to load and thus has to be rewritten on any change.
It might be just me, but I cannot recall having trouble with GRUB and XFS
beside that grub-install didn't work. Well grub shell always worked for
me so I didn't bother that much.
Ciao,
--
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA B82F 991B EAAC A599 84C7
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-12-18 22:03 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-17 0:49 Installing grub onto a system with XFS root fs Jason White
2007-12-17 1:07 ` Eric Sandeen
2007-12-17 1:46 ` Jason White
2007-12-17 3:12 ` Eric Sandeen
2007-12-17 13:28 ` Martin Steigerwald
2007-12-17 23:04 ` Jason White
2007-12-18 0:35 ` David Chinner
2007-12-18 22:03 ` Martin Steigerwald
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox