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

Paul Bolle pebolle at tiscali.nl
Tue Jun 8 14:30:14 PDT 2010


On Tue, 2010-06-08 at 13:08 -0700, Gert Hulselmans wrote:
> Thomas Bächler wrote:
> If I am right, it would
> > be very useful to be able to APPEND a "root" so that a chainloaded grub
> > can load a configuration file without user intervention.
>
> So you can try if Grub Legacy uses DH to sets its root partition or not:
> 
>   # Set root partition to third primary partition
>   chain.c32 hd0 3 grub=/boot/grub/stage2

I tried to do (something like) that in the drafts of my patch but it
turned out that I didn't have the patience to dissect GRUB's internal
way to tell GRUB's stage2 what it's root drive/partition combination is.

If someone knows this, or would care to learn that part of GRUB's
internals, that _might_ prove useful. I can't yet say, because I
obviously haven't yet tinkered with GRUB's "root" while chainloading
through chain.c32.

For now, my patch should be hard coded to use "(hd0)".

(I guess that might turn out not be true for less common setups, ie
setups that I have not tried myself. Say: stage2 on a CD.)


Paul Bolle




More information about the Syslinux mailing list