3 A bootloader for Linux using the PXE network booting protocol
5 Copyright (C) 1994-2004 H. Peter Anvin
7 This program is provided under the terms of the GNU General Public
8 License, version 2 or, at your option, any later version. There is no
9 warranty, neither expressed nor implied, to the function of this
10 program. Please see the included file COPYING for details.
12 ----------------------------------------------------------------------
14 PXELINUX is a SYSLINUX derivative, for booting Linux off a network
15 server, using a network ROM conforming to the Intel PXE (Pre-Execution
16 Environment) specification. PXELINUX is *not* a program that is
17 intended to be flashed or burned into a PROM on the network card; if
18 you want that, check out Etherboot (http://www.etherboot.org/).
19 Etherboot 5.4 or later can also be used to create a PXE-compliant boot
20 PROM for many network cards.
23 ++++ HOW TO CONFIGURE PXELINUX ++++
25 PXELINUX operates in many ways like SYSLINUX. If you are not familiar
26 with SYSLINUX, read syslinux.doc first, since this documentation only
27 explains the differences.
29 On the TFTP server, create the directory "/tftpboot", and copy the
30 following files to it:
32 pxelinux.0 - from the SYSLINUX distribution
34 any kernel or initrd images you want to boot
36 Finally, create the directory "/tftpboot/pxelinux.cfg". The
37 configuration file (equivalent of syslinux.cfg -- see syslinux.doc for
38 the options here) will live in this directory. Because more than one
39 system may be booted from the same server, the configuration file name
40 depends on the IP address of the booting machine. PXELINUX will
41 search for its config file on the boot server in the following way:
43 First, it will search for the config file using the hardware type
44 (using its ARP type code) and address, all in lower case hexadecimal
45 with dash separators; for example, for an Ethernet (ARP type 1)
46 with address 88:99:AA:BB:CC:DD it would search for the filename
49 Next, it will search for the config file using its own IP address
50 in upper case hexadecimal, e.g. 192.0.2.91 -> C000025B
51 (you can use the included progam "gethostip" to compute the
52 hexadecimal IP address for any host.)
54 If that file is not found, it will remove one hex digit and try
55 again. Ultimately, it will try looking for a file named "default"
58 As an example, if the boot file name is /mybootdir/pxelinux.0, the
59 Ethernet MAC address is 88:99:AA:BB:CC:DD and the IP address
60 192.0.2.91, it will try:
62 /mybootdir/pxelinux.cfg/01-88-99-aa-bb-cc-dd
63 /mybootdir/pxelinux.cfg/C000025B
64 /mybootdir/pxelinux.cfg/C000025
65 /mybootdir/pxelinux.cfg/C00002
66 /mybootdir/pxelinux.cfg/C0000
67 /mybootdir/pxelinux.cfg/C000
68 /mybootdir/pxelinux.cfg/C00
69 /mybootdir/pxelinux.cfg/C0
70 /mybootdir/pxelinux.cfg/C
71 /mybootdir/pxelinux.cfg/default
75 Note that all filename references are relative to the directory
76 pxelinux.0 lives in. PXELINUX generally requires that filenames
77 (including any relative path) are 127 characters or shorter in length.
79 Starting in release 3.20, PXELINUX will no longer apply a built-in
80 default if it cannot find any configuration file at all; instead it
81 will reboot after the timeout interval has expired. This keeps a
82 machine from getting stuck indefinitely due to a boot server failure.
84 PXELINUX does not support MTFTP, and I have no immediate plans of
85 doing so. It is of course possible to use MTFTP for the initial boot,
86 if you have such a setup. MTFTP server setup is beyond the scope of
90 ++++ SETTING UP THE TFTP SERVER ++++
92 PXELINUX currently requires that the boot server has a TFTP server
93 which supports the "tsize" TFTP option (RFC 1784/RFC 2349). The
94 "tftp-hpa" TFTP server, which support options, is available at:
96 http://www.kernel.org/pub/software/network/tftp/
97 ftp://www.kernel.org/pub/software/network/tftp/
99 ... and on any kernel.org mirror (see http://www.kernel.org/mirrors/).
101 Another TFTP server which supports this is atftp by Jean-Pierre
104 ftp://ftp.mamalinux.com/pub/atftp/
106 If your boot server is running Windows (and you can't fix that), try
107 tftpd32 by Philippe Jounin (you need version 2.11 or later; previous
108 versions had a bug which made it incompatible with PXELINUX):
110 http://tftpd32.jounin.net/
113 ++++ SETTING UP THE DHCP SERVER ++++
115 The PXE protocol uses a very complex set of extensions to DHCP or
116 BOOTP. However, most PXE implementations -- this includes all Intel
117 ones version 0.99n and later -- seem to be able to boot in a
118 "conventional" DHCP/TFTP configuration. Assuming you don't have to
119 support any very old or otherwise severely broken clients, this is
120 probably the best configuration unless you already have a PXE boot
121 server on your network.
123 A sample DHCP setup, using the "conventional TFTP" configuration,
124 would look something like the following, using ISC dhcp 2.0 dhcpd.conf
130 # Standard configuration directives...
132 option domain-name "<domain name>";
133 option subnet-mask <subnet mask>;
134 option broadcast-address <broadcast address>;
135 option domain-name-servers <dns servers>;
136 option routers <default router>;
138 # Group the PXE bootable hosts together
140 # PXE-specific configuration directives...
141 next-server <TFTP server address>;
142 filename "/tftpboot/pxelinux.0";
144 # You need an entry like this for every host
145 # unless you're using dynamic addresses
147 hardware ethernet <ethernet address>;
148 fixed-address <hostname>;
152 Note that if your particular TFTP daemon runs under chroot (tftp-hpa
153 will do this if you specify the -s (secure) option; this is highly
154 recommended), you almost certainly should not include the /tftpboot
155 prefix in the filename statement.
157 If this does not work for your configuration, you probably should set
158 up a "PXE boot server" on port 4011 of your TFTP server; a free PXE
159 boot server is available at:
161 http://www.kano.org.uk/projects/pxe/
163 With such a boot server defined, your DHCP configuration should look
164 the same except for an "option dhcp-class-identifier" ("option
165 vendor-class-identifier" if you are using DHCP 3.0):
170 # Standard configuration directives...
172 option domain-name "<domain name>";
173 option subnet-mask <subnet mask>;
174 option broadcast-address <broadcast address>;
175 option domain-name-servers <dns servers>;
176 option routers <default router>;
178 # Group the PXE bootable hosts together
180 # PXE-specific configuration directives...
181 option dhcp-class-identifier "PXEClient";
182 next-server <pxe boot server address>;
184 # You need an entry like this for every host
185 # unless you're using dynamic addresses
187 hardware ethernet <ethernet address>;
188 fixed-address <hostname>;
192 Here, the boot file name is obtained from the PXE server.
194 If the "conventional TFTP" configuration doesn't work on your clients,
195 and setting up a PXE boot server is not an option, you can attempt the
196 following configuration. It has been known to boot some
197 configurations correctly; however, there are no guarantees:
202 # Standard configuration directives...
204 option domain-name "<domain name>";
205 option subnet-mask <subnet mask>;
206 option broadcast-address <broadcast address>;
207 option domain-name-servers <dns servers>;
208 option routers <default router>;
210 # Group the PXE bootable hosts together
212 # PXE-specific configuration directives...
213 option dhcp-class-identifier "PXEClient";
214 option vendor-encapsulated-options 09:0f:80:00:0c:4e:65:74:77:6f:72:6b:20:62:6f:6f:74:0a:07:00:50:72:6f:6d:70:74:06:01:02:08:03:80:00:00:47:04:80:00:00:00:ff;
215 next-server <TFTP server>;
216 filename "/tftpboot/pxelinux.0";
218 # You need an entry like this for every host
219 # unless you're using dynamic addresses
221 hardware ethernet <ethernet address>;
222 fixed-address <hostname>;
226 Note that this *will not* boot some clients that *will* boot with the
227 "conventional TFTP" configuration; Intel Boot Client 3.0 and later are
228 known to fall into this category.
231 ++++ SPECIAL DHCP OPTIONS ++++
233 PXELINUX (starting with version 1.62) supports the following
234 nonstandard DHCP options, which depending on your DHCP server you may
235 be able to use to customize the specific behaviour of PXELINUX:
237 Option 208 pxelinux.magic
238 - Must be set to F1:00:74:7E (241.0.116.126) for PXELINUX to
239 recognize any special DHCP options whatsoever.
241 Option 209 pxelinux.configfile
242 - Specifies the PXELINUX configuration file name.
244 Option 210 pxelinux.pathprefix
245 - Specifies the PXELINUX common path prefix, instead of
246 deriving it from the boot file name. This almost certainly
247 needs to end in whatever character the TFTP server OS uses
248 as a pathname separator, e.g. slash (/) for Unix.
250 Option 211 pxelinux.reboottime
251 - Specifies, in seconds, the time to wait before reboot in the
252 event of TFTP failure. 0 means wait "forever" (in reality,
253 it waits approximately 136 years.)
255 ISC dhcp 3.0 supports a rather nice syntax for specifying custom
256 options; you can use the following syntax in dhcpd.conf if you are
257 running this version of dhcpd:
259 option space pxelinux;
260 option pxelinux.magic code 208 = string;
261 option pxelinux.configfile code 209 = text;
262 option pxelinux.pathprefix code 210 = text;
263 option pxelinux.reboottime code 211 = unsigned integer 32;
265 NOTE: In earlier versions of PXELINUX, this would only work as a
266 "site-option-space". Since PXELINUX 2.07, this will work both as a
267 "site-option-space" (unencapsulated) and as a "vendor-option-space"
268 (type 43 encapsulated.) This may avoid messing with the
269 dhcp-parameter-request-list, as detailed below.
271 Then, inside your PXELINUX-booting group or class (whereever you have
272 the PXELINUX-related options, such as the filename option), you can
275 # Always include the following lines for all PXELINUX clients
276 site-option-space "pxelinux";
277 option pxelinux.magic f1:00:74:7e;
278 if exists dhcp-parameter-request-list {
279 # Always send the PXELINUX options (specified in hexadecimal)
280 option dhcp-parameter-request-list = concat(option dhcp-parameter-request-list,d0,d1,d2,d3);
282 # These lines should be customized to your setup
283 option pxelinux.configfile "configs/common";
284 option pxelinux.pathprefix "/tftpboot/pxelinux/files/";
285 option pxelinux.reboottime 30;
286 filename "/tftpboot/pxelinux/pxelinux.bin";
288 Note that the configfile is relative to the pathprefix: this will look
289 for a config file called /tftpboot/pxelinux/files/configs/common on
292 The "option dhcp-parameter-request-list" statement forces the DHCP
293 server to send the PXELINUX-specific options, even though they are not
294 explicitly requested. Since the DHCP request is done before PXELINUX
295 is loaded, the PXE client won't know to request them.
297 Using ISC dhcp 3.0 you can create a lot of these strings on the fly.
298 For example, to use the hexadecimal form of the hardware address as
299 the configuration file name, you could do something like:
301 site-option-space "pxelinux";
302 option pxelinux.magic f1:00:74:7e;
303 if exists dhcp-parameter-request-list {
304 # Always send the PXELINUX options (specified in hexadecimal)
305 option dhcp-parameter-request-list = concat(option dhcp-parameter-request-list,d0,d1,d2,d3);
307 option pxelinux.configfile =
308 concat("pxelinux.cfg/", binary-to-ascii(16, 8, ":", hardware));
309 filename "/tftpboot/pxelinux.bin";
311 If you used this from a client whose Ethernet address was
312 58:FA:84:CF:55:0E, this would look for a configuration file named
313 "/tftpboot/pxelinux.cfg/1:58:fa:84:cf:55:e".
316 ++++ ALTERNATE TFTP SERVERS ++++
318 PXELINUX supports the following special pathname conventions:
322 Suppresses the common filename prefix, i.e. passes the string
323 "filename" unmodified to the server.
325 IP address::filename (e.g. 192.0.2.1::filename)
327 Suppresses the common filename prefix, *and* sends a request
328 to an alternate TFTP server. Instead of an IP address, a
329 DNS name can be used. It will be assumed to be fully
330 qualified if it contains dots; otherwise the local domain as
331 reported by the DHCP server (option 15) will be added.
333 :: was chosen because it is unlikely to conflict with operating system
334 usage. However, if you happen to have an environment for which the
335 special treatment of :: is a problem, please contact the SYSLINUX
341 If the boot fails, PXELINUX (unlike SYSLINUX) will not wait forever;
342 rather, if it has not received any input for approximately five
343 minutes after displaying an error message, it will reset the machine.
344 This allows an unattended machine to recover in case it had bad enough
345 luck of trying to boot at the same time the TFTP server goes down.
347 Lots of PXE stacks, especially old ones, have various problems of
348 varying degrees of severity. Please see:
350 http://syslinux.zytor.com/hardware.php
352 ... for a list of currently known hardware problems, with workarounds
356 ++++ KEEPING THE PXE STACK AROUND ++++
358 Normally, PXELINUX will unload the PXE and UNDI stacks before invoking
359 the kernel. In special circumstances (for example, when using MEMDISK
360 to boot an operating system with an UNDI network driver) it might be
361 desirable to keep the PXE stack in memory. If the option "keeppxe"
362 is given on the kernel command line, PXELINUX will keep the PXE and
363 UNDI stacks in memory. (If you don't know what this means, you
364 probably don't need it.)
367 ++++ CURRENTLY KNOWN PROBLEMS ++++
369 The following problems are known with PXELINUX, so far:
371 + Requires a TFTP server which supports the "tsize" option.
372 + The error recovery routine doesn't work quite right. For right now,
373 it just does a hard reset - seems good enough.
374 + We should probably call the UDP receive function in the keyboard
375 entry loop, so that we answer ARP requests.
376 + Boot sectors/disk images are not supported yet.
378 If you have additional problems, please contact the SYSLINUX mailing
379 list (see syslinux.doc for the address.)