Project

General

Profile

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

Revision 8 (Ohad Levy, 02/27/2013 02:07 PM) → Revision 9/26 (Lukas Zapletal, 11/24/2015 09:21 AM)

h1. Fetch boot    Deal with updated pxeboot 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 without the need to configure PXELinux to chainboot iPXE and continue booting via HTTP protocol which is fast and reliable. 

 delete or re-download them  


 # In your Foreman foreman instance, go to "Provisioning templates" and create templates".Create a new template of PXELinux kind with (kind: PXELinux) and have the following contents: 

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

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

 in the body: 
 ( You'll need to have the @ipxe.lkrn@ 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. 

 attachment:ipxe.lkrn 
 <pre><code>default linux 
 label linux 
 IPAPPEND 2 
 kernel ipxe.lkrn 
 append dhcp && chain <%25= foreman_url('gPXE') %25> 
 </code></pre> 
 # Make sure you have a template of iPXE kind (kind: gPXE) with the following in the body: 

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

 Associate 
 # Make sure you have your (or default) kickstart template (kind: provision). 
 # In the association tab of the above templates with an Operating System select the desired "applicable operating systems". 
 # Go to "Operating Systems" and make sure there is a provisioning template associated as well. in the "Templates" tab select the respective "provision", "gPXE" and "PXELinux" templates (should be 3 templates in total). 
 # Now you can either assign the OS to some host group or simply edit some host and change its OS. 
 # That's it - verify it works! 

 h2. Notes 

 # 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.