Use the undocumented "append" command instead of hacking around
authorhpa <hpa>
Tue, 24 Apr 2001 05:37:55 +0000 (05:37 +0000)
committerhpa <hpa>
Tue, 24 Apr 2001 05:37:55 +0000 (05:37 +0000)
with "concat" and friends.

pxelinux.doc

index 2ec710c..70e8710 100644 (file)
@@ -163,7 +163,8 @@ boot server is available at:
        http://www.kano.org.uk/projects/pxe/
 
 With such a boot server defined, your DHCP configuration should look
-the same except for an "option dhcp-class-identifier":
+the same except for an "option dhcp-class-identifier" ("option
+vendor-class-identifier" if you are using DHCP 3.0):
 
         allow booting;
         allow bootp;
@@ -267,36 +268,38 @@ Then, inside your PXELINUX-booting group or class (whereever you have
 the PXELINUX-related options, such as the filename option), you can
 add, for example:
 
-       site-option-space pxelinux;
+       # Always include the following lines for all PXELINUX clients
+       site-option-space "pxelinux";
        option pxelinux.magic f1:00:74:7e;
+       if exists dhcp-parameter-request-list {
+               # Always send the PXELINUX options
+               append dhcp-parameter-request-list 208, 209, 210, 211;
+       }
+       # These lines should be customized to your setup
        option pxelinux.configfile "configs/common";
        option pxelinux.pathprefix "/tftpboot/pxelinux/files/";
        option pxelinux.reboottime 30;
-       option dhcp-parameter-request-list 1, 3, 208, 209, 210, 211;
        filename "/tftpboot/pxelinux/pxelinux.bin";
 
 Note that the configfile is relative to the pathprefix: this will look
 for a config file called /tftpboot/pxelinux/files/configs/common on
 the TFTP server.
 
-The "option dhcp-parameter-request-list" is unfortunately required,
-since the DHCP exchange happens before PXELINUX starts.
-Unfortunately at least DHCP 3.0rc2pl1 takes this as "send these
-options and no others", even when the client explicitly requests
-them.  This can easily cause problems for your operating system; you
-may need to add additional options here.  I'm afraid I don't have a
-neat and clean solution for this problem using existing software.
-Fixing it in PXELINUX would require a fairly large amount of
-additional code, since PXELINUX would be required to conduct its own
-DHCP exchange rather than getting the cached packet from the PXE
-stack.
+The "append dhcp-parameter-request-list" is an undocumented (as of
+DHCP 3.0rc2pl1) option which forces the DHCP server to send the
+PXELINUX-specific options, even though they are not explicitly
+requested.
 
 Using ISC dhcp 3.0 you can create a lot of these strings on the fly.
 For example, to use the hexadecimal form of the hardware address as
 the configuration file name, you could do something like:
 
-       site-option-space pxelinux;
+       site-option-space "pxelinux";
        option pxelinux.magic f1:00:74:7e;
+       if exists dhcp-parameter-request-list {
+               # Always send the PXELINUX options
+               append dhcp-parameter-request-list 208, 209, 210, 211;
+       }
        option pxelinux.configfile =
                concat("pxelinux.cfg/", binary-to-ascii(16, 8, ":", hardware));
        filename "/tftpboot/pxelinux.bin";