Project

General

Profile

Actions

Fetch boot files via http instead of TFTP » History » Revision 9

« Previous | Revision 9/26 (diff) | Next »
Lukas Zapletal, 11/24/2015 09:21 AM


Fetch boot files via HTTP instead of TFTP

TFTP is a slow protocol on high-latency networks, but if your hardware is supported by iPXE (http://ipxe.org/appnote/hardware_drivers) it is possible to configure PXELinux to chainboot iPXE and continue booting via HTTP protocol which is fast and reliable.

In your Foreman instance, go to "Provisioning templates" and create new template of PXELinux kind with the following contents:


DEFAULT linux
LABEL linux
KERNEL ipxe.lkrn
APPEND dhcp && chain <%= foreman_url('iPXE') %>
IPAPPEND 2

Recent version of Foreman ships with this template already under name "PXELinux chain iPXE".

You'll need to have the ipxe.lkrn file in your tftpboot directory. Can be downloaded from here attachment:ipxe.lkrn, from your distribution (e.g. Red Hat systems ships in /usr/share/ipxe/ipxe.lkrn - package ipxe-bootimgs) or compiled from source.

Make sure you have a template of iPXE kind with the following body:

#!ipxe
kernel <%= "#{@host.url_for_boot(:kernel)}" %> ks=<%= foreman_url("provision")%>
initrd <%= "#{@host.url_for_boot(:initrd)}" %>
boot

Associate the above templates with an Operating System and make sure there is a provisioning template associated as well. That's it - verify it works!

Notes

  1. Older versions of Foreman may refer iPXE as gPXE, which is an older project iPXE was based (forked) on. In the most recent versions, gPXE is just an alias to iPXE.

Updated by Lukas Zapletal about 9 years ago · 26 revisions