diff --git a/CHANGELOG.md b/CHANGELOG.md index f53c83fcaa..5eaab4d2e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file. ## [Unreleased] ## [2.0.59] - 0000-00-00 +#### Added +- VMware Photon 4.0 ## [2.0.58] - 2022-04-22 #### Added diff --git a/README.md b/README.md index b029ef1411..527aacd2bd 100644 --- a/README.md +++ b/README.md @@ -180,6 +180,7 @@ In addition to being able to host netboot.xyz locally, you can also create your | Tiny Core Linux | https://tinycorelinux.net | Yes | Yes | | Ubuntu | https://www.ubuntu.com | Yes | Yes | | VMware | https://www.vmware.com | User supplied media | No | +| VMware Photon | https://vmware.github.io/photon/ | Yes | No | | Voyager | https://voyagerlive.org | No | Yes | | VyOS | https://vyos.io | Yes | No | | Zen Installer | https://sourceforge.net/projects/revenge-installer | Yes | No | diff --git a/roles/netbootxyz/defaults/main.yml b/roles/netbootxyz/defaults/main.yml index 300b2e109a..3df0cc1226 100644 --- a/roles/netbootxyz/defaults/main.yml +++ b/roles/netbootxyz/defaults/main.yml @@ -388,6 +388,10 @@ releases: paths: 7: /repo/OracleLinux/OL7/latest/x86_64 8: /repo/OracleLinux/OL8/baseos/latest/x86_64 + photon: + enabled: true + menu: linux + name: VMware Photon proxmox: enabled: true menu: linux diff --git a/roles/netbootxyz/templates/menu/linux-arm.ipxe.j2 b/roles/netbootxyz/templates/menu/linux-arm.ipxe.j2 index 6bfb9888b9..6332fd3f45 100644 --- a/roles/netbootxyz/templates/menu/linux-arm.ipxe.j2 +++ b/roles/netbootxyz/templates/menu/linux-arm.ipxe.j2 @@ -15,6 +15,7 @@ item fedora ${space} Fedora item rhel ${space} Red Hat Enterprise Linux item rockylinux ${space} Rocky Linux item ubuntu ${space} Ubuntu +item photon ${space} VMware Photon choose menu || goto linux_exit echo ${cls} goto ${menu} || diff --git a/roles/netbootxyz/templates/menu/photon.ipxe.j2 b/roles/netbootxyz/templates/menu/photon.ipxe.j2 new file mode 100644 index 0000000000..94a7db71a7 --- /dev/null +++ b/roles/netbootxyz/templates/menu/photon.ipxe.j2 @@ -0,0 +1,53 @@ +#!ipxe + +# VMware Photon +# https://vmware.github.io/photon/ + +goto ${menu} || + +:photon +set os {{ releases.photon.name }} +set os_arch ${arch} +iseq ${os_arch} x86_64 && set os_arch x86_64 || +iseq ${os_arch} arm64 && set os_arch aarch64 || +clear photon_choice +menu ${os} +{% for key, value in endpoints.items() | sort %} +{% if value.os == "vmware-photon" and value.arch == "x86_64" %} +item --gap ${os} Installers +item photon_install ${space} ${os} {{ value.version }} Installer +{% endif %} +{% endfor %} +choose photon_choice || goto photon_exit +goto ${photon_choice} + +:photon_install +iseq ${os_arch} x86_64 && goto x86_64 || +iseq ${os_arch} aarch64 && goto aarch64 || +:x86_64 +{% for key, value in endpoints.items() | sort %} +{% if value.os == "vmware-photon" and value.arch == "x86_64" %} +set kernel_url ${live_endpoint}{{ value.path }} +set photon_version {{ value.version }} +{% endif %} +{% endfor %} +goto photon_boot +:aarch64 +{% for key, value in endpoints.items() | sort %} +{% if value.os == "vmware-photon" and value.arch == "aarch64" %} +set kernel_url ${live_endpoint}{{ value.path }} +set photon_version {{ value.version }} +{% endif %} +{% endfor %} +goto photon_boot + +:photon_boot +imgfree +kernel ${kernel_url}vmlinuz root=/dev/ram0 loglevel=3 repo=https://packages.vmware.com/photon/${photon_version}/photon_release_${photon_version}_${os_arch} {{ kernel_params }} +initrd ${kernel_url}initrd.img +boot +goto photon + +:photon_exit +exit 0 +