When loading PXELinux via DHCP as specified in dhcp.conf:
filename "pxelinux.0";
Once PXELinux was loaded, it will look for configuration in the following order:
- Client PC’s GUID
- Client PC’s MAC Address
- Client PC”s IP address
- pxelinux.cfg/default
These searching order may reveal from /var/log/messages:
Nov 28 08:58:09 dolphin in.tftpd[24603]: RRQ from 192.168.0.181 filename gpxelinux.0 Nov 28 08:58:09 dolphin in.tftpd[24604]: RRQ from 192.168.0.181 filename pxelinux.cfg/0338a9f6-d2b1-11df-9ec1 -0013d4d9c9e8 Nov 28 08:58:09 dolphin in.tftpd[24605]: RRQ from 192.168.0.181 filename pxelinux.cfg/01-70-71-bc-a8-4f-43 Nov 28 08:58:09 dolphin in.tftpd[24606]: RRQ from 192.168.0.181 filename pxelinux.cfg/C0A800B5 Nov 28 08:58:09 dolphin in.tftpd[24607]: RRQ from 192.168.0.181 filename pxelinux.cfg/C0A800B Nov 28 08:58:09 dolphin in.tftpd[24608]: RRQ from 192.168.0.181 filename pxelinux.cfg/C0A800 Nov 28 08:58:09 dolphin in.tftpd[24609]: RRQ from 192.168.0.181 filename pxelinux.cfg/C0A80 Nov 28 08:58:09 dolphin in.tftpd[24610]: RRQ from 192.168.0.181 filename pxelinux.cfg/C0A8 Nov 28 08:58:09 dolphin in.tftpd[24611]: RRQ from 192.168.0.181 filename pxelinux.cfg/C0A Nov 28 08:58:09 dolphin in.tftpd[24612]: RRQ from 192.168.0.181 filename pxelinux.cfg/C0 Nov 28 08:58:09 dolphin in.tftpd[24613]: RRQ from 192.168.0.181 filename pxelinux.cfg/C Nov 28 08:58:09 dolphin in.tftpd[24614]: RRQ from 192.168.0.181 filename pxelinux.cfg/default
In most situation, create a default configuration file works well. There are some situations where we want to force the pxelinux to load menu configuration file other than default.
Here is a DHCP configuration that force pxelinux to load menu pxelinux.cfg/boot:
-
option space pxelinux;
-
option pxelinux.magic code 208 = string;
-
option pxelinux.configfile code 209 = text;
-
option pxelinux.pathprefix code 210 = text;
-
option pxelinux.reboottime code 211 = unsigned integer 32;
-
-
site-option-space "pxelinux";
-
if exists dhcp-parameter-request-list {
-
# Always send the PXELINUX options
-
option dhcp-parameter-request-list = concat(option-dhcp-parameter-request-list, "208,209,210,211");
-
}
-
-
option pxelinux.configfile "pxelinux.cfg/boot";
-
filename "pxelinux.0";
The DHCP option 209 is the option to specify PXELinux config file. Line 10 specify option additional parameters that will pass to dhcp client.
No comments:
Post a Comment