From fe57e9866481cc892df9fc3cccc3e2acbb9b22f8 Mon Sep 17 00:00:00 2001 From: Antony Messerli Date: Sun, 10 Nov 2019 17:31:00 +0000 Subject: [PATCH] Adding more changes --- TODO.md | 2 +- roles/netbootxyz/defaults/main.yml | 24 ++- roles/netbootxyz/files/ipxe/disks/netboot.xyz | 67 +++++++++ .../files/ipxe/disks/netboot.xyz-gce | 68 +++++++++ .../files/ipxe/disks/netboot.xyz-packet | 69 +++++++++ roles/netbootxyz/files/ipxe/local/colour.h | 28 ++++ roles/netbootxyz/files/ipxe/local/crypto.h | 1 + roles/netbootxyz/files/ipxe/local/general.h | 11 ++ .../netbootxyz/files/ipxe/local/general.h.efi | 10 ++ roles/netbootxyz/files/ipxe/local/nap.h.efi | 4 + roles/netbootxyz/files/ipxe/local/usb.h.efi | 2 + roles/netbootxyz/tasks/generate_disks.yml | 139 +----------------- roles/netbootxyz/tasks/generate_disks_arm.yml | 0 .../netbootxyz/tasks/generate_disks_base.yml | 66 +++++++++ roles/netbootxyz/tasks/generate_disks_efi.yml | 44 ++++++ .../tasks/generate_disks_legacy.yml | 36 +++++ roles/netbootxyz/tasks/generate_menus.yml | 8 +- .../templates/disks/ipxe-bootloader.j2 | 8 +- .../menu/{boot.ipxe.j2 => boot.cfg.j2} | 10 +- roles/netbootxyz/templates/menu/bsd.ipxe.j2 | 4 +- .../netbootxyz/templates/menu/gentoo.ipxe.j2 | 32 ++++ roles/netbootxyz/templates/menu/index.html | 7 - roles/netbootxyz/templates/menu/index.html.j2 | 11 ++ roles/netbootxyz/templates/menu/linux.ipxe.j2 | 2 +- roles/netbootxyz/templates/menu/live.ipxe.j2 | 2 +- .../templates/menu/liveubuntu-default.ipxe.j2 | 23 ++- .../templates/menu/liveubuntu.ipxe.j2 | 26 ---- .../netbootxyz/templates/menu/mageia.ipxe.j2 | 44 ++++++ roles/netbootxyz/templates/menu/menu.ipxe.j2 | 2 +- roles/netbootxyz/templates/menu/rhel.ipxe.j2 | 52 +++++++ .../netbootxyz/templates/menu/windows.ipxe.j2 | 59 ++++++++ roles/netbootxyz/vars/ubuntu.yml | 5 + user_overrides.yml | 6 +- 33 files changed, 683 insertions(+), 189 deletions(-) create mode 100644 roles/netbootxyz/files/ipxe/disks/netboot.xyz create mode 100644 roles/netbootxyz/files/ipxe/disks/netboot.xyz-gce create mode 100644 roles/netbootxyz/files/ipxe/disks/netboot.xyz-packet create mode 100644 roles/netbootxyz/files/ipxe/local/colour.h create mode 100644 roles/netbootxyz/files/ipxe/local/crypto.h create mode 100644 roles/netbootxyz/files/ipxe/local/general.h create mode 100644 roles/netbootxyz/files/ipxe/local/general.h.efi create mode 100644 roles/netbootxyz/files/ipxe/local/nap.h.efi create mode 100644 roles/netbootxyz/files/ipxe/local/usb.h.efi create mode 100644 roles/netbootxyz/tasks/generate_disks_arm.yml create mode 100644 roles/netbootxyz/tasks/generate_disks_base.yml create mode 100644 roles/netbootxyz/tasks/generate_disks_efi.yml create mode 100644 roles/netbootxyz/tasks/generate_disks_legacy.yml rename roles/netbootxyz/templates/menu/{boot.ipxe.j2 => boot.cfg.j2} (90%) create mode 100644 roles/netbootxyz/templates/menu/gentoo.ipxe.j2 delete mode 100644 roles/netbootxyz/templates/menu/index.html create mode 100644 roles/netbootxyz/templates/menu/index.html.j2 delete mode 100644 roles/netbootxyz/templates/menu/liveubuntu.ipxe.j2 create mode 100644 roles/netbootxyz/templates/menu/mageia.ipxe.j2 create mode 100644 roles/netbootxyz/templates/menu/rhel.ipxe.j2 create mode 100644 roles/netbootxyz/templates/menu/windows.ipxe.j2 diff --git a/TODO.md b/TODO.md index 3b8ab047..036513b4 100644 --- a/TODO.md +++ b/TODO.md @@ -9,4 +9,4 @@ * More host OS support * Docker images * package cacher -* port netboot.xyz to this in staging env to validate and test \ No newline at end of file +* port netboot.xyz to this in staging env to validate and test diff --git a/roles/netbootxyz/defaults/main.yml b/roles/netbootxyz/defaults/main.yml index 25a60a75..fe40a2f0 100644 --- a/roles/netbootxyz/defaults/main.yml +++ b/roles/netbootxyz/defaults/main.yml @@ -1,17 +1,27 @@ --- +### site configuration ### site_name: netboot.xyz boot_domain: boot.netboot.xyz boot_version: 1.04 +sigs_enabled: false +img_sigs_enabled: false +sigs_location: "http://${boot_domain}/sigs/" +memdisk_location: "http://${boot_domain}/memdisk" + ipxe_repo: https://github.com/ipxe/ipxe.git ipxe_branch: master ipxe_source_dir: /usr/src/ipxe -netbootxyz_repo: https://github.com/netbootxyz/netboot.xyz.git -netbootxyz_branch: master +live_endpoint: "https://github.com/netbootxyz" netbootxyz_root: /var/www/html +bootloader_tftp_enabled: false +bootloader_https_enabled: true +bootloader_http_enabled: true + +### release values ### releases: alpinelinux: name: "Alpine Linux" @@ -126,6 +136,7 @@ releases: code_name: "edge" freebsd: name: "FreeBSD" + enabled: false menu: "bsd" versions: - name: "FreeBSD 12.0" @@ -157,14 +168,16 @@ releases: gentoo: name: "Gentoo" mirror: "" + enabled: false menu: "linux" versions: - - name: "TBA" - code_name: "TBA" + - name: "Minimal CD 20160204 (amd64)" + code_name: "20160204" ipfire: name: "IPFire" mirror: "downloads.ipfire.org" menu: "linux" + enabled: true versions: - name: "2.21 Core 126" code_name: "2.21-core126" @@ -301,6 +314,7 @@ releases: name: "Scientific Linux" mirror: "ftp1.scientificlinux.org" base_dir: "" + enabled: true menu: "linux" versions: - name: "7.7" @@ -315,6 +329,7 @@ releases: name: "Slackware" mirror: "mirror.rackspace.com" base_dir: "slackware" + enabled: true menu: "linux" versions: - name: "Current" @@ -326,6 +341,7 @@ releases: tinycore: name: "Tiny Core Linux" mirror: "tinycorelinux.net" + enabled: true menu: "linux" versions: - name: "Core [ISO]" diff --git a/roles/netbootxyz/files/ipxe/disks/netboot.xyz b/roles/netbootxyz/files/ipxe/disks/netboot.xyz new file mode 100644 index 00000000..fb3d1254 --- /dev/null +++ b/roles/netbootxyz/files/ipxe/disks/netboot.xyz @@ -0,0 +1,67 @@ +#!ipxe +set esc:hex 1b +set bold ${esc:string}[1m +set boldoff ${esc:string}[22m +set fg_gre ${esc:string}[32m +set fg_cya ${esc:string}[36m +set fg_whi ${esc:string}[37m +set HTTPS_ERR HTTPS appears to have failed... attempting HTTP +set HTTP_ERR HTTP has failed, localbooting... +set version 1.04 + +:start +echo ${bold}${fg_gre}netboot.xyz ${fg_whi}v${version}${boldoff} +prompt --key m --timeout 4000 Hit the ${bold}m${boldoff} key to open failsafe menu... && goto failsafe || goto dhcp + +:dhcp +echo +dhcp || goto netconfig +goto menu + +:failsafe +menu netboot.xyz Failsafe Menu +item localboot Boot to local drive +item netconfig Manual network configuration +item retry Retry boot +item debug iPXE Debug Shell +item reboot Reboot System +choose failsafe_choice || exit +goto ${failsafe_choice} + +:netconfig +echo Network Configuration: +echo Available interfaces... +ifstat +imgfree +echo -n Set network interface number [0 for net0, defaults to 0]: ${} && read net +isset ${net} || set net 0 +echo -n IP: && read net${net}/ip +echo -n Subnet mask: && read net${net}/netmask +echo -n Gateway: && read net${net}/gateway +echo -n DNS: && read dns +ifopen net${net} +echo Attempting chainload of netboot.xyz... +goto menu || goto failsafe + +:menu +set conn_type https +chain --autofree https://boot.netboot.xyz/menu.ipxe || echo ${HTTPS_ERR} +sleep 5 +set conn_type http +chain --autofree http://boot.netboot.xyz/menu.ipxe || echo ${HTTP_ERR} +goto localboot + +:localboot +exit + +:retry +goto start + +:reboot +reboot +goto start + +:debug +echo Type "exit" to return to menu +shell +goto failsafe diff --git a/roles/netbootxyz/files/ipxe/disks/netboot.xyz-gce b/roles/netbootxyz/files/ipxe/disks/netboot.xyz-gce new file mode 100644 index 00000000..76de70c3 --- /dev/null +++ b/roles/netbootxyz/files/ipxe/disks/netboot.xyz-gce @@ -0,0 +1,68 @@ +#!ipxe +set esc:hex 1b +set bold ${esc:string}[1m +set boldoff ${esc:string}[22m +set fg_gre ${esc:string}[32m +set fg_cya ${esc:string}[36m +set fg_whi ${esc:string}[37m +set HTTPS_ERR HTTPS appears to have failed... attempting HTTP +set HTTP_ERR HTTP has failed, localbooting... +set version 1.04 +set ipxe_cloud_config gce + +:start +echo ${bold}${fg_gre}netboot.xyz ${fg_whi}v${version} for ${fg_cya}Google Compute Engine${boldoff} +prompt --key m --timeout 4000 Hit the ${bold}m${boldoff} key to open failsafe menu... && goto failsafe || goto dhcp + +:dhcp +echo +dhcp || goto netconfig +goto menu + +:failsafe +menu netboot.xyz Failsafe Menu +item localboot Boot to local drive +item netconfig Manual network configuration +item retry Retry boot +item debug iPXE Debug Shell +item reboot Reboot System +choose failsafe_choice || exit +goto ${failsafe_choice} + +:netconfig +echo Network Configuration: +echo Available interfaces... +ifstat +imgfree +echo -n Set network interface number [0 for net0, defaults to 0]: ${} && read net +isset ${net} || set net 0 +echo -n IP: && read net${net}/ip +echo -n Subnet mask: && read net${net}/netmask +echo -n Gateway: && read net${net}/gateway +echo -n DNS: && read dns +ifopen net${net} +echo Attempting chainload of netboot.xyz... +goto menu || goto failsafe + +:menu +set conn_type https +chain --autofree https://boot.netboot.xyz/menu.ipxe || echo ${HTTPS_ERR} +sleep 5 +set conn_type http +chain --autofree http://boot.netboot.xyz/menu.ipxe || echo ${HTTP_ERR} +goto localboot + +:localboot +exit + +:retry +goto start + +:reboot +reboot +goto start + +:debug +echo Type "exit" to return to menu +shell +goto failsafe diff --git a/roles/netbootxyz/files/ipxe/disks/netboot.xyz-packet b/roles/netbootxyz/files/ipxe/disks/netboot.xyz-packet new file mode 100644 index 00000000..18553acf --- /dev/null +++ b/roles/netbootxyz/files/ipxe/disks/netboot.xyz-packet @@ -0,0 +1,69 @@ +#!ipxe +set esc:hex 1b +set bold ${esc:string}[1m +set boldoff ${esc:string}[22m +set fg_gre ${esc:string}[32m +set fg_red ${esc:string}[31m +set fg_cya ${esc:string}[36m +set fg_whi ${esc:string}[37m +set HTTPS_ERR HTTPS appears to have failed... attempting HTTP +set HTTP_ERR HTTP has failed, localbooting... +set version 1.04 +set ipxe_cloud_config packet + +:start +echo ${bold}${fg_gre}netboot.xyz ${fg_whi}v${version} for ${fg_red}packet.com${fg_whi}${boldoff} +prompt --key m --timeout 4000 Hit the ${bold}m${boldoff} key to open failsafe menu... && goto failsafe || goto dhcp + +:dhcp +echo +dhcp || goto netconfig +goto menu + +:failsafe +menu netboot.xyz Failsafe Menu +item localboot Boot to local drive +item netconfig Manual network configuration +item retry Retry boot +item debug iPXE Debug Shell +item reboot Reboot System +choose failsafe_choice || exit +goto ${failsafe_choice} + +:netconfig +echo Network Configuration: +echo Available interfaces... +ifstat +imgfree +echo -n Set network interface number [0 for net0, defaults to 0]: ${} && read net +isset ${net} || set net 0 +echo -n IP: && read net${net}/ip +echo -n Subnet mask: && read net${net}/netmask +echo -n Gateway: && read net${net}/gateway +echo -n DNS: && read dns +ifopen net${net} +echo Attempting chainload of netboot.xyz... +goto menu || goto failsafe + +:menu +set conn_type https +chain --autofree https://boot.netboot.xyz/menu.ipxe || echo ${HTTPS_ERR} +sleep 5 +set conn_type http +chain --autofree http://boot.netboot.xyz/menu.ipxe || echo ${HTTP_ERR} +goto localboot + +:localboot +exit + +:retry +goto start + +:reboot +reboot +goto start + +:debug +echo Type "exit" to return to menu +shell +goto failsafe diff --git a/roles/netbootxyz/files/ipxe/local/colour.h b/roles/netbootxyz/files/ipxe/local/colour.h new file mode 100644 index 00000000..66b14004 --- /dev/null +++ b/roles/netbootxyz/files/ipxe/local/colour.h @@ -0,0 +1,28 @@ +#undef COLOR_NORMAL_FG +#undef COLOR_NORMAL_BG +#undef COLOR_SELECT_FG +#undef COLOR_SELECT_BG +#undef COLOR_SEPARATOR_FG +#undef COLOR_SEPARATOR_BG +#undef COLOR_EDIT_FG +#undef COLOR_EDIT_BG +#undef COLOR_ALERT_FG +#undef COLOR_ALERT_BG +#undef COLOR_URL_FG +#undef COLOR_URL_BG +#undef COLOR_PXE_FG +#undef COLOR_PXE_BG +#define COLOR_NORMAL_FG COLOR_CYAN +#define COLOR_NORMAL_BG COLOR_BLACK +#define COLOR_SELECT_FG COLOR_WHITE +#define COLOR_SELECT_BG COLOR_BLUE +#define COLOR_SEPARATOR_FG COLOR_WHITE +#define COLOR_SEPARATOR_BG COLOR_BLACK +#define COLOR_EDIT_FG COLOR_BLACK +#define COLOR_EDIT_BG COLOR_CYAN +#define COLOR_ALERT_FG COLOR_WHITE +#define COLOR_ALERT_BG COLOR_RED +#define COLOR_URL_FG COLOR_CYAN +#define COLOR_URL_BG COLOR_BLUE +#define COLOR_PXE_FG COLOR_BLACK +#define COLOR_PXE_BG COLOR_WHITE diff --git a/roles/netbootxyz/files/ipxe/local/crypto.h b/roles/netbootxyz/files/ipxe/local/crypto.h new file mode 100644 index 00000000..13bb0faf --- /dev/null +++ b/roles/netbootxyz/files/ipxe/local/crypto.h @@ -0,0 +1 @@ +#undef OCSP_CHECK diff --git a/roles/netbootxyz/files/ipxe/local/general.h b/roles/netbootxyz/files/ipxe/local/general.h new file mode 100644 index 00000000..cee59bd4 --- /dev/null +++ b/roles/netbootxyz/files/ipxe/local/general.h @@ -0,0 +1,11 @@ +#define DIGEST_CMD /* Image crypto digest commands */ +#define DOWNLOAD_PROTO_HTTPS /* Secure Hypertext Transfer Protocol */ +#define IMAGE_COMBOOT /* COMBOOT */ +#define IMAGE_TRUST_CMD /* Image trust management commands */ +#define NET_PROTO_IPV6 /* IPv6 protocol */ +#define NSLOOKUP_CMD /* DNS resolving command */ +#define NTP_CMD /* NTP commands */ +#define PCI_CMD /* PCI commands */ +#define REBOOT_CMD /* Reboot command */ +#define TIME_CMD /* Time commands */ +#define VLAN_CMD /* VLAN commands */ diff --git a/roles/netbootxyz/files/ipxe/local/general.h.efi b/roles/netbootxyz/files/ipxe/local/general.h.efi new file mode 100644 index 00000000..2df7410a --- /dev/null +++ b/roles/netbootxyz/files/ipxe/local/general.h.efi @@ -0,0 +1,10 @@ +#define DIGEST_CMD /* Image crypto digest commands */ +#define DOWNLOAD_PROTO_HTTPS /* Secure Hypertext Transfer Protocol */ +#define IMAGE_TRUST_CMD /* Image trust management commands */ +#define NET_PROTO_IPV6 /* IPv6 protocol */ +#define NSLOOKUP_CMD /* DNS resolving command */ +#define NTP_CMD /* NTP commands */ +#define PCI_CMD /* PCI commands */ +#define REBOOT_CMD /* Reboot command */ +#define TIME_CMD /* Time commands */ +#define VLAN_CMD /* VLAN commands */ diff --git a/roles/netbootxyz/files/ipxe/local/nap.h.efi b/roles/netbootxyz/files/ipxe/local/nap.h.efi new file mode 100644 index 00000000..1e345eb0 --- /dev/null +++ b/roles/netbootxyz/files/ipxe/local/nap.h.efi @@ -0,0 +1,4 @@ +/* nap.h */ +#undef NAP_EFIX86 +#undef NAP_EFIARM +#define NAP_NULL diff --git a/roles/netbootxyz/files/ipxe/local/usb.h.efi b/roles/netbootxyz/files/ipxe/local/usb.h.efi new file mode 100644 index 00000000..be2ccaef --- /dev/null +++ b/roles/netbootxyz/files/ipxe/local/usb.h.efi @@ -0,0 +1,2 @@ +/* usb.h */ +#define USB_EFI diff --git a/roles/netbootxyz/tasks/generate_disks.yml b/roles/netbootxyz/tasks/generate_disks.yml index db843f42..44736b3a 100644 --- a/roles/netbootxyz/tasks/generate_disks.yml +++ b/roles/netbootxyz/tasks/generate_disks.yml @@ -1,136 +1,11 @@ --- - - name: Adds python packages if python is not present - raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal python-yaml) - - name: Gathering facts - setup: + - include: generate_disks_base.yml - - name: Gather variables for each operating system - include_vars: "{{ item }}" - with_first_found: - - "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml" - - "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml" - - "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml" - - "{{ ansible_distribution | lower }}.yml" - - "{{ ansible_os_family | lower }}.yml" + - include: generate_disks_legacy.yml + when: + - generate_disks_legacy | default(true) | bool - - name: Install required packages - package: - name: "{{ item }}" - state: latest - with_items: "{{ netbootxyz_packages }}" - - - name: Check out latest iPXE sources - git: - repo: "{{ ipxe_repo }}" - dest: /usr/src/ipxe - version: "{{ ipxe_branch }}" - - - name: Check out latest netboot.xyz sources - git: - repo: "{{ netbootxyz_repo }}" - dest: /usr/src/netboot.xyz - version: "{{ netbootxyz_branch }}" - - - name: Copy iPXE Bootloader template to iPXE source directory - template: - src: disks/ipxe-bootloader.j2 - dest: /usr/src/ipxe/src/ipxe-bootloader - - - name: Copy netboot.xyz colour.h iPXE config - file: - src: /usr/src/netboot.xyz/ipxe/local/colour.h - dest: /usr/src/ipxe/src/config/local/colour.h - state: link - - - name: Copy netboot.xyz general.h iPXE config - file: - src: /usr/src/netboot.xyz/ipxe/local/general.h - dest: /usr/src/ipxe/src/config/local/general.h - state: link - - - name: Touch iPXE config local files - file: - path: "{{ item }}" - state: touch - with_items: - - /usr/src/ipxe/src/config/local/console.h - - /usr/src/ipxe/src/config/local/umalloc.h - - /usr/src/ipxe/src/config/local/nap.h - - /usr/src/ipxe/src/config/local/timer.h - - /usr/src/ipxe/src/config/local/branding.h - - /usr/src/ipxe/src/config/local/serial.h - - /usr/src/ipxe/src/config/local/reboot.h - - /usr/src/ipxe/src/config/local/sanboot.h - - /usr/src/ipxe/src/config/local/fault.h - - /usr/src/ipxe/src/config/local/dhcp.h - - /usr/src/ipxe/src/config/local/sideband.h - - /usr/src/ipxe/src/config/local/entropy.h - - /usr/src/ipxe/src/config/local/crypto.h - - /usr/src/ipxe/src/config/local/usb.h - - /usr/src/ipxe/src/config/local/settings.h - - - name: Create iPXE file directory - file: - path: /var/www/html/ipxe - state: directory - - - name: Compile iPXE bootloader for Legacy BIOS - shell: "{{ item }}" - with_items: - - make EMBED=ipxe-bootloader bin/ipxe.dsk bin/ipxe.iso bin/ipxe.lkrn bin/ipxe.usb bin/ipxe.kpxe bin/undionly.kpxe - args: - chdir: /usr/src/ipxe/src - - - name: Copy iPXE files for Legacy BIOS to http directory - copy: - src: /usr/src/ipxe/src/bin/{{ item }} - dest: /var/www/html/ipxe/{{ boot_domain }}-{{ item }} - remote_src: True - with_items: - - ipxe.dsk - - ipxe.iso - - ipxe.lkrn - - ipxe.usb - - ipxe.kpxe - - undionly.kpxe - - - name: Copy helper apps - copy: - src: "{{ item }}" - dest: "{{ netbootxyz_root }}" - with_items: - - memdisk - - wimboot - - - name: Copy netboot.xyz general.h.efi iPXE config - file: - src: /usr/src/netboot.xyz/ipxe/local/general.h.efi - dest: /usr/src/ipxe/src/config/local/general.h - state: link - - - name: Compile iPXE bootloader for EFI - shell: "{{ item }}" - with_items: - - make clean - - make EMBED=ipxe-bootloader bin-x86_64-efi/ipxe.efi - args: - chdir: /usr/src/ipxe/src - - - name: Generate iPXE EFI ISO Disk - shell: "{{ item }}" - with_items: - - mkdir -p efi_tmp/EFI/BOOT/ - - cp bin-x86_64-efi/ipxe.efi efi_tmp/EFI/BOOT/bootx64.efi - - genisoimage -o ipxe-efi.iso efi_tmp - args: - chdir: /usr/src/ipxe/src - - - name: Copy iPXE EFI builds to http directory - copy: - src: "{{ ipxe_source_dir }}/src/{{ item.src }}" - dest: "{{ netbootxyz_root }}/ipxe/{{ item.dest }}" - remote_src: True - with_items: - - { src: "bin-x86_64-efi/ipxe.efi", dest: "{{ boot_domain }}-ipxe.efi" } - - { src: "ipxe-efi.iso", dest: "{{ boot_domain }}-ipxe-efi.iso" } + - include: generate_disks_efi.yml + when: + - generate_disks_efi | default(true) | bool diff --git a/roles/netbootxyz/tasks/generate_disks_arm.yml b/roles/netbootxyz/tasks/generate_disks_arm.yml new file mode 100644 index 00000000..e69de29b diff --git a/roles/netbootxyz/tasks/generate_disks_base.yml b/roles/netbootxyz/tasks/generate_disks_base.yml new file mode 100644 index 00000000..3d2bfc4b --- /dev/null +++ b/roles/netbootxyz/tasks/generate_disks_base.yml @@ -0,0 +1,66 @@ +--- + + - name: Gathering facts + setup: + + - name: Gather variables for each operating system + include_vars: "{{ item }}" + with_first_found: + - "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml" + - "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml" + - "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml" + - "{{ ansible_distribution | lower }}.yml" + - "{{ ansible_os_family | lower }}.yml" + + - name: Create iPXE file directories + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ netbootxyz_root }}/ipxe" + + - name: Copy helper apps + copy: + src: "{{ item }}" + dest: "{{ netbootxyz_root }}" + with_items: + - memdisk + - wimboot + + - name: Install required packages + package: + name: "{{ item }}" + state: latest + with_items: "{{ netbootxyz_packages }}" + + - name: Check out latest iPXE sources + git: + repo: "{{ ipxe_repo }}" + dest: "{{ ipxe_source_dir }}" + version: "{{ ipxe_branch }}" + + - name: Copy iPXE Bootloader template to iPXE source directory + template: + src: disks/ipxe-bootloader.j2 + dest: "{{ ipxe_source_dir }}/src/ipxe-bootloader" + + - name: Touch iPXE config local files + file: + path: "{{ ipxe_source_dir }}/{{ item }}" + state: touch + with_items: + - src/config/local/console.h + - src/config/local/umalloc.h + - src/config/local/nap.h + - src/config/local/timer.h + - src/config/local/branding.h + - src/config/local/serial.h + - src/config/local/reboot.h + - src/config/local/sanboot.h + - src/config/local/fault.h + - src/config/local/dhcp.h + - src/config/local/sideband.h + - src/config/local/entropy.h + - src/config/local/crypto.h + - src/config/local/usb.h + - src/config/local/settings.h \ No newline at end of file diff --git a/roles/netbootxyz/tasks/generate_disks_efi.yml b/roles/netbootxyz/tasks/generate_disks_efi.yml new file mode 100644 index 00000000..ea6cdb7b --- /dev/null +++ b/roles/netbootxyz/tasks/generate_disks_efi.yml @@ -0,0 +1,44 @@ +--- + + - name: Copy netboot.xyz local EFI iPXE configs + copy: + src: "ipxe/local/{{ item }}" + dest: "{{ ipxe_source_dir }}/src/config/local/{{ item }}" + with_items: + - colour.h + - crypto.h + + - name: Copy netboot.xyz general.h.efi iPXE config + copy: + src: "ipxe/local/general.h.efi" + dest: "{{ ipxe_source_dir }}/src/config/local/general.h" + + - name: Compile iPXE bootloader for EFI + shell: "{{ item }}" + with_items: + - make clean + - make EMBED=ipxe-bootloader bin-x86_64-efi/ipxe.efi + args: + chdir: "{{ ipxe_source_dir }}/src" + + - name: Generate iPXE EFI ISO Disk + shell: "{{ item }}" + with_items: + - mkdir -p efi_tmp + - dd if=/dev/zero of=efi_tmp/ipxe.img count=2880 + - mformat -i efi_tmp/ipxe.img -m 0xf8 -f 2880 + - mmd -i efi_tmp/ipxe.img ::efi ::efi/boot + - mcopy -i efi_tmp/ipxe.img bin-x86_64-efi/ipxe.efi ::efi/boot/bootx64.efi + - genisoimage -o ipxe-efi.eiso -eltorito-alt-boot -e ipxe.img -no-emul-boot efi_tmp + args: + chdir: "{{ ipxe_source_dir }}/src" + warn: false + + - name: Copy iPXE EFI builds to http directory + copy: + src: "{{ ipxe_source_dir }}/src/{{ item.src }}" + dest: "{{ netbootxyz_root }}/ipxe/{{ item.dest }}" + remote_src: True + with_items: + - { src: "bin-x86_64-efi/ipxe.efi", dest: "{{ site_name }}.efi" } + - { src: "ipxe-efi.eiso", dest: "{{ site_name }}-efi.iso" } diff --git a/roles/netbootxyz/tasks/generate_disks_legacy.yml b/roles/netbootxyz/tasks/generate_disks_legacy.yml new file mode 100644 index 00000000..70bcced4 --- /dev/null +++ b/roles/netbootxyz/tasks/generate_disks_legacy.yml @@ -0,0 +1,36 @@ +--- + + - name: Copy netboot.xyz local legacy iPXE configs + copy: + src: "ipxe/local/{{ item }}" + dest: "{{ ipxe_source_dir }}/src/config/local/{{ item }}" + with_items: + - colour.h + - crypto.h + - general.h + + - name: Compile iPXE bootloader for Legacy BIOS + shell: "{{ item }}" + with_items: + - make clean + - make EMBED=ipxe-bootloader bin/ipxe.dsk bin/ipxe.iso bin/ipxe.lkrn bin/ipxe.usb bin/ipxe.kpxe bin/undionly.kpxe + args: + chdir: "{{ ipxe_source_dir }}/src" + + - name: Copy iPXE files for Legacy BIOS to http directory + copy: + src: "{{ ipxe_source_dir }}/src/bin/ipxe{{ item }}" + dest: "{{ netbootxyz_root }}/ipxe/{{ site_name }}{{ item }}" + remote_src: True + with_items: + - ".dsk" + - ".iso" + - ".lkrn" + - ".usb" + - ".kpxe" + + - name: Copy undionly.kpxe for Legacy BIOS to http directory + copy: + src: "{{ ipxe_source_dir }}/src/bin/undionly.kpxe" + dest: "{{ netbootxyz_root }}/ipxe/{{ site_name }}-undionly.kpxe" + remote_src: True diff --git a/roles/netbootxyz/tasks/generate_menus.yml b/roles/netbootxyz/tasks/generate_menus.yml index 28c1da27..f4601153 100644 --- a/roles/netbootxyz/tasks/generate_menus.yml +++ b/roles/netbootxyz/tasks/generate_menus.yml @@ -1,11 +1,11 @@ --- - name: Combine overrides with defaults set_fact: - _my_releases: "{{ releases|combine(release_overrides, recursive=True) }}" + _releases: "{{ releases|combine(release_overrides, recursive=True) }}" - name: Set releases with user overrides set_fact: - releases: "{{ _my_releases }}" + releases: "{{ _releases }}" - name: Generate directories file: @@ -16,6 +16,10 @@ debug: var: releases + - name: Dump endpoint vars for debugging + debug: + var: endpoints + - name: Generate netboot.xyz source files templates template: src: "{{ item.src }}" diff --git a/roles/netbootxyz/templates/disks/ipxe-bootloader.j2 b/roles/netbootxyz/templates/disks/ipxe-bootloader.j2 index 7cfa5eb1..816c5c79 100644 --- a/roles/netbootxyz/templates/disks/ipxe-bootloader.j2 +++ b/roles/netbootxyz/templates/disks/ipxe-bootloader.j2 @@ -19,8 +19,8 @@ prompt --key m --timeout 4000 Hit the ${bold}m${boldoff} key to open failsafe me :dhcp echo dhcp || goto netconfig -isset ${next-server} && iseq ${filename} netboot.xyz.kpxe && goto tftpmenu -isset ${next-server} && iseq ${filename} netboot.xyz.efi && goto tftpmenu +isset ${next-server} && iseq ${filename} {{ site_name }}.kpxe && goto tftpmenu || +isset ${next-server} && iseq ${filename} {{ site_name }}.efi && goto tftpmenu || goto menu :failsafe @@ -52,11 +52,15 @@ goto menu || goto failsafe chain --autofree tftp://${next-server}/menu.ipxe || echo ${TFTP_ERR} && goto menu :menu +{% if bootloader_https_enabled | bool %} set conn_type https chain --autofree https://${boot_domain}/menu.ipxe || echo ${HTTPS_ERR} sleep 5 +{% endif %} +{% if bootloader_http_enabled | bool %} set conn_type http chain --autofree http://${boot_domain}/menu.ipxe || echo ${HTTP_ERR} +{% endif %} goto localboot :localboot diff --git a/roles/netbootxyz/templates/menu/boot.ipxe.j2 b/roles/netbootxyz/templates/menu/boot.cfg.j2 similarity index 90% rename from roles/netbootxyz/templates/menu/boot.ipxe.j2 rename to roles/netbootxyz/templates/menu/boot.cfg.j2 index e3bae2b0..49514ee2 100644 --- a/roles/netbootxyz/templates/menu/boot.ipxe.j2 +++ b/roles/netbootxyz/templates/menu/boot.cfg.j2 @@ -8,22 +8,22 @@ set site_name {{ site_name }} set boot_domain {{ boot_domain }} # set location of memdisk -set memdisk http://${boot_domain}/memdisk +set memdisk {{ memdisk_location }} # signature check enabled? -set sigs_enabled true +set sigs_enabled {{ sigs_enabled | default(false) | bool }} # image signatures check enabled? -set img_sigs_enabled true +set img_sigs_enabled {{ img_sigs_enabled | default(false) | bool }} # set location of signatures for sources -set sigs http://${boot_domain}/sigs/ +set sigs {{ sigs_location }} # set location of latest iPXE set ipxe_disk netboot.xyz-undionly.kpxe # set location of custom netboot.xyz live assets -set live_endpoint https://github.com/netbootxyz +set live_endpoint {{ live_endpoint }} ############################## # netboot-xyz hosted endpoints diff --git a/roles/netbootxyz/templates/menu/bsd.ipxe.j2 b/roles/netbootxyz/templates/menu/bsd.ipxe.j2 index ac5a5af0..3fcaa8cc 100644 --- a/roles/netbootxyz/templates/menu/bsd.ipxe.j2 +++ b/roles/netbootxyz/templates/menu/bsd.ipxe.j2 @@ -9,7 +9,7 @@ iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch} # BSD based systems item --gap BSD Based Operating Systems -{% for key, value in releases.items() | sort %} +{% for key, value in releases.items() | sort(attribute='1.name') %} {% if value.enabled is defined and value.menu == "bsd" and value.enabled | bool %} item {{ key }} ${space} {{ value.name }} {% endif %} @@ -38,4 +38,4 @@ exit 0 :changebits iseq ${arch} x86_64 && set arch i386 || set arch x86_64 -goto bsd_menu \ No newline at end of file +goto bsd_menu diff --git a/roles/netbootxyz/templates/menu/gentoo.ipxe.j2 b/roles/netbootxyz/templates/menu/gentoo.ipxe.j2 new file mode 100644 index 00000000..fcc245b7 --- /dev/null +++ b/roles/netbootxyz/templates/menu/gentoo.ipxe.j2 @@ -0,0 +1,32 @@ +#!ipxe + +# Gentoo Operating System +# http://www.gentoo.org + +# Note: in order to boot Gentoo via iPXE, the method at http://blog.dastrup.com/?p=12 has been utilized to +# to allow for the Gentoo minimal disk to boot. I've regenerated the latest boot disks and have put +# them on https://sourceforge.net/projects/netboot-xyz/files/distros/gentoo/amd64/20160204/ + +goto ${menu} + +:gentoo +set os {{ releases.gentoo.name }} +menu ${os} ${arch_a} +{% for item in releases.gentoo.versions %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} +choose gentoo_version || goto gentoo_exit +goto ${gentoo_version} + +:20160204 +set gentoopath https://master.dl.sourceforge.net/project/netboot-xyz/distros/gentoo/amd64/20160204 +echo Please note the gentoo ISO has been regenerated to work with iPXE +echo using the method here: http://blog.dastrup.com/?p=12 +kernel --name gentoo-kernel ${gentoopath}/kernel root=/dev/ram0 init=/linuxrc loop=/image.squashfs looptype=squashfs cdroot=1 real_root=/ ${console} +initrd --name gentoo-initrd.img ${gentoopath}/initrd +boot +goto gentoo + +:gentoo_exit +clear menu +chain linux.ipxe diff --git a/roles/netbootxyz/templates/menu/index.html b/roles/netbootxyz/templates/menu/index.html deleted file mode 100644 index a62f838c..00000000 --- a/roles/netbootxyz/templates/menu/index.html +++ /dev/null @@ -1,7 +0,0 @@ -#!ipxe -#### boot.netboot.xyz initial loader #### -#### see https://netboot.xyz for more information #### -set conn_type https -chain --autofree https://boot.netboot.xyz/menu.ipxe || echo HTTPS failed... attempting HTTP... -set conn_type http -chain --autofree http://boot.netboot.xyz/menu.ipxe || echo HTTP failed, localbooting... diff --git a/roles/netbootxyz/templates/menu/index.html.j2 b/roles/netbootxyz/templates/menu/index.html.j2 new file mode 100644 index 00000000..36efcf75 --- /dev/null +++ b/roles/netbootxyz/templates/menu/index.html.j2 @@ -0,0 +1,11 @@ +#!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 %} \ No newline at end of file diff --git a/roles/netbootxyz/templates/menu/linux.ipxe.j2 b/roles/netbootxyz/templates/menu/linux.ipxe.j2 index d05212d1..094d2d52 100644 --- a/roles/netbootxyz/templates/menu/linux.ipxe.j2 +++ b/roles/netbootxyz/templates/menu/linux.ipxe.j2 @@ -6,7 +6,7 @@ goto ${menu} || menu Linux Installers - Current Arch [ ${arch} ] iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch} item --gap Popular Linux Operating Systems: -{% for key, value in releases.items() | sort %} +{% for key, value in releases.items() | sort(attribute='1.name') %} {% if value.enabled is defined and value.menu == "linux" and value.enabled | bool %} item {{ key }} ${space} {{ value.name }} {% endif %} diff --git a/roles/netbootxyz/templates/menu/live.ipxe.j2 b/roles/netbootxyz/templates/menu/live.ipxe.j2 index f3e4010f..e9d8be3e 100644 --- a/roles/netbootxyz/templates/menu/live.ipxe.j2 +++ b/roles/netbootxyz/templates/menu/live.ipxe.j2 @@ -6,7 +6,7 @@ goto ${menu} || menu Live Boot Distributions - Current Arch [ ${arch} ] iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch} item --gap Live Boot Distributions -item liveubuntu ${space} Ubuntu Live +item live-ubuntu ${space} Ubuntu Live choose menu || goto live_exit echo ${cls} goto ${menu} || diff --git a/roles/netbootxyz/templates/menu/liveubuntu-default.ipxe.j2 b/roles/netbootxyz/templates/menu/liveubuntu-default.ipxe.j2 index cd4bea59..1546c526 100644 --- a/roles/netbootxyz/templates/menu/liveubuntu-default.ipxe.j2 +++ b/roles/netbootxyz/templates/menu/liveubuntu-default.ipxe.j2 @@ -6,17 +6,32 @@ goto ${menu} || menu Live Ubuntu Default (Unity) - Current Arch [ ${arch} ] iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch} item --gap Live Ubuntu Default (Unity) -item bionic-18.04-default ${space} Bionic Beaver 18.04 +{% for key, value in endpoints.items() | sort %} +{% if value.os == "ubuntu" and 'squash' in key %} +item {{ key }} ${space} {{ value.os | title }} {{ value.version }} {{ value.flavor | title}} +{% endif %} +{% endfor %} choose menu || goto live_exit echo ${cls} goto ${menu} || iseq ${sigs_enabled} true && goto verify_sigs || goto change_menu -:bionic-18.04-default -kernel ${live_endpoint}${ubuntu-18.04-live-kernel}vmlinuz boot=casper netboot=http fetch=${live_endpoint}${ubuntu-18.04-default-squash}filesystem.squashfs initrd=initrd -initrd ${live_endpoint}${ubuntu-18.04-live-kernel}initrd +{% for key, value in endpoints.items() | sort %} +{% if value.os == "ubuntu" and 'squash' in key %} +{% set kernel_name = value.kernel %} +:{{ key }} +set fetch_url ${live_endpoint}{{ value.path }}filesystem.squashfs +{% for key, value in endpoints.items() | sort %} +{% if key == kernel_name %} +kernel ${live_endpoint}{{ value.path }}vmlinuz boot=casper netboot=http fetch=${fetch_url} initrd=initrd +initrd ${live_endpoint}{{ value.path }}initrd boot +{% endif %} +{% endfor %} +{% endif %} +{% endfor %} + :change_menu chain ${menu}.ipxe || goto error goto live_menu diff --git a/roles/netbootxyz/templates/menu/liveubuntu.ipxe.j2 b/roles/netbootxyz/templates/menu/liveubuntu.ipxe.j2 deleted file mode 100644 index 5739d0dd..00000000 --- a/roles/netbootxyz/templates/menu/liveubuntu.ipxe.j2 +++ /dev/null @@ -1,26 +0,0 @@ -#!ipxe - -goto ${menu} || - -:live_menu -menu Live Ubuntu Distros - Current Arch [ ${arch} ] -iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch} -item --gap Live Ubuntu Distros -item liveubuntu-default ${space} Ubuntu Live Default (Unity) -choose menu || goto live_exit -echo ${cls} -goto ${menu} || -iseq ${sigs_enabled} true && goto verify_sigs || goto change_menu - -:verify_sigs -imgverify ${menu}.ipxe ${sigs}${menu}.ipxe.sig || goto error -goto change_menu - -:change_menu -chain ${menu}.ipxe || goto error -goto live_menu - -:live_exit -clear menu -exit 0 - diff --git a/roles/netbootxyz/templates/menu/mageia.ipxe.j2 b/roles/netbootxyz/templates/menu/mageia.ipxe.j2 new file mode 100644 index 00000000..0c40d1cf --- /dev/null +++ b/roles/netbootxyz/templates/menu/mageia.ipxe.j2 @@ -0,0 +1,44 @@ +#!ipxe + +# Mageia Operating System +# http://www.mageia.org/ + +# No way to set the network interface by MAC address, let the installer ask the question +isset ${dhcp-server} && set network dhcp || set network static,ip:${ip},netmask:${netmask},gateway:${gateway},dns:${dns} + +goto ${menu} || + +:mageia +set os {{ releases.mageia.name }} +menu ${os} - ${arch} - Image Sig Checks: [${img_sigs_enabled}] +{% for item in releases.mageia.versions %} +item {{ item.code_name }} ${space} ${os} {{ item.name }} +{% endfor %} +choose version || goto mageia_exit +goto mageia_boot + +:mageia_boot +set dir {{ releases.mageia.base_dir }}/distrib/${version}/x86_64 && set dir2 isolinux/x86_64 || +iseq ${arch} i386 && set dir ${mageia_base_dir}/distrib/${version}/i586 && set dir2 isolinux/i386 || +set automatic method:http,network:${network},server:${mageia_mirror},directory:/${dir} +imgfree +kernel {{ releases.mageia.mirror }}/${dir}/${dir2}/vmlinuz +initrd {{ releases.mageia.mirror }}/${dir}/${dir2}/all.rdz +imgargs vmlinuz automatic=${automatic} vga=788 splash=silent ${console} initrd=all.rdz +echo +echo MD5sums: +md5sum vmlinuz all.rdz +iseq ${img_sigs_enabled} true && goto verify_sigs || goto skip_sigs +:verify_sigs +echo +echo Checking signatures... +imgverify vmlinuz ${sigs}${dir}/${dir2}/vmlinuz.sig || goto error +imgverify all.rdz ${sigs}${dir}/${dir2}/all.rdz.sig || goto error +echo Signatures verified! +echo +:skip_sigs +boot || goto mageia + +:mageia_exit +clear menu +exit 0 diff --git a/roles/netbootxyz/templates/menu/menu.ipxe.j2 b/roles/netbootxyz/templates/menu/menu.ipxe.j2 index 26e13ee1..ce6c25fd 100644 --- a/roles/netbootxyz/templates/menu/menu.ipxe.j2 +++ b/roles/netbootxyz/templates/menu/menu.ipxe.j2 @@ -1,7 +1,7 @@ #!ipxe :start -chain --autofree boot.ipxe || +chain --autofree boot.cfg || iseq ${cls} serial && goto ignore_cls || set cls:hex 1b:5b:4a # ANSI clear screen sequence - "^[[J" set cls ${cls:string} diff --git a/roles/netbootxyz/templates/menu/rhel.ipxe.j2 b/roles/netbootxyz/templates/menu/rhel.ipxe.j2 new file mode 100644 index 00000000..03acdca8 --- /dev/null +++ b/roles/netbootxyz/templates/menu/rhel.ipxe.j2 @@ -0,0 +1,52 @@ +#!ipxe + +# Redhat Enterprise Linux (RHEL) +# https://www.redhat.com + +isset ${dhcp-server} && set ipparam ip=dhcp || set ipparam ip=${ip}::${gateway}:${netmask}:::none nameserver=${dns} +set ipparam BOOTIF=${netX/mac} ${ipparam} + +set rhel_arch x86_64 +goto ${menu} || + +:rhel +set os Red Hat Enterprise Linux +clear rhel_version +menu ${os} +item --gap Installers +item rhel_install ${space} Load ${os} Installer... +item --gap Options: +item arch_set ${space} Architecture [ ${rhel_arch} ] +item url_set ${space} Base URL [ ${rhel_base_url} ] +choose rhel_version || goto rhel_exit +goto ${rhel_version} + +:arch_set +iseq ${rhel_arch} x86_64 && set rhel_arch i386 || set rhel_arch x86_64 +goto rhel + +:url_set +echo Set the HTTP URL of an extracted RHEL ISO without the trailing slash: +echo e.g. http://www.mydomain.com/rhel/7 +echo +echo -n URL: ${} && read rhel_base_url +echo +echo netboot.xyz will attempt to load the following files: +echo ${rhel_base_url}/os/${rhel_arch}/images/pxeboot/vmlinuz +echo ${rhel_base_url}/os/${rhel_arch}/images/pxeboot/initrd.img +echo +prompt Press any key to return to RHEL Menu... +goto rhel + +:rhel_install +isset ${rhel_base_url} && goto boot || echo URL not set... && goto url_set + +:boot +imgfree +kernel ${rhel_base_url}/os/${rhel_arch}/images/pxeboot/vmlinuz repo=${rhel_base_url}/os/${rhel_arch} ${console} ${ipparam} initrd=initrd.img +initrd ${rhel_base_url}/os/${rhel_arch}/images/pxeboot/initrd.img +md5sum vmlinuz initrd.img +boot + +:rhel_exit +exit 0 diff --git a/roles/netbootxyz/templates/menu/windows.ipxe.j2 b/roles/netbootxyz/templates/menu/windows.ipxe.j2 new file mode 100644 index 00000000..d97145ed --- /dev/null +++ b/roles/netbootxyz/templates/menu/windows.ipxe.j2 @@ -0,0 +1,59 @@ +#!ipxe + +# Microsoft Windows +# https://www.microsoft.com + +set win_arch x64 +goto ${menu} || + +:windows +set os Microsoft Windows +clear win_version +menu ${os} +item --gap Installers +item win_install ${space} Load ${os} Installer... +item --gap Options: +item arch_set ${space} Architecture [ ${win_arch} ] +item url_set ${space} Base URL [ ${win_base_url} ] +choose win_version || goto windows_exit +goto ${win_version} + +:arch_set +iseq ${win_arch} x64 && set win_arch x86 || set win_arch x64 +goto windows + +:url_set +echo Set the HTTP URL of an extracted Windows ISO without the trailing slash: +echo e.g. http://www.mydomain.com/windows +echo +echo -n URL: ${} && read win_base_url +echo +echo netboot.xyz will attempt to load the following files: +echo ${win_base_url}/${win_arch}/bootmgr +echo ${win_base_url}/${win_arch}/boot/bcd +echo ${win_base_url}/${win_arch}/boot/boot.sdi +echo ${win_base_url}/${win_arch}/sources/boot.wim +echo +prompt Press any key to return to Windows Menu... +goto windows + +:win_install +isset ${win_base_url} && goto boot || echo URL not set... && goto url_set + +:boot +kernel http://${boot_domain}/wimboot +initrd ${win_base_url}/${win_arch}/bootmgr bootmgr +initrd ${win_base_url}/${win_arch}/boot/bcd bcd +initrd ${win_base_url}/${win_arch}/boot/boot.sdi boot.sdi +initrd ${win_base_url}/${win_arch}/sources/boot.wim boot.wim +md5sum wimboot +iseq ${img_sigs_enabled} true && goto verify_sigs || goto skip_sigs +:verify_sigs +echo +echo Checking wimboot signature... +imgverify wimboot ${sigs}wimboot.sig || goto error +:skip_sigs +boot + +:windows_exit +exit 0 diff --git a/roles/netbootxyz/vars/ubuntu.yml b/roles/netbootxyz/vars/ubuntu.yml index 70c4e02a..ea1af5fe 100644 --- a/roles/netbootxyz/vars/ubuntu.yml +++ b/roles/netbootxyz/vars/ubuntu.yml @@ -1,8 +1,13 @@ --- netbootxyz_packages: - apache2 + - binutils-dev + - binutils-aarch64-linux-gnu + - gcc-aarch64-linux-gnu - build-essential - genisoimage - git + - isolinux - liblzma-dev - syslinux + - syslinux-common \ No newline at end of file diff --git a/user_overrides.yml b/user_overrides.yml index 3d03cf23..6c052f02 100644 --- a/user_overrides.yml +++ b/user_overrides.yml @@ -2,7 +2,7 @@ # overrides defaults in netbootxyz role generate_menus: true -generate_disks: false +generate_disks: true # set desired site name #site_name: mysitename.com @@ -13,6 +13,10 @@ generate_disks: false # set boot version #boot_version: 1.00 +#bootloader_tftp_enabled: false +#bootloader_https_enabled: true +#bootloader_http_enabled: true + # set overrides from standard netboot.xyz defaults release_overrides: alpinelinux: