Files
netboot.xyz/roles/netbootxyz/templates/index.html.j2
T
Antony Messerli d059ddb7a8 Add UEFI Secure Boot support using iPXE v2.0.0 signed binaries
Downloads pre-built Microsoft-signed iPXE Secure Boot binaries from
the iPXE v2.0.0 release (ipxeboot.tar.gz) and packages them with a
templated autoexec.ipxe that chains into the netboot.xyz menu system.

Boot flow: UEFI firmware validates iPXE shim (Microsoft-signed) which
loads iPXE (signed by iPXE Secure Boot CA) which auto-loads
autoexec.ipxe (text script, no SB validation needed) which chains to
https://boot.netboot.xyz/menu.ipxe.

Changes:
- New generate_disks_secureboot.yml task to download and package
  signed iPXE binaries for x86_64 and ARM64
- New autoexec.ipxe.j2 template with DHCP, failsafe menu, and
  HTTPS/HTTP fallback chain to boot.netboot.xyz
- Bootloader entries and index.html sections for Secure Boot binaries
  served from ipxe/secureboot-x86_64/ and ipxe/secureboot-arm64/
- Checksum generation updated to handle subdirectories
- Debian menu template updated with shim command for Secure Boot
  kernel validation (no-op on non-SB systems)
- Production overrides enable Secure Boot generation

Closes #1745
2026-03-14 00:20:17 -05:00

207 lines
6.1 KiB
Django/Jinja

