Bug#239111: Grub is shockingly bad code
Robert Millan
rmh at aybabtu.com
Mon Jan 12 19:23:52 UTC 2009
On Mon, Jan 12, 2009 at 07:32:49PM +0100, Robert Millan wrote:
>
> 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_.
Grmf. I was making wrong assumptions. This is not about block lists
(I still think block lists suck, but let's be fair...):
#ifdef GRUB_UTIL
/* In the grub shell, access the Stage 2 via the OS filesystem
service, if possible. */
if (stage2_os_file)
{
[...]
if (fwrite (stage2_buffer, 1, SECTOR_SIZE, fp)
!= SECTOR_SIZE)
[...]
}
else
#endif /* GRUB_UTIL */
{
if (! devwrite (saved_sector - part_start, 1, stage2_buffer))
goto fail;
}
So we freeze the filesystem and afterwards try to write to it. Not a good
idea...
#239111 initial report claims GRUB hangs before we added xfs_freeze.diff, but
according to what Rob says, not freezing makes it work for him.
Rob, can you test removing the patch completely?
--
Robert Millan
The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
how) you may access your data; but nobody's threatening your freedom: we
still allow you to remove your data and not access it at all."
More information about the Pkg-grub-devel
mailing list