PXE (Preboot Execution Environment)

Definition

PXE (Preboot Execution Environment) is an Intel-standard that allows a computer to boot from a network server instead of a local disk. It enables network-based installation of operating systems, diskless workstations, and remote system provisioning.

PXE works at the BIOS/UEFI level, before any operating system is loaded, making it useful for bare-metal provisioning and recovery.

How PXE Works

1. Client BIOS/UEFI → DHCP request (option 66/67)
2. DHCP Server → IP assignment + TFTP server address + boot file name
3. Client → TFTP download boot loader (pxelinux.0, grub.efi)
4. Boot loader → TFTP download kernel + initrd
5. Kernel → Mount root filesystem (NFS/iSCSI/HTTP)
6. OS installer → Install OS to local disk

PXE Components

Component Purpose
DHCP Server Assigns IP and provides TFTP server info (options 66/67)
TFTP Server Serves boot files (pxelinux.0, grub, kernel, initrd)
Boot Loader pxelinux.0, GRUB, iPXE — loads kernel and initrd
Kickstart/PRESEED Automated OS installation configuration
HTTP/FTP Server Serves OS installation files (larger than TFTP allows)

PXE vs iPXE

Feature PXE iPXE
Protocol support Limited (TFTP only) HTTP, iSCSI, Fibre Channel
File size limit ~32MB Unlimited (via HTTP)
Scripting No Yes (iPXE scripting)
UEFI support Limited Full UEFI support
Flexibility Low High
Usage Legacy Modern replacement

PXE Use Cases

Use Case Description
OS installation Network boot into installer (Kickstart, PRESEED)
Diskless workstations Boot from network, no local disk needed
System recovery Boot rescue/repair environment
Bare-metal provisioning Install OS on new servers
Live CD/USB Boot live OS from network
Hardware diagnostics Boot diagnostic tools remotely

PXE in Automation

Tool PXE Integration
** Cobbler** PXE management, DHCP, DNS,Kickstart
Foreman PXE templates, provisioning
MAAS Ubuntu bare-metal provisioning with PXE
IPXE Advanced PXE scripting
dnsmasq Lightweight DHCP + TFTP server for PXE
  • Dhcp — PXE uses TFTP for boot file transfer
  • Kickstart — automated installation triggered by PXE
  • Ipmi