Project

General

Profile

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

Lukas Zapletal, 11/24/2015 09:21 AM

1 9 Lukas Zapletal
h1. Fetch boot files via HTTP instead of TFTP
2 1 Alexander Chuzhoy
3 9 Lukas Zapletal
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.
4 1 Alexander Chuzhoy
5 9 Lukas Zapletal
In your Foreman instance, go to "Provisioning templates" and create new template of PXELinux kind with the following contents:
6
7
<pre><code>
8
DEFAULT linux
9
LABEL linux
10
KERNEL ipxe.lkrn
11
APPEND dhcp && chain <%= foreman_url('iPXE') %>
12 1 Alexander Chuzhoy
IPAPPEND 2
13
</code></pre>
14 9 Lukas Zapletal
15
Recent version of Foreman ships with this template already under name "PXELinux chain iPXE".
16
17
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.
18
19
Make sure you have a template of iPXE kind with the following body:
20
21
<pre><code>#!ipxe
22
kernel <%= "#{@host.url_for_boot(:kernel)}" %> ks=<%= foreman_url("provision")%>
23
initrd <%= "#{@host.url_for_boot(:initrd)}" %>
24 2 Ohad Levy
boot
25
</code></pre>
26 9 Lukas Zapletal
27
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!
28
29
h2. Notes
30
31
# 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.