Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EFI: Add floppy images #1526

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions roles/netbootxyz/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ bootloaders:
ipxe_bin: snponly.efi
output_bin: -snponly.efi
type: DHCP-snponly
- desc: DHCP EFI Floppy boot image file, uses built-in iPXE NIC drivers
ipxe_bin: ipxe.efi.dsk
output_bin: .efi.dsk
type: Floppy
- desc: EFI Floppy image w/ Simple Network Protocol, attempts to boot all net devices
ipxe_bin: snp.efi.dsk
output_bin: -snp.efi.dsk
type: Floppy-snp
cert_dir: /etc/netbootxyz/certs
cert_file_filename: ca-netboot-xyz.crt
checksums_filename: '{{ site_name }}-sha256-checksums.txt'
Expand Down
14 changes: 14 additions & 0 deletions roles/netbootxyz/tasks/generate_disks_efi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@
chdir: "{{ ipxe_source_dir }}/src"
when: ipxe_debug_enabled | bool

- name: Generate iPXE floppy images for EFI
ansible.builtin.shell: |
truncate -s 1440k bin-x86_64-efi/ipxe.efi.dsk
mformat -i bin-x86_64-efi/ipxe.efi.dsk -f 1440 ::
mmd -i bin-x86_64-efi/ipxe.efi.dsk ::EFI
mmd -i bin-x86_64-efi/ipxe.efi.dsk ::EFI/BOOT
cp bin-x86_64-efi/ipxe.efi.dsk bin-x86_64-efi/snp.efi.dsk
mcopy -i bin-x86_64-efi/ipxe.efi.dsk bin-x86_64-efi/ipxe.efi ::EFI/BOOT/BOOTX64.EFI
mcopy -i bin-x86_64-efi/snp.efi.dsk bin-x86_64-efi/snp.efi ::EFI/BOOT/BOOTX64.EFI
args:
chdir: "{{ ipxe_source_dir }}/src"

- name: Copy iPXE EFI builds to http directory
ansible.builtin.copy:
src: "{{ ipxe_source_dir }}/src/{{ item.src }}"
Expand All @@ -60,3 +72,5 @@
- {src: "bin-x86_64-efi/ipxe.efi", dest: "{{ bootloader_filename }}.efi"}
- {src: "bin-x86_64-efi/snp.efi", dest: "{{ bootloader_filename }}-snp.efi"}
- {src: "bin-x86_64-efi/snponly.efi", dest: "{{ bootloader_filename }}-snponly.efi"}
- {src: "bin-x86_64-efi/ipxe.efi.dsk", dest: "{{ bootloader_filename }}.efi.dsk"}
- {src: "bin-x86_64-efi/snp.efi.dsk", dest: "{{ bootloader_filename }}-snp.efi.dsk"}
1 change: 1 addition & 0 deletions roles/netbootxyz/vars/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ netbootxyz_packages:
- syslinux
- syslinux-common
- toilet
- mtools
1 change: 1 addition & 0 deletions roles/netbootxyz/vars/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ netbootxyz_packages:
- syslinux
- syslinux-common
- toilet
- mtools

pipxe_packages:
- acpica-tools
Expand Down
Loading