Parcourir la source

Reduce amount of generated disks (#431)

Reduce amount of generated disks

Readme updates, adds version.ipxe for menu version
Generates version.ipxe from version.txt.  Used to show the 
latest version upstream on the main site.  Disabled by default 
for regular deployments but enabled as an upstream option.
Antony Messerli il y a 5 ans
Parent
commit
716f509840

+ 15 - 13
README.md

@@ -1,31 +1,33 @@
-## netboot.xyz - v2 - Under Construction
+## netboot.xyz
 
 [![Build Status](https://travis-ci.com/netbootxyz/netboot.xyz.svg?branch=master)](https://travis-ci.com/netbootxyz/netboot.xyz)
 [![Discord](https://img.shields.io/discord/425186187368595466)](https://discord.gg/An6PA2a)
+[![Release](https://img.shields.io/github/v/release/netbootxyz/netboot.xyz?color=hunter%20green)](https://github.com/netbootxyz/netboot.xyz/releases/latest)
 
 ![netboot.xyz menu](https://netboot.xyz/images/netboot.xyz.gif)
 
 ### Bootloader Downloads
 
-#### EFI Boot Loaders
+#### Legacy (PCBIOS) iPXE Bootloaders
 
 | Type | Bootloader | Description |
 |------|------------|-------------|
-|ISO|[netboot.xyz-efi.iso](https://boot.netboot.xyz/ipxe/netboot.xyz-efi.iso)| Same as ISO (Legacy) but used for EFI BIOS, works in Virtual Box EFI mode |
-|USB|[netboot.xyz-efi.usb](https://boot.netboot.xyz/ipxe/netboot.xyz-efi.usb)| Used for creation of USB Keys|
-|DHCP| [netboot.xyz.efi](https://boot.netboot.xyz/ipxe/netboot.xyz.efi)| DHCP EFI boot image file, uses built-in iPXE NIC drivers|
-|DHCP-snp|[netboot.xyz-snp.efi]() | DHCP EFI boot image file, use if you have NIC issues... need to build|
+|ISO| [netboot.xyz.iso](https://boot.netboot.xyz/ipxe/netboot.xyz.iso)| Used for CD/DVD, Virtual CDs, DRAC/iLO, VMware, Virtual Box |
+|USB| [netboot.xyz.usb](https://boot.netboot.xyz/ipxe/netboot.xyz.usb)| Used for creation of USB Keys|
+|Kernel| [netboot.xyz.lkrn](https://boot.netboot.xyz/ipxe/netboot.xyz.lkrn)|Used for booting from GRUB/EXTLINUX|
+|Floppy| [netboot.xyz.dsk](https://boot.netboot.xyz/ipxe/netboot.xyz.dsk)| Virtual floppy disk for DRAC/iLO, VMware, Virtual Box, etc|
+|DHCP| [netboot.xyz.kpxe](https://boot.netboot.xyz/ipxe/netboot.xyz.kpxe)| DHCP boot image file, uses built-in iPXE NIC drivers|
+|DHCP-undionly| [netboot.xyz-undionly.kpxe](https://boot.netboot.xyz/ipxe/netboot.xyz-undionly.kpxe)| DHCP boot image file, use if you have NIC issues|
 
-#### Legacy Boot Loaders
+#### UEFI iPXE Bootloaders
 
 | Type | Bootloader | Description |
 |------|------------|-------------|
-|ISO| [netboot.xyz.iso](https://boot.netboot.xyz/ipxe/netboot.xyz.iso)| Used for CD/DVD, Virtual CDs like DRAC/iLO, VMware, Virtual Box (Legacy) |
-|Floppy| [netboot.xyz.dsk](https://boot.netboot.xyz/ipxe/netboot.xyz.dsk)| Used for 1.44 MB floppies, Virtual floppies like DRAC/iLO, VMware, Virtual Box|
-|USB| [netboot.xyz.usb](https://boot.netboot.xyz/ipxe/netboot.xyz.usb)| Used for creation of USB Keys|
-|Kernel| [netboot.xyz.lkrn](https://boot.netboot.xyz/ipxe/netboot.xyz.lkrn)| Used for booting from GRUB/EXTLINUX|
-|DHCP| [netboot.xyz.kpxe](https://boot.netboot.xyz/ipxe/netboot.xyz.kpxe)| DHCP boot image file, uses built-in iPXE NIC drivers|
-|DHCP-undionly| [netboot.xyz-undionly.kpxe](https://boot.netboot.xyz/ipxe/netboot.xyz-undionly.kpxe)| DHCP boot image file, use if you have NIC issues|
+|ISO| [netboot.xyz-efi.iso](https://boot.netboot.xyz/ipxe/netboot.xyz-efi.iso)| Used for CD/DVD, Virtual CDs, DRAC/iLO, VMware, Virtual Box |
+|USB| [netboot.xyz-efi.usb](https://boot.netboot.xyz/ipxe/netboot.xyz-efi.usb)| Used for creation of USB Keys|
+|DHCP| [netboot.xyz.efi](https://boot.netboot.xyz/ipxe/netboot.xyz.efi)| DHCP boot image file, uses built-in iPXE NIC drivers|
+|DHCP-snp |	[netboot.xyz-snp.efi](https://boot.netboot.xyz/ipxe/netboot.xyz-snp.efi)| EFI w/ Simple Network Protocol, attempts to boot all net devices|
+|DHCP-snponly | [netboot.xyz-snponly.efi](https://boot.netboot.xyz/ipxe/netboot.xyz-snponly.efi)| EFI w/ Simple Network Protocol, only boots from device chained from|
 
 SHA256 checksums are generated during each build of iPXE and are located [here](https://boot.netboot.xyz/ipxe/netboot.xyz-sha256-checksums.txt).  You can also view the scripts that are embedded into the images [here](https://github.com/netbootxyz/netboot.xyz/tree/master/ipxe/disks).
 

+ 1 - 0
roles/netbootxyz/defaults/main.yml

@@ -29,6 +29,7 @@ live_endpoint: "https://github.com/netbootxyz"
 
 # generates menus
 generate_menus: true
+generate_version_file: false
 
 # generates signatures for source files
 generate_checksums: true

+ 11 - 1
roles/netbootxyz/tasks/generate_disks_efi.yml

@@ -73,4 +73,14 @@
       - { 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: "ipxe-efi.eiso", dest: "{{ bootloader_filename }}-efi.iso" }
-      - { src: "ipxe-efi.usb", dest: "{{ bootloader_filename }}-efi.usb" }
+      - { src: "ipxe-efi.usb", dest: "{{ bootloader_filename }}-efi.usb" }
+    when: bootloader_filename != "netboot.xyz-packet"
+
+  - name: Copy iPXE EFI builds to http directory for packet
+    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: "{{ bootloader_filename }}.efi" }
+    when: bootloader_filename == "netboot.xyz-packet"

+ 11 - 0
roles/netbootxyz/tasks/generate_disks_legacy.yml

@@ -39,9 +39,20 @@
     - ".lkrn"
     - ".usb"
     - ".kpxe"
+    when: bootloader_filename != "netboot.xyz-packet"
+
+  - name: Copy iPXE files for Legacy BIOS to http directory
+    copy:
+      src: "{{ ipxe_source_dir }}/src/bin/ipxe{{ item }}"
+      dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}{{ item }}"
+      remote_src: True
+    with_items:
+    - ".kpxe"
+    when: bootloader_filename == "netboot.xyz-packet"
 
   - name: Copy undionly.kpxe for Legacy BIOS to http directory
     copy:
       src: "{{ ipxe_source_dir }}/src/bin/undionly.kpxe"
       dest: "{{ netbootxyz_root }}/ipxe/{{ bootloader_filename }}-undionly.kpxe"
       remote_src: True
+    when: bootloader_filename != "netboot.xyz-packet"

+ 21 - 0
roles/netbootxyz/tasks/generate_menus.yml

@@ -24,6 +24,27 @@
       path: "{{ netbootxyz_root }}"
       state: directory
 
+  - name: Get current menu version
+    shell: cat version.txt
+    register: menu_version
+    when:
+      - generate_version_file | bool
+    tags:
+      - skip_ansible_lint
+
+  - name: Set menu version
+    set_fact:
+      upstream_version: "{{ menu_version.stdout }}"
+    when:
+      - generate_version_file | bool
+
+  - name: Generate version.ipxe for upstream
+    template:
+      src: "version.ipxe.j2"
+      dest: "{{ netbootxyz_root }}/version.ipxe"
+    when:
+      - generate_version_file | bool
+
   - name: Generate netboot.xyz source files templates
     template:
       src: "{{ item.src }}"

+ 4 - 0
roles/netbootxyz/templates/version.ipxe.j2

@@ -0,0 +1,4 @@
+#!ipxe
+{% if upstream_version %}
+set upstream_version {{ upstream_version }}
+{% endif %}

+ 1 - 0
script/netbootxyz-overrides.yml

@@ -2,6 +2,7 @@
 sigs_menu: true
 sigs_enabled: true
 img_sigs_enabled: false
+generate_disks_arm: true
 bootloader_multiple: true
 bootloader_disks:
   - "netboot.xyz"