Skip to content

Commit

Permalink
Add vmware photon (netbootxyz#1117)
Browse files Browse the repository at this point in the history
* Add vmware photon
  • Loading branch information
antonym authored May 13, 2022
1 parent 4a58198 commit df61129
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
4 changes: 4 additions & 0 deletions roles/netbootxyz/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions roles/netbootxyz/templates/menu/linux-arm.ipxe.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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} ||
Expand Down
53 changes: 53 additions & 0 deletions roles/netbootxyz/templates/menu/photon.ipxe.j2
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit df61129

Please sign in to comment.