[syslinux] isohybrid --mac doesn't find the mac efi image

Thomas Schmitt scdbackup at gmx.net
Sat Feb 8 14:09:30 PST 2014


Hi,

> http://bugzilla.syslinux.org/show_bug.cgi?id=49

The xorriso run shown there would nearly suffice to leave
out the run of isohybrid --mac.
One would just have to attribute -isohybrid-apm-hfsplus to
-e boot/macboot.img.

I re-arranged your options to emphasize which ones apply
to particular boot images:

xorriso -as mkisofs -J -R -l -V UEFI_TESTING \
  -o ../image.iso \
  -isohybrid-mbr /usr/share/syslinux/isohdpfx.bin \
  -c isolinux/boot.cat \
  -b isolinux/isolinux.bin \
     -no-emul-boot -boot-load-size 4 -boot-info-table \
  -eltorito-alt-boot \
  -e boot/efiboot.img \
     -no-emul-boot -isohybrid-gpt-basdat -isohybrid-apm-hfsplus \
  -eltorito-alt-boot \
  -e boot/macboot.img \
     -no-emul-boot -isohybrid-gpt-basdat -isohybrid-apm-hfsplus \
  ../cdmaster

I am not sure whether it is appropriate to apply -isohybrid-apm-hfsplus
to efiboot.img. But that's what the inventor of this setup describes in
  http://mjg59.dreamwidth.org/11285.html
and what isohybrid.c does in initialise_apm().

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

As for the failed isohybrid run:

> # isohybrid --uefi --mac image.iso
> isohybrid: image.iso: unable to find mac efi image

http://git.kernel.org/cgit/boot/syslinux/syslinux.git/tree/utils/isohybrid.c?id=syslinux-6.03-pre1

Line 978 gets executed if read_efi_section() did not see an
El Torito Section Header with platform id 0xef.
It expects such a header after having already seen one, that
was followed by a Section Entry which described efiboot.img.

AFAIK, mjg creates Fedora-LiveCD.iso by help of an enhanced
genisoimage, which knows option -e. Probably, isohybrid.c
relies on the output of this program.

To my interpretation of El Torito specs, there should not be
one Section Header per Section Entry as long as the entries
belong to the same platform id and id string. El Torito 1.0 states:
"2.3 Section Header
 If the CD was created for a machine with a BIOS incorporating this
 specification, the Section Header precedes a group of entries from
 which the BIOS may boot the computer. The section header has an
 identification string. If the BIOS understands the ID, string it
 may choose to boot the system using one of these entries in place
 of the INITIAL/DEFAULT entry."
(INITIAL/DEFAULT entry describes isolinux.bin, with platform id 0
 = "80x86". Actually this means PC-BIOS.)

So probably isohybrid.c should look in the Section Header at
byte offset 2 for the 16-bit little-endian count of Section Entries.
If it is 2, then it can directly call read_efi_catalogue(), to get
the mac_lba.

The code which causes xorriso to produce a section with two
entries is in
  libisofs/eltorito.c, function catalog_open()
It should suffice to replace the loop
         for (j = i + 1; j < cat->num_bootimages; j++) {
             ...
         }
by
         j = i + 1;
to get one entry per section.

But before i implement an option for that, i'd like to see a better
reason, than just isohybrid.c expecting it. (It also expects that
512 == 2048 and that C compilers by miracle know that a string
constant is actually meant as UFT-16 characters.)

I am open for learning that it is worth to be done.


Have a nice day :)

Thomas



More information about the Syslinux mailing list