[syslinux] Creating Syslinux UEFI usb boot

Atle Holm atle at team-holm.net
Mon Apr 25 03:19:25 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



More information about the Syslinux mailing list