#!ipxe
#### {{ boot_domain }} initial loader ####
#### see https://netboot.xyz for more information ####
{% if bootloader_https_enabled | bool %}
set conn_type https
chain --autofree https://{{ boot_domain }}/menu.ipxe || echo HTTPS failed... attempting HTTP...
{% endif %}
{% if bootloader_http_enabled | bool %}
set conn_type http
chain --autofree http://{{ boot_domain }}/menu.ipxe || echo HTTP failed, localbooting...
{% endif %}
exit
<!DOCTYPE html>
<html lang="en">
<head>
<title>{{ site_name }} BootLoaders - Powered by netboot.xyz</title>
<meta name='description' content='Download links for available {{ site_name }} bootloaders.'>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
table, th, td {
padding: 5px;
border: 1px solid black;
}
</style>
</head>
<body>
<div style="font-family: monospace, fixed; font-weight: bold;">
{% if index_title.stdout is defined %}
{{ index_title.stdout }}
{% else %}
<h1>{{ site_name }}</h1>
{% endif %}
<p>
Version: {{ boot_version }}<br>
Powered by <a href=https://netboot.xyz>netboot.xyz</a>
</p>
{% if generate_disks_hybrid == true %}
<p>x86_64 Legacy and EFI Combined iPXE Bootloaders</p>
<table style="width:100%">
<!-- table header -->
<tr>
<th style="width:10%;"> Type </th>
<th style="width:20%;"> Bootloader </th>
<th style="width:70%;"> Description </th>
</tr>
<!-- table rows -->
{% for item in bootloaders.hybrid %}
<tr>
<td> {{ item.type }} </td>
<td> <a href="ipxe/{{ bootloader_filename }}{{ item.output_bin }}">{{ bootloader_filename }}{{ item.output_bin }}</a> </td>
<td> {{ item.desc }} </td>
</tr>
{% endfor %}
</table>
<p>Multi-arch (x86_64 and arm64) Legacy and EFI Combined iPXE Bootloaders</p>
<table style="width:100%">
<!-- table header -->
<tr>
<th style="width:10%;"> Type </th>
<th style="width:20%;"> Bootloader </th>
<th style="width:70%;"> Description </th>
</tr>
<!-- table rows -->
{% for item in bootloaders.multiarch %}
<tr>
<td> {{ item.type }} </td>
<td> <a href="ipxe/{{ bootloader_filename }}{{ item.output_bin }}">{{ bootloader_filename }}{{ item.output_bin }}</a> </td>
<td> {{ item.desc }} </td>
</tr>
{% endfor %}
</table>
{% endif %}
{% if generate_disks_legacy == true %}
<p>x86_64 Legacy (PCBIOS) iPXE Bootloaders</p>
<table style="width:100%">
<!-- table header -->
<tr>
<th style="width:10%;"> Type </th>
<th style="width:20%;"> Bootloader </th>
<th style="width:70%;"> Description </th>
</tr>
<!-- table rows -->
{% for item in bootloaders.legacy %}
<tr>
<td> {{ item.type }} </td>
<td> <a href="ipxe/{{ bootloader_filename }}{{ item.output_bin }}">{{ bootloader_filename }}{{ item.output_bin }}</a> </td>
<td> {{ item.desc }} </td>
</tr>
{% endfor %}
</table>
{% endif %}
{% if generate_disks_efi == true %}
<p>x86_64 UEFI iPXE Bootloaders</p>
<table style="width:100%">
<!-- table header -->
<tr>
<th style="width:10%;"> Type </th>
<th style="width:20%;"> Bootloader </th>
<th style="width:70%;"> Description </th>
</tr>
<!-- table rows -->
{% for item in bootloaders.uefi %}
<tr>
<td> {{ item.type }} </td>
<td> <a href="ipxe/{{ bootloader_filename }}{{ item.output_bin }}">{{ bootloader_filename }}{{ item.output_bin }}</a> </td>
<td> {{ item.desc }} </td>
</tr>
{% endfor %}
</table>
{% endif %}
{% if generate_disks_arm == true %}
<p>ARM64 UEFI iPXE Bootloaders</p>
<table style="width:100%">
<!-- table header -->
<tr>
<th style="width:10%;"> Type </th>
<th style="width:20%;"> Bootloader </th>
<th style="width:70%;"> Description </th>
</tr>
<!-- table rows -->
{% for item in bootloaders.arm %}
<tr>
<td> {{ item.type }} </td>
<td> <a href="ipxe/{{ bootloader_filename }}{{ item.output_bin }}">{{ bootloader_filename }}{{ item.output_bin }}</a> </td>
<td> {{ item.desc }} </td>
</tr>
{% endfor %}
</table>
{% endif %}
{% if generate_disks_secureboot == true %}
<p>x86_64 UEFI Secure Boot iPXE Bootloaders (place all files from directory together)</p>
<table style="width:100%">
<!-- table header -->
<tr>
<th style="width:10%;"> Type </th>
<th style="width:20%;"> Bootloader </th>
<th style="width:70%;"> Description </th>
</tr>
<!-- table rows -->
{% for item in bootloaders.secureboot_x86_64 %}
<tr>
<td> {{ item.type }} </td>
<td> <a href="ipxe/secureboot-x86_64/{{ item.output_bin }}">{{ item.output_bin }}</a> </td>
<td> {{ item.desc }} </td>
</tr>
{% endfor %}
</table>
{% if generate_disks_arm == true %}
<p>ARM64 UEFI Secure Boot iPXE Bootloaders (place all files from directory together)</p>
<table style="width:100%">
<!-- table header -->
<tr>
<th style="width:10%;"> Type </th>
<th style="width:20%;"> Bootloader </th>
<th style="width:70%;"> Description </th>
</tr>
<!-- table rows -->
{% for item in bootloaders.secureboot_arm64 %}
<tr>
<td> {{ item.type }} </td>
<td> <a href="ipxe/secureboot-arm64/{{ item.output_bin }}">{{ item.output_bin }}</a> </td>
<td> {{ item.desc }} </td>
</tr>
{% endfor %}
</table>
{% endif %}
{% endif %}
{% if generate_disks_rpi == true %}
<p>Raspberry Pi iPXE Bootloaders</p>
<table style="width:100%">
<!-- table header -->
<tr>
<th style="width:10%;"> Type </th>
<th style="width:20%;"> Bootloader </th>
<th style="width:70%;"> Description </th>
</tr>
<!-- table rows -->
{% for item in bootloaders.rpi %}
<tr>
<td> {{ item.type }} </td>
<td> <a href="ipxe/{{ bootloader_filename }}{{ item.output_bin }}">{{ bootloader_filename }}{{ item.output_bin }}</a> </td>
<td> {{ item.desc }} </td>
</tr>
{% endfor %}
</table>
{% endif %}
<p>Checksums<p>
<a href="ipxe/{{ site_name }}-sha256-checksums.txt">SHA256 checksums</a>
</div>
</body>
</html>