[syslinux] 32-bit and 64-bit UEFI syslinux in the fallback location on the same ESP

Ady ady-sf at hotmail.com
Thu May 14 04:06:23 PDT 2015

> Hi,
> FYI I've tried to add support for *both* 32-bit and 64-bit UEFI in
> Tails, with syslinux 6.x installed on the same device, and failed.
> My initial requirement is that the 32-bit and 64-bit bootloaders must
> both be installed in the fallback location, on the same ESP.
> My starting point is that syslinux 6.x 64-bit UEFI is installed in the
> fallback location (EFI/BOOT/bootx64.efi) and works fine.
> The blocker I've experienced is the naming of the syslinux modules:
> syslinux modules are called just the same (*.c32), regardless of the
> target architecture.
> So:
> * Did I miss an obvious solution to this problem? e.g., but not
>   limited to:
> * Is it possible to instruct a syslinux UEFI bootloader (e.g.
>   the 32-bit one, installed in EFI/BOOT/bootia32.efi) to load its
>   modules from a different directory?
Using the PATH directive is one possibility (but not the only one).
> * Is it possible to rename the modules (e.g. to give them an
>   architecture-specific suffix/extension/prefix/whatever) and to tell
>   syslinux about it somehow?
Yes and no. This has been already discussed repeated times (a lot), it 
will not happen in official Syslinux. The only module that uses a 
different filename extension is ldlinux.{c32,e32,e64}.

Renaming the filename extension is:
_ not recommended for common modules;
_ generally speaking, not supported;
_ there is no (current?) way to use the Library modules (dependencies) 
if they are renamed, as the main modules won't find them.

The name of a c32 module can only be changed if the module is not a 
dependency. Therefore, separated directories can only be avoided when 
c32 dependency modules are not needed. For instance, (vesa)menu.c32 
needs other c32 modules (as of v.6.03), so if you are using 
(vesa)menu.c32 and multiple firmware's architectures, there is no point 
in renaming c32 modules, as a separated directory will be needed 

> In the meantime, FWIW my current "solution" is to install GRUB2
> i386-efi as the fallback bootloader for 32-bit UEFI, and use its
> syslinux configuration support to provide a similar menu to our
> existing syslinux 64-bit UEFI one. Seems to work just fine, but I've
> only conducted limited testing so far.
> Input welcome :)
> Cheers,
> -- 
> intrigeri
Some time ago I proposed a solution to allow Syslinux to 
_automatically_ load different configuration files depending on 
firmware's architecture, which would help in this type of situation, 
either by means of using different CWDs or by means of absolute paths. 
Unfortunately, the solution is not included in Syslinux 6.03, and the 
"if*.c32" modules are of no use under UEFI (as of v.6.03), so there is 
no _automatic_ selection available (as of official version 6.03).

A _manual_ selection is possible. The following is one alternative, but 
there are other possibilities available too.

1_ The respective syslinux.efi files should be copied into 
"/EFI/BOOT/", as "BOOTX64.EFI" and "BOOTIA32.EFI" respectively.

2_ The "ldlinux.{e32,e64}" files should also be copied into 

3_ A minimal "EFI/BOOT/SYSLINUX.CFG" could be something similar to:

 SAY Select UEFI architecture:
 SAY Press [Enter] for 64-bit UEFI (default); or,
 SAY type-in IA32 [Enter] for 32-bit UEFI.
 # Optionally, change the values of the timer and the prompt,
 #  or avoid them, according to the desired behavior.

4_ Under "/EFI/BOOT/", the "IA32" and "X64" subdirectories would 
contain the respective <efi-arch>.cfg files and the respective c32 

Note that the PATH directive accepts only absolute paths (in fact, 
there is a bug, #58, regarding some absolute paths when also using the 
PATH directive, so there is a chance that some absolute paths would 
need to be transformed to relative paths in every cfg file for this 
method to work in v.6.03 - feedback is welcome :).



Of course, the "common.cfg" can be named something else, e.g. 

As I said, there are other alternatives, and some of them do not need 
the PATH directive. I am just posting one possibility, but it does not 
mean I am recommending this alternative over others.

To be clear, even if my proposal [1] and its patch [2] would be 
implemented, or even if some "if*.c32" module would be available for 
UEFI (or for both, BIOS and UEFI firmwares' architectures), at least 
the c32 library modules (when/if needed) would still need their own 
separated directories.

References, FWIW:


 Bug #58
> _______________________________________________
> Syslinux mailing list
> Submissions to Syslinux at zytor.com
> Unsubscribe or set options at:
> http://www.zytor.com/mailman/listinfo/syslinux

More information about the Syslinux mailing list