Comment 150 for bug 441941

Revision history for this message
Colin Watson (cjwatson) wrote : Re: [Bug 441941] Re: grub fails after running Windows

On Sat, Aug 28, 2010 at 02:21:17PM -0000, Ralph Ulrich wrote:
> @Colin, is this attempt of yours - to run after that misbehaving
> application developers - really a clean solution.

I've been thinking (well, mostly despairing) about this bug for nearly a
year now, on and off. I haven't done anything about it because all the
solutions I could think of were either impractical or would introduce
different problems that would be significant in themselves. This is the
first approach I've thought of that I could deploy with relatively
little effort, and push to stable releases with a very low probability
of disruption.

> Wouldn't it be great to have an additional feature for all boot
> capeable Linux filesystems:
>
> - keep the first 32Kib empty and reserved for grub if there is an
> additional flag (boot) set when mkfs

If you want me to redesign the world, then this bug will never be fixed.
I am a relatively pragmatic developer and would prefer something that's
possible right now.

Besides, your proposed approach has a different fundamental flaw: it
relies on the partition in question residing early enough on the disk
that the BIOS can read it. By contrast, using GRUB 2's ata module it is
possible to boot from a partition later than that barrier provided that
core.img is installed near the start. This is relevant to dual-booters
because Windows is usually already installed at the start of the disk
and cannot easily be moved further forward.

I'm convinced that the embedding area is a fundamentally better place
for a boot loader to live; we just need to work around issues like this
one. Such a workaround requires no changes whatsoever to GRUB's
diskboot assembly code, merely a relatively trivial change to
grub-setup, and would not change any other properties of GRUB's booting
arrangements. To me, this makes this an attractive solution even if it
does involve a certain amount of chasing.

> This flag could be the default for all partitions on non embedded,tiny
> systems.

If you'd like to take this up with filesystem developers, by all means
feel free. I'm not going to wait for it with respect to this bug,
though.

If you'd like to discuss this further, then please take it to private
e-mail. This bug is already very long, and I don't want to distract
people from supplying the specific information I've asked for.