[syslinux] pxelinux 6.03 lua module not loading syslinux.c32 dmi.c32 etc

Luke Ledgerd luke.ledgerd at niteco.se
Mon Nov 10 10:31:07 PST 2014


I'm running pxelinux configured to use the path /bios on the tftp server for all the comboot files.

The problem is dmi,syslinux,vesa etc modules are not being loaded in lua. 
Syslinux.version() returns not found in global index as does dmi.supported()
For k,v in pairs(package.loaded) do print (k,v) end; shows that these modules that are normally loaded by lua are not loading.

I got an idea to configure my syslinux pxe setup to support EFI32/64/legacy from 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=720589 That's what clonezilla server is doing too.

Config
label luabios
  MENU LABEL Upgrade your BIOS!
# path /bios makes no difference
  com32 lua.c32
  append /flash/bios/biosupdate.lua

lua.c32 /liblua.c32 isn't trying to list the directory for supported modules is it? 
(not supported over tftp of course).  I can try again with a linux tftp server in debug mode, but from what I'm seeing from the tftp logs there is no attempt to load syslinux.c32/dmi.c32, but they do load after I type the require("syslinux") option.

May be related:
http://www.zytor.com/pipermail/syslinux/2014-June/022170.html
My print(package.cpath)
/bios/?.c32;/bios/?/init.c32;bios/?.c32;bios/?.c32;./?.c32

And I think I found the solution half-way through this email so I thought I would share anyway. 
The demos on the syslinux wiki don't reference this

syslinux-6.03/com32/lua/doc/syslinux.asc
   23 Modules must be explicitly loaded into the namespace
   24 before use, for example:
   25 ......................................................
   26 syslinux = require ("syslinux")
   27 ......................................................

Problem solved.

Cheers,

Luke




More information about the Syslinux mailing list