Skip to content

Commit

Permalink
Add EFI floppy images
Browse files Browse the repository at this point in the history
  • Loading branch information
xesxen committed Oct 28, 2024
1 parent 115017e commit f122171
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
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

0 comments on commit f122171

Please sign in to comment.