Added Debian 10 support
- Ability to use base install, and also include nonfree firmware
- Documentation updates
- Fewer separators in menu to keep it all on one page
Change-Id: I460dc346d9585237d2d549c62d2b76ecfc757105
diff --git a/README.md b/README.md
index 66d56bc..995d700 100644
--- a/README.md
+++ b/README.md
@@ -13,6 +13,7 @@
- Has a menu that reports system information and network status
- Gives options for installation (interactive and autoinstall) and diagnostic
tools (currently: memtest)
+ - Alternate options to help debug or supply nonfree firmware
- By default, continues boot normally after 10 seconds
Also populates the kernel, initrd, and other files needed to network boot.
@@ -41,6 +42,10 @@
- iPXE docs on preseed files and kernel arguments:
https://ipxe.org/appnote/debian_preseed
+Some systems may need additional firmware to boot properly (for example, to
+initialize network cards), which can be supplied during boot as another
+cpio file: https://wiki.debian.org/DebianInstaller/NetbootFirmware
+
## Example Playbook
```yaml
diff --git a/defaults/main.yml b/defaults/main.yml
index 95ec8b8..d280cc4 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -24,6 +24,27 @@
pxeboot_syslinux_version: "5.10"
pxeboot_syslinux_checksum: "sha256:d9cd7727bfed2c0ca5bf07bb3d213286e014a78e92a6a89ac32eb906d6b7ab3f"
+# Debian 10 image
+pxeboot_debian10_base_url: "https://deb.debian.org/debian/dists/buster/main/installer-amd64"
+pxeboot_debian10_version: "current/images/netboot/debian-installer/amd64/"
+
+# checksums from version as of 2021-03-22
+pxeboot_debian10_files:
+ - name: "linux"
+ checksum: "sha256:d758470d7d1b4148309533e73de20ad2276fa861ce4dabaf0dae360f782fa1fa"
+ - name: "initrd.gz"
+ checksum: "sha256:0410d8d013be5275c82c04e780307b76f520ad1859e9eb771c82aaef858a2ba6"
+
+pxeboot_debian10_linux_args: ""
+
+pxeboot_debian10_nonfree_url: "http://cdimage.debian.org/cdimage/unofficial/non-free/"
+
+# checksums from version as of 2021-03-22
+pxeboot_debian10_nonfree_files:
+ - path: "firmware/buster/current"
+ name: "firmware.cpio.gz"
+ checksum: "sha256:f69ffd2202e5aee01b8f500a46daddfb9f787788d4acac5069e6a331d375e721"
+
# Ubuntu 18.04 image
pxeboot_ubuntu1804_base_url: "http://archive.ubuntu.com/ubuntu/dists/bionic-updates/main/installer-amd64"
pxeboot_ubuntu1804_version: "20101020ubuntu543.17/images/hwe-netboot/ubuntu-installer/amd64"
@@ -37,7 +58,6 @@
pxeboot_ubuntu1804_linux_args: ""
# preseed config
-
# this should be replaced with a modular crypt string, or login will not work.
preseed_onfadmin_pw_crypt: "!!"
diff --git a/tasks/debian10.yml b/tasks/debian10.yml
new file mode 100644
index 0000000..7a520ba
--- /dev/null
+++ b/tasks/debian10.yml
@@ -0,0 +1,43 @@
+---
+# pxeboot tasks/debian10.yml
+#
+# SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
+# SPDX-License-Identifier: Apache-2.0
+
+- name: Create debian10 dir in webroot
+ file:
+ state: directory
+ path: "{{ pxeboot_web_root }}/debian10"
+ owner: "{{ pxeboot_username }}"
+ group: "{{ pxeboot_groupname }}"
+ mode: "0755"
+
+- name: Download debian10 base files
+ get_url:
+ url: "{{ pxeboot_debian10_base_url }}/{{ pxeboot_debian10_version }}/{{ item['name'] }}"
+ dest: "{{ pxeboot_web_root }}/debian10/{{ item['name'] }}"
+ checksum: "{{ item['checksum'] }}"
+ owner: "{{ pxeboot_username }}"
+ group: "{{ pxeboot_groupname }}"
+ mode: "0644"
+ with_items: "{{ pxeboot_debian10_files }}"
+
+- name: Download debian10 nonfree files
+ get_url:
+ url: "{{ pxeboot_debian10_nonfree_url }}/{{ item['path'] }}/{{ item['name'] }}"
+ dest: "{{ pxeboot_web_root }}/debian10/{{ item['name'] }}"
+ checksum: "{{ item['checksum'] }}"
+ owner: "{{ pxeboot_username }}"
+ group: "{{ pxeboot_groupname }}"
+ mode: "0644"
+ with_items: "{{ pxeboot_debian10_nonfree_files }}"
+
+# FIXME: No preseed yet
+# - name: Create preseed files
+# template:
+# src: "debian10_preseed.cfg.j2"
+# dest: "{{ pxeboot_web_root }}/debian10/{{ item['serial'] }}_preseed.cfg"
+# owner: "{{ pxeboot_username }}"
+# group: "{{ pxeboot_groupname }}"
+# mode: "0644"
+# with_items: "{{ pxeboot_hosts }}"
diff --git a/tasks/main.yml b/tasks/main.yml
index 0128696..a261517 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -29,6 +29,7 @@
# create boot targets
- include_tasks: "memtest.yml"
- include_tasks: "ubuntu1804.yml"
+- include_tasks: "debian10.yml"
- name: Create iPXE menu chainboot script from template
template:
diff --git a/templates/boot.ipxe.j2 b/templates/boot.ipxe.j2
index 648c3ef..28721e4 100644
--- a/templates/boot.ipxe.j2
+++ b/templates/boot.ipxe.j2
@@ -12,21 +12,21 @@
# menu
:start
menu ONF iPXE Boot Menu
-item --gap -- ------------------------- System Info ------------------------------------
+item --gap -- ------------------------- System and Network Info ------------------------
item --gap -- MAC: ${net0/mac}, Serial Number: ${serial}, Chipset: ${net0/chip}
item --gap -- Manufacturer: ${manufacturer}, Product: ${product}
item --gap -- UUID: ${uuid}
-item --gap -- ------------------------- Network Info ------------------------------------
item --gap -- IP: ${net0/ip}, Netmask: ${net0/netmask}, Gateway: ${net0/gateway}
item --gap -- DNS Servers: ${net0/dns}, Domain: ${net0/domain}
item --gap -- DHCP Server: ${net0/dhcp-server}
item --gap -- ------------------------- Operating systems ------------------------------
+item --key d deb10 Debian 10 Installer
+item --key f deb10f Debian 10 Installer (nonfree firmware)
item --key u ub1804 Ubuntu 18.04 Installer
-item --key u ub1804a Ubuntu 18.04 Installer (fully automatic)
-item --key u ub1804adt Ubuntu 18.04 Installer (fully automatic, debug, text)
-item --gap -- ------------------------- Diagnostics ------------------------------------
+item --key a ub1804a Ubuntu 18.04 Installer (fully automatic)
+item --key t ub1804adt Ubuntu 18.04 Installer (fully automatic, debug, text)
+item --gap -- ------------------------- Utilities --------------------------------------
item --key m memtest Memtest
-item --gap -- ------------------------- Other ------------------------------------------
item --key c configure Configuration Menu
item --key s shell iPXE Shell
item --key r reboot Reboot
@@ -73,6 +73,21 @@
# installers
+# Debian 10
+:deb10
+echo Booting Debian 10 Installer
+kernel ${http_server_url}/debian10/linux
+initrd ${http_server_url}/debian10/initrd.gz
+boot || goto failed
+
+# Debian 10 with nonfree firmware
+:deb10f
+echo Booting Debian 10 Installer with nonfree firmware
+kernel ${http_server_url}/debian10/linux initrd=initrd.gz initrd=firmware.cpio.gz
+initrd ${http_server_url}/debian10/initrd.gz
+initrd ${http_server_url}/debian10/firmware.cpio.gz
+boot || goto failed
+
# Ubuntu 18.04
:ub1804
echo Booting Ubuntu 18.04 Installer