Project

General

Profile

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

Ohad Levy, 02/27/2013 02:07 PM

1 8 Ohad Levy
h1.  Deal with updated pxeboot files without the need to delete or re-download them 
2 1 Alexander Chuzhoy
3
4 2 Ohad Levy
# In your foreman instance, go to "Provisioning templates".Create a new template (kind: PXELinux) and have the following in the body:
5 7 Alexander Chuzhoy
( You'll need to have the ipxe.lkrn file in your tftpboot directory. Can be downloaded from here attachment:ipxe.lkrn
6 3 Ohad Levy
<pre><code>default linux
7 2 Ohad Levy
label linux
8
IPAPPEND 2
9
kernel ipxe.lkrn
10
append dhcp && chain <%25= foreman_url('gPXE') %25>
11 1 Alexander Chuzhoy
</code></pre>
12 2 Ohad Levy
# Make sure you have a template (kind: gPXE) with the following in the body:
13 3 Ohad Levy
<pre><code>#!gpxe
14 2 Ohad Levy
kernel <%25= "#{@host.url_for_boot(:kernel)}" %25> ks=<%25= foreman_url("provision")%25>
15
initrd <%25= "#{@host.url_for_boot(:initrd)}" %25>
16
boot
17
</code></pre>
18
# Make sure you have your (or default) kickstart template (kind: provision).
19
# In the association tab of the above templates select the desired "applicable operating systems".
20
# Go to "Operating Systems" and in the "Templates" tab select the respective "provision", "gPXE" and "PXELinux" templates (should be 3 templates in total).
21
# Now you can either assign the OS to some host group or simply edit some host and change its OS.
22
# That's it - verify it works!