The PXE configuration file defines the menu displayed to the target ESX host as it boots up and contacts the TFTP server. You need a PXE configuration file for PXE booting the ESX installer.

The TFTP server is always listening for PXE clients on the network. When it detects that a PXE client is asking for PXE services, it sends the client a network package that contains this boot menu.

Each PXE boot menu selection points to the location of the kernel and ramdisk files for ESX. You can create one PXE configuration file for each target ESX host, or create one PXE configuration file and name it default.

Following is an example of a PXE configuration file that you might use for PXELINUX with gPXE. The important difference between this example and a PXE configuration file without gPXE is the HTTP path to the required files. See also the /isolinux/isolinux.cfg file on the ESX installation DVD.

default menu.c32
menu title ESX Boot Menu
timeout 30

##PXE boot the installer and perform an interactive installation 
##with local media (RPM files)

label local
menu label Interactive Local Installation
kernel http://<server>/vmlinuz
append initrd=http://<server>/initrd.img vmkopts=debugLogToSerial:1 mem=512M quiet

##PXE boot the installer and perform a scripted installation with
##local or remote media (RPM files), as specified in the installation script

label scripted
menu label Scripted Installation
kernel http://<server>/vmlinuz
append initrd=http://<server>/initrd.img vmkopts=debugLogToSerial:1 mem=512M ks=nfs://xx.xx.xxx.xx/ks.cfg
 

##PXE boot the installer and perform an interactive installation 
##with the media (RPM files) at a remote location

label network_rpm
menu label Interactive Installation with RPM files on the network
kernel http://<server>/vmlinuz
append initrd=http://<server>/initrd.img vmkopts=debugLogToSerial:1 mem=512M askmedia 

Following is an example of a PXE configuration file that you might use for PXELINUX without gPXE. See also the /isolinux/isolinux.cfg file on the ESX installation DVD.

In this example, the path to the required files test/ is relative to /tftpboot. The actual path is /tftpboot/test/ on the TFTP server.

default menu.c32
menu title ESX Boot Menu
timeout 30

##PXE boot the installer and perform an interactive installation 
##with local media (RPM files)

label local
menu label Interactive Local Installation
kernel test/vmlinuz
append initrd=test/initrd.img vmkopts=debugLogToSerial:1 mem=512M quiet

##PXE boot the installer and perform a scripted installation with
##local or remote media (RPM files), as specified in the installation script

label scripted
menu label Scripted Installation
kernel test/vmlinuz
append initrd=test/initrd.img vmkopts=debugLogToSerial:1 mem=512M ks=nfs://xx.xx.xxx.xx/ks.cfg
 

##PXE boot the installer and perform an interactive installation 
##with the media (RPM files) at a remote location

label network_rpm
menu label Interactive Installation with RPM files on the network
kernel test/vmlinuz
append initrd=test/initrd.img vmkopts=debugLogToSerial:1 mem=512M askmedia 

In the PXE configuration file, you must include paths to the following files:

vmlinuz is the boot loader kernel code.

initrd.img is the boot ramdisk.

ks=nfs://xx.xx.xxx.xx/ks.cfg is the path to the ESX installation script. In a scripted installation, your script includes all the necessary responses to complete the script, including the location of the installation media. All of the responses must be filled for the scripted installation to work.

In an interactive installation, omit the ks= option. If you are performing an interactive installation with the installation media at a remote location, include the askmedia boot option, which causes the installer to prompt you for the location of the installation media.

For scripted installations, the IPAPPEND option specifies that the same network adapter the machine boots from is also used for connecting to the network. When you include the IPAPPEND option in the PXE configuration file, omit the --device option to the installation script network command. The IPAPPEND option has no impact on interactive installations. The following snippet shows how to include the IPAPPEND option in the PXE configuration file.

label Installer
menu default
kernel http://<server>/vmlinuz
append initrd=http://<server>/initrd.img mem=512M vmkopts=debugLogToSerial:1 ks=nfs://10.20.118.55/ks.cfg
IPAPPEND 2

For the IPAPPEND flag_val, use IPAPPEND 2. IPAPPEND 1 is not required.

If you omit the network --device option from the installation script, the IPAPPEND option from the PXE configuration file, and the netdevice bootstrap command, the installer uses the first plugged in network adapter.

For the filename of the PXE configuration file, choose one of the following:

01-mac_address_of_target_ESX_host. For example, 01-23-45-67-89-0a-bc

The target ESX host IP address in hexadecimal notation.

default

The initial boot file, pxelinux.0 (or gpxelinux.0) tries to load a PXE configuration file. It tries with the MAC address of the target ESX host, prefixed with its ARP type code (01 for Ethernet). If that fails, it tries with the hexadecimal notation of target ESX system IP address. Ultimately, it tries to load a file named default.

Save the file in var/lib/tftpboot/pxelinux.cfg/ on the TFTP server.

For example, you might save the file on the TFTP server at var/lib/tftpboot/pxelinux.cfg/01-00-21-5a-ce-40-f6. The MAC address of the network adapter on the target ESX host is 00-21-5a-ce-40-f6.