photon.ipxe.j2 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!ipxe
  2. # VMware Photon
  3. # https://vmware.github.io/photon/
  4. goto ${menu} ||
  5. :photon
  6. set os {{ releases.photon.name }}
  7. set os_arch ${arch}
  8. iseq ${os_arch} x86_64 && set os_arch x86_64 ||
  9. iseq ${os_arch} arm64 && set os_arch aarch64 ||
  10. clear photon_choice
  11. menu ${os}
  12. {% for key, value in endpoints.items() | sort %}
  13. {% if value.os == "vmware-photon" and value.arch == "x86_64" %}
  14. item --gap ${os} Installers
  15. item photon_install ${space} ${os} {{ value.version }} Installer
  16. {% endif %}
  17. {% endfor %}
  18. choose photon_choice || goto photon_exit
  19. goto ${photon_choice}
  20. :photon_install
  21. iseq ${os_arch} x86_64 && goto x86_64 ||
  22. iseq ${os_arch} aarch64 && goto aarch64 ||
  23. :x86_64
  24. {% for key, value in endpoints.items() | sort %}
  25. {% if value.os == "vmware-photon" and value.arch == "x86_64" %}
  26. set kernel_url ${live_endpoint}{{ value.path }}
  27. set photon_version {{ value.version }}
  28. {% endif %}
  29. {% endfor %}
  30. goto photon_boot
  31. :aarch64
  32. {% for key, value in endpoints.items() | sort %}
  33. {% if value.os == "vmware-photon" and value.arch == "aarch64" %}
  34. set kernel_url ${live_endpoint}{{ value.path }}
  35. set photon_version {{ value.version }}
  36. {% endif %}
  37. {% endfor %}
  38. goto photon_boot
  39. :photon_boot
  40. imgfree
  41. 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 }}
  42. initrd ${kernel_url}initrd.img
  43. boot
  44. goto photon
  45. :photon_exit
  46. exit 0