Fetch boot files via http instead of TFTP » History » Version 4
Ohad Levy, 12/16/2012 04:37 AM
1 | 1 | Alexander Chuzhoy | h1. Deal with updated pxeboot files without the need to deletere-download them |
---|---|---|---|
2 | |||
3 | Let's say you use a beta version of some Linux release, and although the installation tree update is easily resolved by having a soft link named "Latest" that always points to the latest tree, you still have a problem with the pxeboot files (i.e vmlinuz and initrd), as these files need to be placed under your tftp shared directory and updated to match the installation tree. |
||
4 | |||
5 | Here are the steps to deal with the described above: |
||
6 | |||
7 | 2 | Ohad Levy | # In your foreman instance, go to "Provisioning templates".Create a new template (kind: PXELinux) and have the following in the body: |
8 | 3 | Ohad Levy | <pre><code>default linux |
9 | 2 | Ohad Levy | label linux |
10 | IPAPPEND 2 |
||
11 | kernel ipxe.lkrn |
||
12 | append dhcp && chain <%25= foreman_url('gPXE') %25> |
||
13 | 1 | Alexander Chuzhoy | </code></pre> |
14 | 2 | Ohad Levy | # Make sure you have a template (kind: gPXE) with the following in the body: |
15 | 3 | Ohad Levy | <pre><code>#!gpxe |
16 | 2 | Ohad Levy | kernel <%25= "#{@host.url_for_boot(:kernel)}" %25> ks=<%25= foreman_url("provision")%25> |
17 | initrd <%25= "#{@host.url_for_boot(:initrd)}" %25> |
||
18 | boot |
||
19 | </code></pre> |
||
20 | # Make sure you have your (or default) kickstart template (kind: provision). |
||
21 | # In the association tab of the above templates select the desired "applicable operating systems". |
||
22 | # Go to "Operating Systems" and in the "Templates" tab select the respective "provision", "gPXE" and "PXELinux" templates (should be 3 templates in total). |
||
23 | # Now you can either assign the OS to some host group or simply edit some host and change its OS. |
||
24 | # That's it - verify it works! |