Emilio Lazo Zaia
2010-Jun-18 05:52 UTC
[syslinux] Multiboot pendrive with GPT - a tricky solution which could improve syslinux behavior
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
H. Peter Anvin
2010-Jun-18 06:50 UTC
[syslinux] Multiboot pendrive with GPT - a tricky solution which could improve syslinux behavior
On 06/17/2010 10:52 PM, Emilio Lazo Zaia wrote:> 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. >This is in fact doubly wrong. Syslinux proper is in fact partition-format-agnostic (with the sole exception of chain.c32)... it doesn't care about the partition table format *at all*. Even when using an MBR partition table, it can support logical partitions (> 4). The only thing needed to boot Syslinux with GPT is to have a GPT MBR. chain.c32 *does* need to be updated to support GPT; this is in fact my next Syslinux task before 4.00 release. -hpa -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.