[syslinux] Recursive pxelinux.0 and pxelinux.cfg directories.

Kaizaad Bilimorya kaizaad at sharcnet.ca
Tue Aug 19 11:38:07 PDT 2008


On Mon, 18 Aug 2008, Vance Turner wrote:
> Is there a way to call pxelinux.0 and point it at a different pxelinux.cfg directory?

Hello Vance,

If I understand you correctly, this might be of interest. I wanted to setup 
different pxelinux.cfg/default files since I wanted the default for one 
set of machines to be different from another set so I could use the 
"timeout" option and a "default" boot option in order to perform 
operatorless installs.

I used the "pxelinux.pathprefix" and dhcp "option space" options.
http://syslinux.zytor.com/wiki/index.php/PXELINUX#Can_I_send_information_to_PXELINUX_via_special_options_in_the_DHCP_response.3F

eg: snippets of dhcpd.conf
# systemimager imageserver option-140 -> option 8c in hex
# systemimager log_server_port option-141 -> option 8d in hex
# pxelinux magic option-208 -> option d0 in hex
# pxelinux pathprefix option-210 -> option d2 in hex
option space foo;
option foo.imageserver      code 140 = text;
option foo.log_server_port code 141 = string;
option foo.magic      code 208 = string;
option foo.pathprefix code 210 = text;

# define all the options to what we want for foo machines
option foo.imageserver "10.32.1.3";
option foo.magic f1:00:74:7e;
option foo.pathprefix "foo-dir/";

site-option-space "foo";
if exists dhcp-parameter-request-list {
    # Always send the foo options (specified in hexadecimal)
    option dhcp-parameter-request-list = concat(option dhcp-parameter-request-list,8c,8d,d0,d2);
}

So the option foo.pathprefix "foo-dir/"; is the important one. Now when 
these foo group of machines booted they would check for 
"/tftpboot/foo-dir/pxelinux.cfg/default"

The machines not defined in the "foo option space" would just check the 
normal location "/tftpboot/pxelinux.cfg/default"

Hope this helps.
-k




More information about the Syslinux mailing list