[syslinux] isohybrid --uefi - resulting EF00 partition too small

Thomas Schmitt scdbackup at gmx.net
Tue Mar 12 11:41:16 PDT 2013


Hi,

> But the question remains: If the El Torito specification limits the
> size of the image to 32MiB, how does it come that my 53MiB image does
> not cause errors when booting?

The specs limit the recording of Sector Count to 32MiB. The boot image
itself may be as large as can fit into the ISO filesystem.

Actually isohybrid.c misuses those two bytes in the boot catalog.
The El Torito specs say about them:
"Sector Count.
 This the number of virtual/emulated sectors the system
 will store at Load Segment during the initial boot procedure.
"
I.e. clearly this is not intended to tell the size of the file.
With your -b image it is set to 4 blocks by option -boot-load-size. 

I assume EFI ignores these bytes anway, because it has its own
ways to interpret the boot image.


The problem of isohybrid.c is that it does not understand ISO 9660.
It tries to gain the necessary info from the simple El Torito
boot catalog. This suffices for isohybrid via MBR, because that does
not need to know the size (and would not find it in Sector Count anyway).
For EFI it's a hack with size limitation to 32 MiB.

(Further it depends on the sequence of -b and -e in genisoimage resp.
 xorriso.)
(And it has implementation flaws, like the mad GPT partition names.
 Your "ISOHybrid ISO ISOHybrid Appl" and "ISOHybrid Apple Appl"
 do not look very sane. Especially since they should be encoded as
 UTF-16LE and not as ASCII.)


I implemented the isohybrid functionality in libisofs because i
honestly believe that it is better suited for the task.
SYSLINUX meanwhile installs MBR files for being read by xorriso.
I am watching this mailinglist and am willing to implement new
hybrid stunts on request.

So my advise to you is to use xorriso >= 1.2.4 and its -as mkisofs
options -isohybrid-mbr, -e , -isohybrid-gpt-basdat.
libisofs underneath xorriso knows the size of the boot images and does
not have to read it from insufficient sources.


> Are there
> any fundamental differences in GNU xorriso and the xorriso provided
> together with libisoburn?

Releases of GNU xorriso and of libisoburn+libisofs+libburn are identical
by source code. It's only their style of compilation and linking that
differs.

For your build system it might be better to use GNU xorriso.
It is easy to compile and can be used by its absolute path without
system-wide installation.
So you have not to fiddle with .so libraries or to de-install packages.

On the other hand i assume that Ubuntu will soon catch up with the
newest library releases.


> So my homework now is:
>  *  reduce the size of the el torito image to <32MiB

Not necessarily. There is nothing bad about the size, except that
it does not fit through a non-official bottle neck of isohybrid.c.


>  *  finally move to the self contained build to be able to use the
>     latest xorriso without contaminating the hosts package management

Get GNU xorriso 1.2.6, untar and perform in its top directory xorriso-1.2.6:

  ./configure && make

Afterwards you can execute it in that directory by the path
  xorriso/xorriso
resp. anywhwere by the absolute path which you get from
  echo $(pwd)/xorriso/xorriso

So your build program just needs the capability to perform xorriso
by such an arbitrary (maybe hardcoded) path.


>  *  use xorriso to build the ISO image in just one step

Yeah. And submit bug reports if anything smells fishy.


Have a nice day :)

Thomas



More information about the Syslinux mailing list