harvester.ipxe.j2 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!ipxe
  2. # Harvester
  3. # https://harvesterhci.io/
  4. # https://docs.harvesterhci.io/v1.0/install/pxe-boot-install/
  5. goto ${menu} ||
  6. :harvester
  7. set os {{ releases.harvester.name }}
  8. set os_arch ${arch}
  9. iseq ${os_arch} x86_64 && set os_arch amd64 ||
  10. menu ${os} - ${os_arch}
  11. item --gap Harvester:
  12. {% for key, value in endpoints.items() | sort %}
  13. {% if value.os == "harvester" %}
  14. item harvester_url ${space} Begin install of Harvester ${os} {{ value.version }}
  15. {% endif %}
  16. {% endfor %}
  17. item --gap Parameters:
  18. item harvester_config_url ${space} Set config-create or config-join.yaml URL: ${harvester_config_url}
  19. choose --default ${menu} menu || goto harvester_exit
  20. echo ${cls}
  21. goto ${menu} ||
  22. goto harvester_exit
  23. :harvester_config_url
  24. echo -n Set config.yaml URL: && read harvester_config_url
  25. clear menu
  26. goto harvester
  27. {% for key, value in endpoints.items() | sort %}
  28. {% if value.os == "harvester" %}
  29. :harvester_url
  30. set harvester_url ${live_endpoint}{{ value.path }}
  31. goto harvester_boot
  32. {% endif %}
  33. {% endfor %}
  34. :harvester_boot
  35. set install_params harvester.install.automatic=true harvester.install.config_url=${harvester_config_url}
  36. set boot_params ip=dhcp net.ifnames=1 console=ttyS0 console=tty1 rd.cos.disable root=live:${harvester_url}/harvester-rootfs-${os_arch}.squashfs rd.noverifyssl
  37. imgfree
  38. kernel ${harvester_url}/harvester-vmlinuz-${os_arch} ${install_params} ${boot_params} {{ kernel_params }}
  39. initrd ${harvester_url}/harvester-initrd-${os_arch}
  40. echo
  41. echo MD5sums:
  42. md5sum harvester-vmlinuz-${os_arch} harvester-initrd-${os_arch}
  43. boot
  44. :harvester_exit
  45. clear menu
  46. exit 0