Thursday, November 17, 2011

iPXE: Boot iPXE firmware

iPXE (formerly known as gPXE) is an open source network boot firmware. The most obvious reason of using iPXE is the ability to download image from HTTP and Boot ISCSI target but not limited to that. For illustration purpose, this topic focus on chain load usage of iPXE image.

Prevent infinite iPXE boot

You will notice that booting undionly.kpxe basically just boot iPXE firmware. The iPXE will keep obtain iPXE image from DHCP server and boot itself infinitely. To instruct iPXE to do other work once iPXE has been loaded, make changes to dhcpd.conf:

The above changes will first boot iPXE image (undionly.kpxe), followed by booting a iPXE script from http service.

The iPXE script (boot.ipxe) can be as simple as:

# cat boot.ipxe#!ipxe
login

Here is an output screen of boot.ipxe:

Speeding iPXE boot

iPXE booting will wait for replies from a ProxyDHCP server before booting. If you are not using a ProxyDHCP server, then this creates an unnecessary delay of several seconds. You can eliminate this delay by adding an option in dhcpd.conf: