[syslinux] [PATCH] chain.c32: add support for loading GRUB stage2

Gert Hulselmans gerth at zytor.com
Mon Jun 28 03:03:16 PDT 2010


Paul Bolle wrote:
> 1) The code in stage2/asm.S seems to hold all (or most?) information
> available for GRUB's stage2 (which can be found at 0x820:0x0 and up once
> stage2 is loaded).
>
> 2) For this discussion install_partition and config_file are the most
> relevant.
>
> 3)install_partition somehow stores a value for GRUB's "root" (but I
> haven't yet figured out how it does that, so the current code is hard
> coded to use a value meaning "(hd0)" in GRUB's syntax).
>
> 4) config_file might be interesting. It allows to store a string with
> the path of GRUB's configuration file (eg, "(hd0,1)/menu.lst", at
> 0x820:0x17, with a maximum length of 89 bytes). So, if chain.c32 knows
> about the disk and partition it is reading its files from (and it is
> possible to reliably translate that information to GRUB's syntax) it
> might be an idea to add another option to chain.c32. Say, something
> like:
>     menu=foo
> which would set the config_file string (in the copy of stage2 in memory)
> with a valid GRUB path to the file "foo" in the syslinux file system.
>
> Would that be feasible?
>
>
> Paul
>
I added support for passing the install_partition to chain.c32.

It is already committed (and available in Syslinux-4.00-pe64.



More information about the Syslinux mailing list