[syslinux] Creating Syslinux UEFI usb boot

Ady ady-sf at hotmail.com
Mon Apr 25 04:30:22 PDT 2016


> Den 21. april 2016 kl. 22.04.37 +02.00 skrev Gene Cumm <gene.cumm at gmail.com>:
> 
> > On Thu, Apr 21, 2016 at 6:39 AM, Gene Cumm <<gene.cumm at gmail.com>> wrote:
> > 
> > > On Thu, Apr 21, 2016 at 3:29 AM, Atle Holm <<atle at team-holm.net>> wrote:
> > > 
> > > > Under EFI/BOOT are the following files:
> > > > BOOTIA32.EFI (from efi32/efi/syslinux.efi)
> > > > BOOTX64.EFI (from efi64/efi/syslinux.efi)
> > > > ldlinux.sys (copied from root of partition)
> > > > lua.c32
> > > > mboot.c32
> > > > menu.c32
> > > > syslinux.cfg
> > > > vesamenu.c32
> > > > KS.CFG (vmware specific)
> > > > BOOT.CFG (vmware specific)
> > > > autoselect.lua
> > > > 
> > > > These files are also all under the root of the partition (except
> > > > BOOTIA32.EFI and BOOTX64.EFI) and work fine there if I use a normal bios
> > > > boot. When using UEFI boot, things don't work.
> > > > 
> > > I'd fully expect this. Syslinux for EFI is incomplete.
> > > 
> > > 
> > > > If the .c32 files here are incorrect for UEFI boot, where do I get the
> > > > correct files?
> > > > 
> > > The same place as the other files. You'll need at least
> > > efi64/com32/elflink/ldlinux/ldlinux.e64
> > > 
> > > 
> > > > I haven't been able to find a description/recipe on how to set up UEFI boot
> > > > with Syslinux. Why is there none, or where is it? That would probably be
> > > > easier.
> > > > 
> > > I had the impression from the first or second message you send that
> > > you already had a recipe.
> > > 
> > > <http://www.syslinux.org/wiki/index.php?title=Install#UEFI> is a start.
> > > 
> > > An additional config will be warranted. In the root of the file
> > > system, a file named syslx64.cfg with
> > > 
> > > #BEGIN syslx64.cfg
> > > PATH boot/syslinux/x64
> > > INCLUDE common.cfg
> > > #END syslx64.cfg
> > > 
> > > 
> > > For COM32 modules, you'll need at least (vesa)menu.c32, lua.c32,
> > > mboot.c32, and all of the libraries they depend on (though everything
> > > is easier) from within efi64/com32/ for the 64-bit placed in the
> > > boot/syslinux/x64 directory.
> > > 
> > > Then rename your existing syslinux.cfg as common.cfg and create a new
> > > syslinux.cfg with
> > > 
> > > 
> > > #BEGIN syslinux.cfg
> > > PATH boot/syslinux/bios
> > > INCLUDE common.cfg
> > > #END syslinux.cfg
> > > 
> > > 
> > > and move the BIOS COM32 modules to that directory.
> > > 
> > > I'm reasonably certain that the shuffling of your current syslinux.cfg
> > > and the current BIOS COM32 modules will be necessary as the EFI
> > > variants will likely try to load the BIOS COM32 module from the root
> > > instead of the directory in PATH and fail.
> > > 
> > On Thu, Apr 21, 2016 at 10:46 AM, Atle Holm <<atle at team-holm.net>> wrote:
> > 
> > 
> > > OK, it now looks like this.
> > > /common.cfg (has contents of previously syslinux.cfg for menu and all)
> > > /syslinux.cfg
> > > PATH BOOT/SYSLINUX/BIOS
> > > INCLUDE common.cfg
> > > /syslx64.cfg
> > > PATH BOOT/SYSLINUX/x64
> > > INCLUDE common.cfg
> > > /BOOT.CFG (vmware specific)
> > > /KS.CFG (vmware specific)
> > > /EFI/BOOT/BOOTIA32.EFI
> > > /EFI/BOOT/BOOTX64.EFI
> > > /EFI/BOOT/ldlinux.e64
> > > /EFI/BOOT/ldlinux.elf
> > > /BOOT/SYSLINUX/BIOS/lua.c32 (241 KB)
> > > /BOOT/SYSLINUX/BIOS/mboot.c32 (79 KB)
> > > /BOOT/SYSLINUX/BIOS/menu.c32 (54 KB)
> > > /BOOT/SYSLINUX/BIOS/vesamenu.c32 (150 KB)
> > > /BOOT/SYSLINUX/x64/cmenu.c32 - from syslinux-6.03.zip\efi64\com32\lua\src
> > > /BOOT/SYSLINUX/x64/cpu.c32 - from syslinux-6.03.zip\efi64\com32\lua\src
> > > /BOOT/SYSLINUX/x64/dhcp.c32 - from syslinux-6.03.zip\efi64\com32\lua\src
> > > /BOOT/SYSLINUX/x64/dmi.c32 - from syslinux-6.03.zip\efi64\com32\lua\src
> > > /BOOT/SYSLINUX/x64/lfs.c32 - from syslinux-6.03.zip\efi64\com32\lua\src
> > > /BOOT/SYSLINUX/x64/liblua.c32 - from syslinux-6.03.zip\efi64\com32\lua\src
> > > /BOOT/SYSLINUX/x64/lua.c32 (9KB) - from
> > > syslinux-6.03.zip\efi64\com32\lua\src
> > > /BOOT/SYSLINUX/x64/mboot.c32 (13KB) - from
> > > syslinux-6.03.zip\efi64\com32\mboot
> > > /BOOT/SYSLINUX/x64/menu.c32 (32KB) - from syslinux-6.03.zip\efi64\com32\menu
> > > /BOOT/SYSLINUX/x64/pci.c32 - from syslinux-6.03.zip\efi64\com32\lua\src
> > > /BOOT/SYSLINUX/x64/syslinux.c32 - from syslinux-6.03.zip\efi64\com32\lua\src
> > > /BOOT/SYSLINUX/x64/vesa.c32 - from syslinux-6.03.zip\efi64\com32\lua\src
> > > /BOOT/SYSLINUX/x64/vesamenu.c32 (11 KB) - from
> > > syslinux-6.03.zip\efi64\com32\menu
> > > 
> > Where are the library modules? You can't load any of the x64 modules
> > without the libraries. Search under efi64/com32/ for any lib*.c32
> > files.
> > 
> > 
> > > So when I do a BIOS boot, I now get:
> > > Could not find kernel image: vesamenu.c32
> > > This used to work earlier.
> > > 
> > Thinking about this now, you're probably going to have to skip the
> > BIOS/UEFI-ia32/UEFI-ia32-x64 hybrid in favor of a BIOS-only drive and
> > a UEFI-ia32/UEFI-ia32-x64 hybrid or skip using VMware's mboot.c32 and
> > boot.cfg (and instead stuff its data into your Syslinux config). PATH
> > is a relatively newer directive not found in v3.86 or v4.05.
> > 
> > 
> > > When I do a UEFI boot, I now get:
> > > Failed to load COM32 file: vesamenu.c32
> > > So that is progress.
> > > 
> > > I tried placing the contents of /BOOT/SYSLINUX/x64 on the root of the disk
> > > and also inside /EFI/BOOT/ but that made no difference. I noticed that the
> > > c32 files that I found from syslinux-6.03.zip were alot smaller then the
> > > BIOS C32 files I have been using from syslinux 4.05 that came shipped with
> > > Ubuntu (see my notations above).
> > > I am guessing that the files in syslinux-6.03.zip need compiling of some
> > > sort to include all it should in the file?
> > > If so, how to do?
> > > Do I have to compile and install the whole syslinux-6.03 package to get the
> > > com32 modules?
> > > 
> > static versus ELF linked binaries. You don't need to compile anything.
> > 
> > -- 
> > -Gene
> > When searching under efi64/com32/ for any lib*.c32 I found the following:
> libcom32.c32
> libgpl.c32
> liblua.c32
> libmenu.c32
> libutil.c32
> 
> I placed these files under BOOT\SYSLINUX\x64, but I got the same error as earlier when UEFI booting:
> Failed to load COM32 file: vesamenu.c32
> 
> I also placed them under EFI\BOOT just to try, made no difference when UEFI booting.
> 
> 
> -Atle
> 
 
 
Why would you put library modules for EFI64 under the working directory 
used for BIOS? Such action just shows, once again, your complete lack 
of any effort from your part.

