[syslinux] [Etherboot-discuss] Custom .c32 module which can send tcp or udp packets

Daniel Kao dkao at ubermind.com
Fri Mar 27 14:43:51 PDT 2009


Miller, Shao wrote:
> Good day Daniel,
>
> You might be interested in the possibility of using gPXE to accomplish
> your goal below.  If you boot gPXE, your DHCP filename option can be a
> gPXE script, something like "boot.gpxe" which could contain:
>
> #!gpxe
> chain
> http://webserver/inven.gpxe?mac=${mac}&ip=${ip}&manu=${manufacturer:uris
> tring}&model=${product:uristring}&serial=${serial:uristring}&asset=${smb
> ios/3.8.0:uristring}&biosrev=${smbios/0.5.0:uristring}
>
> The "webserver" would host the "inven.gpxe" script, which would actually
> be a server script.  It would collect the inventory parameters passed to
> it, then return yet another gPXE script to the gPXE client.  This
> returned script might contain something like:
>
> #!gpxe
> set 209:string pxelinux.cfg/default
> set 210:string http://webserver/
> chain http://webserver/pxelinux.0
>
> The gPXE client would then load pxelinux.0 from the _web-server_ via
> HTTP, then load your pxelinux.cfg/default file, again via HTTP, after
> which point your process should resemble what you already have in place,
> except that all files would be requested via HTTP and would be requested
> from the web-server.
>
> The 209 and 210 options are PXELINUX options and are documented in
> syslinux/doc/rfc5071.txt.
>
> Another thing to keep in mind is that since you can dynamically generate
> the second returned script, it can be based on the client's inventory...
> Which means you can return a script that points to pxelinux.cfg/foo or a
> different script that points to pxelinux.cfg/bar.
>
> If you _don't_ want to use HTTP _except_ for the inventory collection,
> and wish to use TFTP for the pxelinux.0 operations in order to minimize
> the change to your environment, change the 210 option line to:
>
> set 210:string tftp://${next-server}/
>
> And the PXELINUX operations should likely continue as normal for you.
>
> I hope this helps!
>
> - Shao Miller
>
> P. S. Some folks might notice that I've cross-e-mailed this one to both
> SYSLINUX and gPXE.  Maybe it could make for a handy point-to in case
> this question comes up again.  I hope nobody minds.
>
> -----Original Message-----
> From: syslinux-bounces at zytor.com [mailto:syslinux-bounces at zytor.com] On
> Behalf Of pxelinux
> Sent: Friday, March 13, 2009 05:56
> To: syslinux at zytor.com
> Subject: [syslinux] Custom .c32 module which can send tcp or udp packets
>
> I need to write a custom .c32 module which can send information over to
> a separated service or tftp deamon. The goal is to send inventory
> information gathered in pxelinux to be transfered back to the inventory
> database without booting a kernel or os-image.
>
> Is this possible and if so, can you give me a hint how to realise this?
>
> Thanks,
> Daniel
> _______________________________________________
> Syslinux mailing list
> Submissions to Syslinux at zytor.com
> Unsubscribe or set options at:
> http://www.zytor.com/mailman/listinfo/syslinux
> Please do not send private replies to mailing list traffic.
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Etherboot-discuss mailing list
> Etherboot-discuss at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/etherboot-discuss
>   
Hi Shao-

This is *excellent* information!  Thank you so much!

I knew there was a way to setup something as powerful as this using 
gPXE.  Noted, this is probably overkill for my personal needs, but I'm 
sure someone else out there will be able to apply it into their 
environment which requires a much more robust and demanding architecture.

Just for reference, I'm only exploring gPXE because I'm in the process 
of building four diskless systems to run xbmc off an iSCSI target.  I 
thought in the process of exploring gPXE (and PXE in general along with 
other diskless solutions), I would attempt to setup a completely 
"diskless" process of installing the operating system to an iSCSI 
target.  (i.e. no local optical drive or USB drive needed at the 
workstation; just a PC with a network card!)

I built out a nice 6TB RAID-5 media server running CentOS 5.2 x86_64 
w/Xen Hypervisor which has two Intel GbE bonded using 802.3ad link 
aggregation and including hosting all of my media files I rip... with 
all that space... might as well go diskless on the workstations and 
HTPC's! ;) ... And yes, I seriously realize I'm entirely 
over-engineering the use of gPXE, iSCSI, etc. for something as simple as 
a diskless xbmc front-end system where I could just use a cheap $5 USB 1 
or 2GB stick to store the OS + xbmc. ;)

Thanks again, all.  Everyone has been a *huge* help in getting me on 
track.  I will be documenting everything as I go along to give back to 
the community.

-- 
Daniel Kao
Übermind, Inc.
Seattle, WA, U.S.A.




More information about the Syslinux mailing list