[syslinux] What's the best way to get Syslinux to boot efi?

Ady Ady ady-sf at hotmail.com
Fri Aug 19 18:04:04 PDT 2016

> Sorry thinking about this problem at work, I'm using my cellphone. Won't
> get home until 1am.
> I run Gentoo.
> https://wiki.gentoo.org/wiki/Syslinux#Setup_on_EFI_systems
> is my distribution instructions on installing Syslinux.
> http://www.syslinux.org/wiki/index.php?title=Install#UEFI
> are your instructions.
> I have tried both instructions only to get a blank or black screen.
> Trying to make a bootable usb that will boot with efi so I can run
> efibootmgr.
> Just wondering which is correct, or should I uninstall gentoo's Syslinux,
> download it and compile it, and follow your website's instructions. Not
> having much luck in their forums.

The instructions in the respective wiki pages are not conflicting each 
other; you just need to read them carefully.

The instructions in Gentoo's wiki suggest mounting the "EFI System 
Partition" on a specific path ("/boot/efi"), and then it is suggested 
to create a (sub)directory on it.

If your OS (Gentoo) on which you are executing the instructions is 
already booted in UEFI mode, the (sub)directory that is being suggested 
is "EFI/syslinux/". That is:


Since the root of the ESP was mounted as "/boot/efi", then the path at 
this time in your OS is seen as:


Later in the instructions, this new (sub)directory ("EFI/syslinux/") is 
used in the 'efibootmgr' command (with backslash "\", instead of slash 
"/"). ---> The "efibootmgr" command is the problematic instruction for 
this case!

The instructions referring to the 'efibootmgr' command in this specific 
Gentoo wiki page are not for a different (USB) removable device, but 
rather for adding "syslinux.efi" as an alternative UEFI bootloader for 
the _same_ ESP of the current OS in which you are executing the 
command. To be clear, I am not saying that the specific efibootmgr 
command in this specific Gentoo wiki page is correct or incorrect, but 
rather that, as-is, it is not intended for installing syslinux.efi on a 
_different_ (removable, USB device) ESP.

The same Gentoo wiki page suggests an alternative: use the "default" 
(as per the UEFI specifications) (sub)directory for your syslinux.efi, 
and this is where it matches the instructions of the Syslinux wiki.

The "default" (sub)directory is:


In this case, the "root_of_the_ESP" is not the one in your current OS / 
device, but the ESP in your USB device. Additionally, Gentoo's wiki 
page uses "Boot" instead of "BOOT" (all upper-case). Strictly speaking, 
the UEFI specifications uses "BOOT"; I am not sure whether this small 
inaccuracy in Gentoo's wiki page has a practical negative effect in 
real-world cases.

In line with using the "default" UEFI directory as alternative method, 
also the default name for the UEFI bootloader is suggested in Gentoo's 
wiki page. For the "x86_64" architecture, this is "bootx64.efi", and 
again this coincides with Syslinux's wiki page. The result for this 
particular case is:


or, as it is expressed in the Syslinux wiki page:


(please note that in the Syslinux wiki page the "EFI_SYSTEM_PARTITION" 
is in italics).

As explained in both wiki pages, the rest of the Syslinux-related files 
should be copied to the same location. That means that your 
"syslinux.cfg", "ldlinux.e64", and any required c32 module for the same 
"efi64" architecture should be copied to the same location (including 


Now, with the instructions (hopefully) being clarified, there are 
additional things to be noted. First, UEFI implementations are not 
"perfect". For instance, some UEFI firmware might use a different 
default path, such as "EFI/Microsoft/Bootmgr.efi" or simuilar, instead 
of the default path according to the UEFI specs. This is just one 
example, and many other issues can be found in real-world cases. There 
isn't much that The Syslinux Project can do about it.

Additionally, the Syslinux wiki pages should not be expected to explain 
"anything and everything about booting", whether it would be regarding 
traditional PC-BIOS or regarding UEFI.

Moreover, bugs and potential improvements in syslinux.efi are a 
certainty (and this includes building issues). It would be useful for 
the The Syslinux Project to know if there is a system that is 
UEFI-bootable by means of a different bootloader but fails to boot with 

Please also note that Syslinux configuration examples are usually 
focused on BIOS systems. For UEFI, it is very possible that the paths 
expressed in your own syslinux.cfg might need some tweaking; such as 
changing things like "/boot/" to "/EFI/BOOT/" or similar.


PS: When replying, please avoid top-posting. TIA.

More information about the Syslinux mailing list