Please stop generating unnecessary confusion among readers of this 
Syslinux Mailing List.

1_ Actually subscribe to the ML.

2_ Actually carefully read the replies already provided to you in the 
ML.

3_ RTFW. Some of the potentially-relevant pages would be:

 http://www.syslinux.org/wiki/index.php/Install 
 http://www.syslinux.org/wiki/index.php/Library_modules 
 http://www.syslinux.org/wiki/index.php/Directives/path 
 http://www.syslinux.org/wiki/index.php/Working_directory 
 http://www.syslinux.org/wiki/index.php/Configuration_location_and_name 

 http://www.syslinux.org/wiki/index.php/Common_Problems#Multi-Arch 

This list is not exhaustive; you might be interested in following 
additional links from them.

The documentation is not perfect, but it should reduce these questions 
to a very minimum.

I would expect for your next reply to include something about: "I have 
now finally read the wiki pages, and I have succeeded building a mixed 
BIOS+EFI64 booting USB drive".

The only thing that is not yet documented is how to use the optional 
"syslx64.cfg" and "syslia32.cfg" files, simply because there is no 
official release supporting them yet -- the closest thing at this time 
would be 6.04-pre1, or building your own binaries from current git 
head.

If you have any doubts, please go to the Syslinux Mailing List Archives 
and read the entire email thread, starting from your own email:
 http://www.syslinux.org/archives/2016-April/025130.html 
 
If you still have any doubts, re-read it; the answers to your questions 
have been already provided, either in the emails or in the wiki.

Considering that firmware implementations vary (a lot), there might 
still be cases in which you might not be able to boot with the 
resulting USB drive. You are welcome to ask specific questions that 
would help troubleshoot such problems, especially considering that the 
wiki cannot cover all the knowledge and every-and-all cases.

With this email I am hoping that potential readers would not fall into 
the potential confusions you are generating with these questions.

Regards,
Ady.

PS: I wish we would have some note included in the emails that are 
originated from non-subscribers that are being approved anyway. 
Although we could hope every user would subscribe before sending 
emails, we also need to be realistic and flexible enough. Sending to 
them a request for subscription might also be not such a bad idea. Yet, 
abusive behavior bothers me. 



> _______________________________________________
> 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