Bug#239111: Grub is shockingly bad code
Robert McQueen
robot101 at hadesian.co.uk
Mon Jan 12 18:48:50 UTC 2009
Robert Millan wrote:
> Hi Rob,
Hi Robert,
> You just convinced me that this is completely fucked up. This is not the
> first time someone claims to have fixed this problem, only to discover that
> it wasn't, and I'm not going to gamble with ioctls, freeze/unfreeze combos
> or Linux version checks.
We all know this is fucked up. :) I'm not claiming to fix anything so it
somehow works flawlessly. I just want to avoid my system being locked up
when I follow the instructions in NEWS.Debian. So the changes I'm
proposing for lenny are just:
a) change the Debian XFS hack to grub-install so that it does "copy
stage files; freeze; unfreeze; install grub" rather than "copy stage
files; freeze; lots of shit; unfreeze" which is guaranteed. I don't
care if it *works*, but it will at least print me an error message
which is fine because everyone who has Grub and XFS probably
installed it manually once anyway. Anyway, Ben's simpler patch (just
xfs_freeze followed by unfreeze) probably *does* work on lenny and
at least fails gracefully on etch. I'll test it.
b) clarify the documentation in NEWS.Debian which encourages people to
run "grub-install" unequivocally, so that it tells people with an
XFS /boot filesystem to either upgrade after rebooting, or upgrade
later. If you can tell me which kernel versions that etch's Grub can
boot, I can propose a patch.
For what it's worth I've chatted to XFS developers on IRC (Eric Sandeen
amongst others) and pointed them to this bug, and they agree with my
suggested approach here.
> I (and upstream in general) believe that the only right way to rely on a
> hardcoded list of blocks that live inside a filesystem is _not to_.
You're in 100% agreement with the XFS developers here.
> I'll see if it's feasible to make it use embedding, and if not, XFS support
> in GRUB Legacy will be terminated, and users will be advised to either
> leave /boot/grub untouched or upgrade to GRUB 2.
Maybe sensible, but I suggest the above two changes are made as well to
avoid fucking people's systems if they /do/ run grub-install, because
the current Debian XFS hack makes things much much worse than upstream.
Regards,
Rob
More information about the Pkg-grub-devel
mailing list