[syslinux] Building a http query string including SMBIOS Serial Number to load a specific kernel
Ferenc Wágner
wferi at niif.hu
Mon Feb 22 05:27:26 PST 2016
Leandro Becker via Syslinux <syslinux at zytor.com> writes:
> 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?
You can script it in Lua. Try something like
LABEL OS Download
COM32 lua.c32
APPEND down.lua
where down.lua is something like
local sl = require "syslinux"
local dmi = require "dmi"
local dmi_table = dmi.gettable()
local serial = dmi_table.system.serial
sl.run_command ("http://192.168.10.10/kernel.php?SN=" . serial . "...")
(untested)
--
Regards,
Feri.
More information about the Syslinux
mailing list