Comment 17 for bug 185878

Revision history for this message
Colin Watson (cjwatson) wrote : Re: GRUB installation fails if installing to non-ext3 partition

I think I've nailed this. From what I can tell, it does *not* actually affect XFS (there may of course be a problem there, but if so it's a different bug), but only filesystem types where grub has explicit knowledge of how to embed its stage 1.5 into them. The complete list of these filesystems is FFS, JFS, ReiserFS, and UFS2.

The problem here is that writing to a partition device (e.g. /dev/sda1) when you still have the disk device (e.g. /dev/sda) open does not then guarantee that you'll get fresh data back when you read from /dev/sda. In order to guarantee this, grub needs to close and reopen the disk device, or (more easily) use the BLKFLSBUF ioctl.