This week I was troubleshooting a PXElinux boot loop on a customer's IBM hardware.\n\nThe system was added as bare-metal host in Foreman and configured to run CentOS 7. Everything that was necessary to provision the hardware was prepared:\n\n* (U)EFI configuration (boot order: 1. PXE, 2. local RAID)\n* RAID configuration\n* DHCP configuration\n* Server-side PXElinux configuration\n* Software Repo access\n\nAfter rebooting the system, network-based OS installation starts and reboots again afterwards to boot into the new operating system. Normally the boot process should look like the following:\n\n1. Power on\n2. POST\/ UEFI magic\/ hardware tests\n3. UEFI loads hardware drivers (NIC, RAID controller, etc.)\n4. Enterprise lifecycle tool collects hardware information (optional)\n5. Network DHCP discover, offer, request, ack\n6. TFTP-downloading and loading boot managers and other files from DHCP\/TFTP server\n7. If PXE-booting\/ DHCP IP gaining fails, boot from local disk(s)\/RAID\n\nIn my particular case, step 6 failed after downloading the network boot manager\/menu. After OS installation has finished by HTTP GETting Foreman (``wget http:\/\/foreman\/unattended\/built``) successfully, Foreman changes the PXElinux configuration for our specific host (MAC address) to the default PXElinux configuration provision template. This in fact contains, boot from local media: ``LOCALBOOT 0``\n\nThe system is unable to execute this command and fails back to PXE-boot again. Files will be TFTP-downloaded and local boot fails again. This happens until a specific amount of retries has reached. The system then stops doing anything. It won't try to boot from local disk(s)\/RAID, I think this is because the system thinks PXE-booting was *successful*.\n\nThe solution was very simple. A (link: http:\/\/thr3ads.net\/syslinux\/2012\/05\/1924356-PXE-looping-on-localboot text: post by Pascal Legrand on the syslinux mailing list) pointed me into the right direction.\n\nI changed the Foreman provision template to the following (notice the last three lines):\n\n DEFAULT menu\n PROMPT 0\n MENU TITLE PXE Menu\n TIMEOUT 200\n TOTALTIMEOUT 6000\n ONTIMEOUT local\n\n LABEL local\n MENU LABEL (local)\n MENU DEFAULT\n\n #LOCALBOOT 0\n COM32 chain.c32\n APPEND hd0\n\nNow chainloading Grub and booting from a local RAID works! Using (link: http:\/\/www.syslinux.org\/wiki\/index.php\/Comboot\/chain.c32 text: chain.c32) also works for chainloading windows bootloaders and in a VMware vSphere environment, so I've set it to the global default.