PXE Network Boot Lab

Diskless Linux boot - DHCP options 66/67 + TFTP + pxelinux.0.

LinuxPXEDHCPTFTPSYSLINUX

Overview

A complete PXE boot implementation: a Linux server providing DHCP and TFTP that boots a legacy PC entirely over the network - bootloader, kernel and initramfs downloaded, no local OS required.

  • ✓Legacy PC booted diskless - PXE ROM → DHCP → TFTP → Linux from RAM
  • ✓DHCP options 66 (TFTP server) + 67 (bootfile) configured and verified with tcpdump
  • ✓TFTP root at /srv/tftp, world-readable, 512-byte block transfers over UDP/69
  • ✓SYSLINUX/PXELINUX for BIOS clients; GRUB2 path documented for UEFI
  • ✓Five real failures diagnosed and fixed (DHCP options, TFTP paths, firewall, BIOS order, UEFI)
LinuxPXEDHCPTFTPSYSLINUXUDP
PXE BOOT REPLAY - LEGACY CLIENT · NO LOCAL DISK · FROM LAB NOTES
DHCPDISCOVER → pxelinux.0 → vmlinuz → initrd → shell

Evidence · from the repo

How it works

  1. Power onBIOS/UEFI hands control to the NIC's PXE firmware.
  2. DHCP discoverClient broadcasts DHCPDISCOVER requesting config + PXE options.
  3. DHCP offerServer replies: client IP, mask, gateway, DNS, TFTP address, bootfile pxelinux.0.
  4. TFTP fetchBootloader, then vmlinuz kernel, then initramfs - pulled over TFTP.
  5. Boot from RAMKernel executes, initramfs mounts - a working Linux with untouched local disks.

THE FIX THAT UNBLOCKED BOOT

Missing DHCP options 66/67 - added to dhcpd.conf, restarted dhcpd

FileChange
dhcpd.confoption tftp-server-name "192.168.1.10"; filename "pxelinux.0";
TFTP rootchmod 644 /srv/tftp/linux/vmlinuz + initrd.img
FirewallAllow UDP 67, 68, 69 - or verify with tcpdump

CHALLENGES FIXED

SymptomRoot cause → fix
Hang after DHCPMissing options 66/67 → added to subnet block
Kernel: file not foundTypo + restrictive perms → fixed names, chmod 644
No boot file receivedFirewall / wrong filename → opened UDP, verified pxelinux.0
Boots from hard driveBoot order → NIC first, fast boot off
UEFI refuses pxelinux.0BIOS-only loader → grubx64.efi path

DHCPD.CONF (SUBNET BLOCK)

conf
option tftp-server-name "192.168.1.10";
filename "pxelinux.0";

WATCH PXE TRAFFIC

bash
tcpdump -i eth0 port 69 or port 67 or port 68
chmod 644 /srv/tftp/linux/vmlinuz /srv/tftp/linux/initrd.img

Build log · reproduce it

REPRODUCE
—Linux server + legacy PXE client on one switch (or direct cable)
—Install dhcpd + tftpd-hpa; static IP on server; TFTP root /srv/tftp
—DHCP scope with options 66/67 → filename pxelinux.0
—Stage bootloader + kernel + initramfs; chmod 644
—BIOS: NIC first in boot order → network boot