[syslinux] [PATCH] chain.c32: add support for loading GRUB stage2
Shao Miller
Shao.Miller at yrdsb.edu.on.ca
Mon Jun 28 06:07:48 PDT 2010
Paul Bolle wrote:
> Wouldn't it be better to also document that:
> - 0x802b is ignored by GRUB;
> - 0x8029 represents BSD disk slices (which SYSLINUX doesn't seem to care
> about);
> - 0x8028 is also ignored by GRUB?
>
> (Maybe it should even be mentioned that these four bytes seem to be
> related to the boot_device field in the (current) multiboot
> specification.)
>
> All of this is stuff that is neither obvious nor easily discovered.
That might be worth including. It could go in a trivial patch that also
addresses the odd placement of the */ end-of-comment marker in the
detailed comments.
>
>> + ((uint8_t*) data[ndata].data)[0x20a] = (uint8_t)(whichpart - 1);
>
> 0) This works OK if whichpart is set to non-zero, eg with:
> chain boot 2 grub=stage2
>
> This fails however (ie, 0xff/"whole drive" will be used) if whichpart
> isn't yet set, eg with:
> chain boot grub=stage2
"boot" is only intended to pass the Syslinux INT 0x13 drive number, not
the filesystem's partition's index. Use "fs" to pass both. That is,
passing 0xFF (whichpart - 1 iff whichpart == 0) would be correct, here.
>
> 1) Isn't it better to set [0x209] to 0xff here (ie, "no BSD disk slices
> are used")?
I believe this is found in the GRUB binary; no need to overwrite it with
what it's already got. Might this not be the case for some reason you
can think of?
Paul Bolle wrote:
> I should have added here that this last command can have the identical
> effect as the first command if partition 2 is the SYLINUX filesystem.
Nope. See "boot" versus "fs", above.
- Shao Miller
More information about the Syslinux
mailing list