Remote booting of a device usually works in the following steps.
- Client device boots up and requests an IP address from the DHCP server in the local network. This is done by means of DHCPDISCOVER and DHCPREQUEST messages that the client sends out. Mostly via broadcast messages.
- DHCP server answers to the request with DHCPOFFER / DHCP ACK messages. Along with that comes the IP address that the DHCP server is assigning to the requesting client. Plus additional information such as the address of the TFTP server and the file to load. This is stored in options as part of the DHCP messages. The options are: NEXTSERVER and OPTION_66 for the TFTP server address, BOOTFILE for the file to load. Sometimes other options are needed but that depends on the client.
- Once the client has booted so far (from ROM) that he needs the actual boot file, he is contacting the TFTP server. The address of the TFTP server has been given to the client as part of Step 2. The TFTP server is requested to send the file specified as the boot file (again: see Step 2). This transfers one file from the server to the client.
- The boot file may not be the only file needed on the client side to finish booting. What usually happens is once the boot file is on the client side, the ROM based first boot phase is finished and the operating system included in the boot file is executed. Now a different OS than the one acting from ROM is starting and a different TCP/IP stack is also running. Therefore the client starts again with step 1 – requesting an IP address …
- More files may be fetched from the TFTP server based on whatever the boot file OS may be doing now.
The following INI file is the setup for a pxe boot environment for pxelinux. It assumes 192.168.0.2 as the server IP address.
[Settings] Trace=1 IgnoreUnknownClients=1 ConfigureUnknownClients=1 AssociateBindsToPools=1 IPBIND_2=192.168.0.2 IPPOOL_2=192.168.0.3-134 [General] LEASETIME=86400 ; lease time of 1 day NEXTSERVER=192.168.0.2 ; tftp server (clients look in option 66 and/or in NEXTSERVER field) OPTION_66=192.168.0.2 ; tftp server BOOTFILE=pxelinux.0 SUBNETMASK=255.255.255.0 DOMAINNAME=mydomain.local DNS_1=192.168.0.2 [TFTP-Settings] ; settings for the integrated tftp server EnableTFTP=1 Root=D:\tftproot\ [DNS-Settings] ; settings for the integrated dns server EnableDNS=1
This configuration works under the assumption that a server side path d:\tftproot\ exists with the needed pxelinux files stored, i.e. pxelinux.0. The integrated DNS is not really needed for a pxe boot environment to work. Please note that the integrated TFTP server (new in V1.9) is configured. If you are already using another TFTP server and want to continue to do so, then please set EnableTFTP=0 and make sure that the external TFTP server is setup accordingly.
The same works with Windows 7 and Windows PE boot. If you for example set up a Windows 7 network boot as it is described in the german computer magazin c’t 5/2011 page 176ff, then the following INI file will do the job:
[SETTINGS] IPPOOL_1=192.168.0.3-254 IPBIND_1=192.168.0.2 AssociateBindsToPools=1 [GENERAL] LEASETIME=86400 NODETYPE=8 SUBNETMASK=255.255.255.0 BOOTFILE=wdsnbp.0 NEXTSERVER=192.168.0.2 [TFTP-SETTINGS] EnableTFTP=1 ROOT=D:\pxe