[syslinux] Building a http query string including SMBIOS Serial Number to load a specific kernel
Ady
ady-sf at hotmail.com
Fri Feb 19 21:26:31 PST 2016
> On Fri, Feb 19, 2016 at 3:40 PM, Geert Stappers via Syslinux
> <syslinux at zytor.com> wrote:
> > On Fri, Feb 19, 2016 at 06:07:15PM -0200, Leandro Becker via Syslinux wrote:
> >> Hello folks,
> >>
> >> There is a way to get the system serial number from SMBIOS and pass it
> >> as HTTP query string to get the kernel and initrd?
> >> Something like this:
> >>
> >> LABEL OS Download
> >> MENU LABEL Clonezilla
> >> MENU INDENT 1
> >> KERNEL http://192.168.10.10/kernel.php?type=kernel (
> >> http://myserver/kernel.php?SN=SMBIOS_SERIAL_NUMBER&type=kernel
> >> )&SN=SMBIOS_SERIAL_NUMBER
> >> APPEND
> >> initrd=http://192.168.10.10/kernel.php?type=initrd&SN=SMBIOS_SERIAL_NUMBER
> >> boot=live ...
> >>
> >> I found that SYSAPPEND is able to get info from SMBIOS, but there is a
> >> way to accomplish what I'm trying to do, i.e. replace
> >> SMBIOS_SERIAL_NUMBER somehow with the real serial number?
> >> Maybe Menu.c32 have a feature to do something like this?
> >
> > I don't know.
> > This E-mail is to that Syslinux has lua.c32
> > That Lua intpreter can get SMBIOS information and boot a Linux kernel
>
I believe the lua.c32 module "should" be able to do such thing, by
means of an adequate Lua script.
The lua.c32 module is documented in the Syslinux wiki, but its
documentation at this time is outdated:
http://www.syslinux.org/wiki/index.php/lua.c32
That document at least would provide a generic idea of the
possibilities, such as
Lua.c32#Example:_Act_on_system.product_name_DMI_information
among others, while some additional sources might be worth a read, such
as:
http://repo.or.cz/syslinux.git/blob/HEAD:/com32/lua/README
and the 2 sample scripts (probably also slightly outdated):
http://repo.or.cz/syslinux.git/tree/HEAD:/com32/lua/test
The whole lua subdirectory should be part of the reading recommendation
for this matter.
Also the Syslinux Mailing List Archives already has some info:
"PXE-Linux like default configuration file selection with syslinux"
http://www.syslinux.org/archives/2015-September/024229.html
Quote:
"You can extract DMI information (like the system UUID) with Lua and
implement conditional behaviour based on that."
Some additional links that _might_ be relevant:
Proposed sysappend.c32 new module patch (Sebastian Herbszt)
http://www.syslinux.org/archives/2015-July/023744.html
The current official git repo master should be recommended for
Lua-related matters in Syslinux (as relevant fixes were introduced
after the release of Syslinux 6.03 ):
http://repo.or.cz/syslinux.git
Outdated too:
https://github.com/wferi/syslinux
I believe (IIRC) that W. Feri still has some fixes to prepare and send
for official Syslinux code (including updated documentation for the Lua
scripts / Lua module). Whether he has patches ready, or there is yet
work to be done, I don't know.
Whichever the case, I would tend to think that at the moment the
more-realistic option for this type of cases would be a Lua script.
> menu.c32 (and vesamenu.c32) are documented in doc/menu.txt and no such
> feature exists at this time.
>
Or in the wiki (usually more updated than official .Doc/* files):
http://www.syslinux.org/wiki/index.php/Menu
> A more universal answer would be enhancing linux.c32 to provide this
> function. Consider adding it as a feature-request bug in
> http://bugzilla.syslinux.org/
>
> --
> -Gene
Regards,
Ady.
> _______________________________________________
> 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