[syslinux] where to swap

Thomas Schmitt scdbackup at gmx.net
Sun Mar 26 02:15:48 PDT 2017


Hi,

i wrote:
> > I think it still has good reason to exist.

Ady wrote:
> Would you please clarify what do you mean with "it"?

"It" was the code part about

     xor     %cx, %cx        /* Clear EBIOS flag. */

which Martin mentioned as "can be ignored" in the the text which i
quoted before my statement.

Additionally to the wrong stack sequence, which prevented booting on
David's BIOS, we stumbled over the problem that the experimental MBR
"isohdpfc" wrongly told isolinux.bin to use LBA addressing, although
the MBR code had decided to use C/H/S addressing for itself.
This misunderstanding could happen in real operation if the BIOS returns
an unexpected signature in its reply to INT 13 AH 41 together with
non-zero content in the CX register.

Martin made sure in the proposed successful fix that CX is set to 0 if
the MBR decided for C/H/S. So isolinux.bin cannot get the wrong
impression that LBA addressing is to be used.
I just wanted to support this particular code aspect.

-----------------------------------------------------------------

For me the proposed and successfully tested fix looks ok.
But my barebone assembler experience is less than a week old.

David tested it on a C/H/S needy BIOS. I tested on SeaBIOS of qemu
which supports LBA addressing.

Others are invited to test whether their favorite isohybrid ISO still
boots from USB stick after its first 432 bytes were replaced by
  http://www.ludd.ltu.se/~ams/tmp/isohdpfx.bin.170324

The changelog in git
  https://git.kernel.org/pub/scm/boot/syslinux/syslinux.git/log/mbr/isohdpfx.S
gives the impression that the stack interface between isohdpfx.bin and
isolinux.bin is unchanged at least since SYSLINUX 3.82-pre2, 2009-05-31.
So the new MBR should work with isohybrid ISOs made by that version
or by younger ones.

It is worth a try to first inquire the version of isolinux.bin in the
ISO before patching in the new MBR. On Debian's ISO i get:

  $ strings /mnt/iso/isolinux/isolinux.bin | grep ISOLINUX
  ISOLINUX 6.03 20150819 


Have a nice day :)

Thomas



More information about the Syslinux mailing list