This blog post explains how to boot GRUB from SysLinux. Only GRUB1 is covered, the solution explained doesn't support GRUB2.
Older versions of SysLinux (such as 3.83) don't support booting GRUB, i.e. they cannot load and boot the
stage2 file of GRUB. The newest version of SysLinux contains
chain.c32, which can boot many operating systems and bootloaders, including GRUB. The solution explained here doesn't use this feature, so it works with old versions of SysLinux as well.
The fundamental idea is to convert the GRUB
stage2 file to a format which SysLinux can boot directly. This format is bzimage, the big variant of the Linux kernel image.
grub.exe, part of GRUB4DOS is already in this format, so adding the following lines to
label grub4dos menu label GRUB4DOS kernel grub.exe
However, one might wish to use the original GRUB instead, because GRUB4DOS has some features missing, e.g. it doesn't support GPT (GUID Partition Table) and UUID on reisrefs partitions. Converting the original GRUB
stage2 file to bzimage format is easy: just append it to the first 20480 bytes of
grub.exe. SysLinux can boot this hybrid, but then GRUB wouldn't be able to find its
menu.lst). To fix that, the full pathname of the configuration file has to be embedded to the boot image. The Perl script grub2bzimage.pl automates this.
grub2bzimage is a Perl script which converts the GRUB bootloader code
stage2) to bzimage format, which can be booted directly by SysLinux and
other bootloaders. grub2bzimage.pl doesn't support GRUB2.
Example use to create
$ perl ./grub2bzimage.pl stage2 grubzimg '(hd0,0)/boot/grub/menu.lst'Write this into
label grub menu label GRUB kernel grubzimg
Please note that it's not possible to specify the name of the configfile
append). The configfile has to be specified when
grubzimg is created.
grub2bzimage.pl has been tested with SysLinux 3.83. Please note that newer versions of SysLinux contain chain.c32 which supports loading GRUB stage2 files directly.