[syslinux] isohybrid boot from logical partition

Thomas Schmitt
Fri, 30 Dec 2016 08:34:53 -0000

Hi,

Duncan Elliot wrote:
> Taking the point that "Syslinux is partition-table-format
agnostic"

I don't agree with hpa here. SYSLINUX expects MBR partition table entries
with absolute addresses. Those are exactly the primary partition entries.
That's not what i would call agnostic.

But i agree with his assessment that it is very cumbersome to find the
own partition start if the "DS:SI" protocol hands over a raw partition
table entry that describes a logical partition.


> I'm guessing that any "fix" that should be made, should be on
the GRUB
> side, rather than in the isohybrid side?

One could ask at help-grub at gnu.org whether there is already a feature to
change the forwarded partition table entry from relative LBA to absolute
LBA.
The necessary information is supposed to be available when GRUB prepares
the chainloading.

Developement of such a feature would need some initial effort.
Besides learning the assembler language one would have to find and
understand GRUB's chainloading code and the place where "DS:SI" is
prepared.


Didier Spaier wrote:
> > Sorry if this is a silly question: why not use a GUID partition
> > table instead of using logical partitions?

Duncan Elliot wrote:
> Not a silly question, I had the same idea and had tried it out but it
> didn't work (same error msg).

This would be a SYSLINUX bug. After all the partok isohybrid MBR does have
code for reading the start LBA from a GPT entry.

I am wondering about the meaning or reason of "+20" in this assembler
line:

  movl    (32+20)(%si), %ecx

Why that extra offset 20 on the byte offset 32 which is specified by
GPT specs (UEFI 2.4, 5.3.3) ? (Do i get the language wrong ?)

It would be interesting to see the complete content of %si as perceived
by the isohybrid MBR. (At least up to its byte 59.)

(Beginning to read about the language of "gas" i am oscillating
between
nostalgy and shudders. Three cheers for the C language !)


Have a nice day :)

Thomas