Project

General

Profile

Download (1.01 KB) Statistics
| Branch: | Tag: | Revision:
#!gpxe
<%#
kind: iPXE
name: Preseed default iPXE
oses:
- Debian
- Ubuntu
%>
<% if @host.operatingsystem.name == 'Debian' -%>
<% keyboard_params = "auto=true domain=#{@host.domain}" -%>
<% else -%>
<% keyboard_params = 'console-setup/ask_detect=false console-setup/layout=USA console-setup/variant=USA keyboard-configuration/layoutcode=us' -%>
<% end -%>
<% boot_files_uris = @host.operatingsystem.boot_files_uri(@host.medium,@host.architecture) -%>
<% kernel = boot_files_uris[0] -%>
<% initrd = boot_files_uris[1] -%>
<% static = @host.token.nil? ? '?static=yes' : '&static=yes' -%>

kernel <%= kernel %> interface=auto url=<%= foreman_url('provision')%><%= static %> ramdisk_size=10800 root=/dev/rd/0 rw auto netcfg/disable_dhcp=true BOOTIF=${netX/mac} hostname=<%= @host.name %> <%= keyboard_params %> locale=<%= @host.params['lang'] || 'en_US' %> netcfg/get_ipaddress=${netX/ip} netcfg/get_netmask=${netX/netmask} netcfg/get_gateway=${netX/gateway} netcfg/get_nameservers=${dns} netcfg/confirm_static=true
initrd <%= initrd %>

boot
(5-5/7)