[syslinux] Multiboot pendrive with GPT - a tricky solution which could improve syslinux behavior

Emilio Lazo Zaia emiliolazozaia at gmail.com
Thu Jun 17 22:52:32 PDT 2010


Hello!

I'm posting some experiences with GRUB0/1 + sys/extlinux + MBR/GPT in a
pendrive with 15 partitions. This could be helpful improving
sys/extlinux.

I did make a bootable pendrive with 14 distros using a GPT partition
table and a tricky solution to let sys/extlinux boot from every
partition chainloaded from GRUB (GRUB0 or GRUB1).

Having a MBR schema, sys/extlinux can't be chainloaded from GRUB in a
partition >4, right? in my case, with a GPT schema, sys/extlinux never
can't be chainloaded from GRUB0/1.

Using GPT partition table, the trick consists in converting every
partition as a primary partition into the MBR using gdisk's hybrid
option so the physical location of the partition being the same but
referred in a different way (indeed, in the 'legacy' or hybrid MBR). I
did take the 16 bytes corresponding to this partition and wrote them
into the generic mbr.bin provided by syslinux (enabling the boot flag
and filling with 0's and 0xAA55 in its corresponding places).

This new 512-bytes 'boothelper' file will lie in its corresponding
partition. This file _can_ be sucessfully chainloaded from GRUB
(chainloader /boothelper)! The distro's splash screen will be shown and
sys/extlinux prompt also, else the distro can boot.

If we repeat this process for every distro (every distro which
originally boots from the .iso image with sys/isolinux) in a pendrive,
we have many 'boothelper' files, each one in its own partition and all
of them can be chainloaded correctly from GRUB, no matter how buggy our
version of GRUB is.

Awaiting for your comments...
Good bye.

-- 
Emilio Lazo Zaia
Universidad Central de Venezuela




More information about the Syslinux mailing list