Commit 25bda601 authored by Ivo De Decker's avatar Ivo De Decker

Add support for force-autoinstall flag in staticips.

Hosts with the pxeflag 'force-autoinstall' will start d-i instead of waiting
at the grub menu when booted from the pxe server.
Signed-off-by: Ivo De Decker's avatarIvo De Decker <>
parent ee1ee3a4
Pipeline #34199 passed with stage
in 2 minutes and 29 seconds
......@@ -10,6 +10,11 @@ dhcp-host={{ host.mac }},set:host-{{ host.hostname }}{% if host.noipxe|default(f
{% if host.ip is defined %}host-record={{ host.hostname }},{{ host.ip }}{% endif %}
{% if host.pxeflags is defined %}
{# dhcp option 224-254 are reserved for private use
see #}
dhcp-option-force=tag:host-{{ host.hostname }},224,"{{ host.pxeflags|join(',') }}"
{% endif %}
dhcp-option-force=tag:host-{{ host.hostname }},209,"partman-auto/disk={{ host.disk|default(default_install_disk) }} grub-installer/bootdev={{ host.disk|default(default_install_disk) }}{% if host.tasks is defined %} tasks={{ host.tasks|join(',') }}{% endif %}"
{% endfor %}
......@@ -31,6 +31,13 @@ Main variables are:
- `noipxe`: Disable chain load the iPXE client.
DebConf videos' HP laptops don't seem to
like it.
- `pxeflags`: List of flags for pxe boot.
The flags can be:
- `force-autoinstall`: Force automatic installation on pxe boot.
When the mac address is set, this will cause d-i
to start and wipe the machine. USE WITH CAUTION!
When the mac address is not set, d-i will start
and ask for the hostname.
* `staticips.write_hosts`: Boolean. Write the contents of
`staticips.hosts` into `/etc/hosts`.
* `staticips.write_interfaces: Boolean. Write the machine's details into
......@@ -8,17 +8,29 @@ timeout={{ pxe_timeout }}
# allows per host config options
net_get_dhcp_option appends ${net_default_interface} 209 string
net_get_dhcp_option dhcp_hostname ${net_default_interface} 12 string
net_get_dhcp_option pxeflags ${net_default_interface} 224 string
if [ "${pxeflags}" == "force-autoinstall" ]; then
append="--- auto=true url=${tftp} DEBCONF_DEBUG=5 domain={{ domain }} ${appends} interface=${net_default_mac} hw-detect/load_firmware=false rescue/enable=false"
if [ -n "${autoinstall}" ]; then
# force unattended install
# Default pxe item
menuentry "Boot hd0" {
insmod biosdisk
set root=hd0
chainloader +1
{% for suite in debian_suites + ubuntu_suites %}
{% for arch in archs %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment