ifgpxe.c32 is a com32 module that will run one command if gPXE extensions are available, and a different command if not. At VMware, we use this module to chain-load gpxelinux.0 from pxelinux.0. Both of those binaries use exactly the same configuration file, and this module allows us to differentiate between the two cases and break the infinite chain-loading loop that might result. Typical usage: default ifgpxe.c32 menu.c32 -- gpxelinux.0 label xx menu label xx kernel http://host/filename Another potential use could be to use different configuration files, e.g. one with TFTP URLs, and the other with HTTP URLs, depending on whether or not gPXE extensions are present. I am aware that most of these problems can be solved with clever DHCP configuration. However, our IT department keeps fairly tight control over the DHCP servers, and any change to the DHCP options used for a given host has a bunch of bureaucratic overhead. With ifgpxe.c32, we can simply edit the host-specific pxelinux configuration files, which IT has much less control over. The actual content of the file was mostly copy/pasted from ifcpu64.c, so I left HPA's copyright on it. Thanks, Geoff -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-New-module-ifgpxe.c32.-It-runs-one-command-if-gpxe-e.patch Type: application/octet-stream Size: 3831 bytes Desc: 0001-New-module-ifgpxe.c32.-It-runs-one-command-if-gpxe-e.patch URL: <http://www.zytor.com/pipermail/syslinux/attachments/20100913/ac390e5a/attachment.obj>
On Mon, Sep 13, 2010 at 20:30, Geoff Lywood <glywood at vmware.com> wrote:> ifgpxe.c32 is a com32 module that will run one command if gPXE > extensions are available, and a different command if not. > > At VMware, we use this module to chain-load gpxelinux.0 from > pxelinux.0. Both of those binaries use exactly the same configuration > file, and this module allows us to differentiate between the two cases > and break the infinite chain-loading loop that might result. Typical > usage:Cool. This is definitely more versatile than just replacing pxelinux.0 with gpxelinux.0 to allow for more simultaneous testing and usage. -- -Gene
Geoff Lywood wrote:> ifgpxe.c32 is a com32 module that will run one command if gPXE extensions > are available, and a different command if not. > > At VMware, we use this module to chain-load gpxelinux.0 from pxelinux.0. > Both of those binaries use exactly the same configuration file, and this > module allows us to differentiate between the two cases and break the > infinite chain-loading loop that might result. Typical usage: > > default ifgpxe.c32 menu.c32 -- gpxelinux.0 > label xx > menu label xx > kernel http://host/filename > > Another potential use could be to use different configuration files, e.g. > one with TFTP URLs, and the other with HTTP URLs, depending on whether or > not gPXE extensions are present. > > I am aware that most of these problems can be solved with clever DHCP > configuration. However, our IT department keeps fairly tight control over > the DHCP servers, and any change to the DHCP options used for a given host > has a bunch of bureaucratic overhead. With ifgpxe.c32, we can simply edit > the host-specific pxelinux configuration files, which IT has much less > control over. > > The actual content of the file was mostly copy/pasted from ifcpu64.c, so I > left HPA's copyright on it. > > Thanks, > Geoff > _______________________________________________ > 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. > >Can you make a new patch based on the last ifcpu(64).c32 version? http://git.zytor.com/?p=syslinux/syslinux.git;a=blob;f=com32/modules/ifcpu64.c;h=e123922e25afe74b81987eaa66e709eac84625c1;hb=6f438cf6d03e45d875b510559246573954e43218 The "static void boot_args(char **args)" is different. The newer version supports spaces in the commands separated by --. e.g.: default ifgpxe.c32 menu.c32 http://someserver.org/someconfig.cfg -- gpxelinux.0 ===========================================/* XXX: this really should be librarized */ static void boot_args(char **args) { int len = 0, a = 0; char **pp; const char *p; char c, *q, *str; for (pp = args; *pp; pp++) len += strlen(*pp) + 1; q = str = alloca(len); for (pp = args; *pp; pp++) { p = *pp; while ((c = *p++)) *q++ = c; *q++ = ' '; a = 1; } q -= a; *q = '\0'; if (!str[0]) syslinux_run_default(); else syslinux_run_command(str); } =========================================== - Gert Hulselmans
Reasonably Related Threads
- [PATCH] ifplop.c32: Detect if PLoP USB/CD INT13h hook is enabled/disabled
- [PATCH] ifmemdsk.c32: Allow boot options based on presence of MEMDISK
- bug in ifcpu64 if !pae and only two options?
- whichsys.c32: execute specific command, based on Syslinux bootloader variant
- [PATCH] ifcpuXX: Support multiple parameters with labels