[syslinux] Is efiboot.img required?

Thomas Schmitt scdbackup at gmx.net
Sun Apr 5 04:14:37 PDT 2015


Hi,

i wrote:
> > Well, it is about really usable capabilities of isohybrid,

Ady wrote:
> but their practical combination, usage, effects, 
> goals... are not expressed clearly enough for the common user to put in 
> practice.

How to express the embarrassing fact that ISOLINUX is
not ready for UEFI but isohybrid is ?

  http://www.syslinux.org/wiki/index.php/Isohybrid#UEFI
would need a statement like:
"The SYSLINUX project cannot yet provide a FAT filesystem
 image which would work with the isohybrid feature.
 Known isohybrid ISOs for UEFI employ FAT images which
 contain software from bootloader projects GRUB or GRUB2."

This would not help any user, of course, without a clue
how to make the necessary FAT image.


> stating to common users "these are the steps, and these are the 
> commands so to arrive to X goal (aka "HowTo").

I do not know how the maintainers of distro ISO production
produce their FAT images. I know that they contain GRUB/GRUB2
software.
Fedora's FAT /isolinux/efiboot.img based on GRUB Legacy (0.97)
seems to contain some configuration files. Debian's FAT image
/boot/grub/efi.img contains only the UEFI-defined start program
/efi/boot/bootx64.efi from GRUB2 (1.99).


> The "efi.img" is what 
> GRUB2 does, which doesn't mean that every bootloader must use the same 
> method (nor that Syslinux currently supports all potential use-cases of 
> any-and-every resulting isohybrid image).

The image file name is at the discretion of the ISO producer.
Its formatting as MS-DOS-ly FAT filesystem image and the FAT
path /efi/boot/bootx64.efi are prescribed by UEFI specs.
The program bootx64.efi is supposed to start the boot
process. I understand from the sparse content of Debian's
amd64 FATs that GRUB2's bootx64.efi can interpret ISO 9660
and find its configuration files in there.


> wrongly, suggests [...] that the 'syslinux.efi' is lacking
> such "important" feature. 

This is what i understand from SYSLINUX being unable to boot
from ISO 9660 via UEFI. The EFI related software of SYSLINUX
seems not to be prepared to work with ISO 9660 after it was
started from the FAT in the EFI System Partition.


> Let's assume that 'syslinux.efi' receives support for ISO9660 and 
> for UDF in some future version.

UDF is more complicated than ISO 9660 and not much in use
for bootable images. Support for ISO 9660 in SYSLINUX EFI
software would be great, because EFI specs explicitely
mention the boot path via El Torito on optical media.
UEFI 2.4 9.3.6.2:
"The CD-ROM is assumed to contain an ISO-9660 file system and
 follow the CD-ROM El Torito format."


> In this hypothetical situation, there is no need 
> for an "efi.img" to be included in the ISO image.

http://www.uefi.org/sites/default/files/resources/2_4_Errata_B.pdf
chapter 5 defines the expectations of UEFI.

For booting UEFI from optical medium, you need an
El Torito catalog entry for Platform Id 0xef pointing
to the FAT filesystem. Traditionally the El Torito boot
images are data files inside the ISO filesystem. But they
could as well be appended to the image after the end of
the ISO filesystem.

For booting UEFI from USB stick you need the FAT filesystem
in a partition (the EFI System Partition).
UEFI 2.4 offers two forms of partitioning:
- Legacy:
  One to four MBR partitions. One of them bears the type 0xef.
- GPT:
  Only one MBR partition, starting at LBA 1 and ending
  at the end of the ISO image. It must bear type 0xee.
  The EFI System partition is then marked by a GPT
  partition with type GUID
    C12A7328-F81F-11D2-BA4B-00A0C93EC93B
Both alternatives demand neat partitioning. Especially
no nested partitions.

isohybrid violates UEFI by combining both methods and
by nesting partitions. The motivation for this is given by
Matthew Garrett in
  http://mjg59.dreamwidth.org/11285.html
I made a lengthy analysis about Debian's sins and improvement
options in
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=776317#75


> With these made-up assumptions, the ISO image 
> could have the same "EFI/BOOT/BOOTX64.EFI"

UEFI 2.4. does not promise any capability of the firmware
about ISO 9660, except the capability to recognize and
interpret El Torito boot sector and El Torito catalog.
The magic (architecture dependent) path EFI/BOOT/BOOTX64.EFI
must be presented inside a FAT filesystem.


> > All EFI isohybrid images known to me contain
> > /efi/boot/bootx64.efi from GRUB Legacy or GRUB2.
 
> For some hypothetical support of UEFI booting optical media and/or 
> dd'ed isohybrid images, yes, that is currently the case in the Linux 
> world. But if I would want to use a FAT-formatted ESP, I could use 
> 'syslinux.efi' (and/or others too), whether the ISO image is 
> "isohybrid" or not.

Of course, piranna could set up an EFI capable disk boot
image by help of SYSLINUX. But that would not boot from
optical media.
The EFI isohybrid feature is to mark the ESP by both,
El Torito and partition table.


> I have nothing against any bootloader, but IMHO it would not be 
> appropriate to add to the same Isohybrid page in the official Syslinux 
> wiki all this data. 

It currently boils down to: No GRUB = no UEFI from ISO 9660.


> posts / articles / blogs [...] tend to mix, without clear 
> discernment, "UEFI specs" together with "the way GRUB2 does it"

It is not that GRUB would do something special with
booting UEFI (except that the ISOs made by grub-mkrescue
have the prescribed neat partition tables).
It is rather that no way is known how to let SYSLINUX
understand the ISO 9660 filesystem outside of its ESP.
(Ain't there any way to put enough ISOLINUX brain into
 the ESP so that it is smart enough ?)


> _ clearly present generic capabilities of "isohybrid" images;

ISOLINUX-only isohybrid is only suitable for BIOS firmware.

> _ differentiate what _isohybrid_ itself can and cannot do

It equips ISO 9660 filesystem images with partition tables
which point to the software for the initial boot stage.
It cannot create the FAT image for the EFI System Partition.

> _ clarify the existence of different isohybrid variants

I think that this is explained in wiki/index.php/Isohybrid.
(But it is not explained *why* there are still two isohybrid
 programs in the SYSLINUX releases.)

> _ present the command line options with a minimal very short 
> description, linking to man pages and similar official documentation 
> for further reading;

The only non-expert option is --uefi.
There is no further non-expert documentation known to me.

> _ generic examples of isohybrid steps / commands;

For BIOS-only, the user makes the ISO according to
  http://www.syslinux.org/wiki/index.php/ISOLINUX
and applies the isohybrid program.
Or the user makes the ISO by xorriso and lets it do the job
of isohybrid already when creating the ISO.

For UEFI there are examples with genisoimage and xorriso
in wiki/index.php/Isohybrid, plus a mkisofs equivalent of
genisoimage option -e.


> _ Optional: "See also" with links to updated official support 
> information provided by popular well-documented distros;
> _ Optional: "See also" with popular articles / HowTos / other wikis 
> related to isohybrid,

There are none. At least not on user level.


> Unfortunately, there is a tendency for users to approach The Syslinux 
> Project with questions that should be placed to their respective 
> communities. I'd rather not encourage such behavior.

The communities are hardly of help with boot topics.
Typically you only get a collection of urban legends as reply.
Those who know do neither document nor hang out at the
support forums.


Have a nice day :)

Thomas



More information about the Syslinux mailing list