Project

General

Profile

« Previous | Next » 

Revision 14dd0353

Added by Ohad Levy over 13 years ago

  • ID 14dd0353b2c7d16084a13c7b1ab52630887cabe3

fixes #470 - Add gpxe scripts support

This commit implements the following:
  • dynamic gpxe script that kickstart purly with gpxe - see usage example below
  • add static network option to kickstart, ie if added ?static=true to the url, network configuration would be static
    at the moment this should only be used with gpxe, or alternatviily you would need to
    provide the network information as a kernel argument (see gpxe_kickstart_config file as an example for that.

gpxe usage example

press ctrl-b for interactive mode
#get network from dhcp
dhcp net0
#or set static
ifopen
set net0/ip <your host ip>
set net0/netmask <netmask>
set net0/gateway <your gateway>
set net0/dns <dns server>

  1. tell gpxe to ask foreman for instructions
    kernel http://foreman/unattended/gpxe_kickstart_config
    boot

View differences:

app/views/unattended/kickstart.rhtml
<%= "selinux --disabled\n" if @osver != 3 -%>
keyboard us
skipx
network --bootproto dhcp
network --bootproto <%= @static ? "static" : "dhcp" %> --hostname <%= @host %>
rootpw --iscrypted <%= root_pass %>
firewall --disabled
authconfig --useshadow --enablemd5 <%= @osver != 3 and @osver != 4 ? '--disablenis' : '' %>
......
<% else -%>
<%= @host.diskLayout %>
<% end -%>
skipx
text
reboot

Also available in: Unified diff