utils-efi.ipxe.j2 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #!ipxe
  2. :utils_menu
  3. menu Utilities
  4. item --gap Utilities:
  5. {% for key, value in utilitiesefi.items() | sort(attribute='1.name') %}
  6. {% if value.enabled %}
  7. item {{ key }} ${space} {{ value.name }}
  8. {% endif %}
  9. {% endfor %}
  10. item --gap netboot.xyz tools:
  11. item cmdline ${space} Kernel cmdline params: [${cmdline}]
  12. item nbxyz_custom_url ${space} Set custom menu [url: ${custom_url}]
  13. item nbxyz_custom_github ${space} Set Github username [user: ${github_user}]
  14. item nbxyz ${space} netboot.xyz endpoints
  15. choose --default ${menu} menu || goto utils_exit
  16. echo ${cls}
  17. goto ${menu} ||
  18. chain ${menu}.ipxe || goto utils_exit
  19. goto utils_exit
  20. {% for key, value in utilitiesefi.items() | sort %}
  21. {% if value.enabled | bool and value.type == "direct" %}
  22. :{{ key }}
  23. imgfree
  24. kernel {{ value.kernel }}
  25. initrd {{ value.initrd }}
  26. boot
  27. goto utils_exit
  28. {% endif %}
  29. {% endfor %}
  30. {% for key, value in utilitiesefi.items() | sort %}
  31. {% if value.enabled | bool and value.type == "sanboot" %}
  32. :{{ key }}
  33. imgfree
  34. sanboot {{ value.img_url }}
  35. goto utils_exit
  36. {% endif %}
  37. {% endfor %}
  38. :cmdline
  39. echo If you want to change the default kernel command line parameters
  40. echo you can override the defaults here.
  41. echo
  42. echo Currently set to: ${cmdline}
  43. echo
  44. echo -n Enter cmdline parameters: ${} && read cmdline
  45. goto utils_menu
  46. :nbxyz_custom_url
  47. echo If you have a customized menu you would like to load into netboot.xyz
  48. echo set the base path url to your custom ipxe files here.
  49. echo It will look for custom.ipxe in that path as the entry point.
  50. echo
  51. echo -n Please enter your custom http url here: ${} && read custom_url
  52. goto utils_menu
  53. :nbxyz_custom_github
  54. echo Make sure you have a fork of https://github.com/netbootxyz/netboot.xyz-custom.
  55. echo You can then customize your fork as needed and set up your own custom options.
  56. echo Once your username is set, a custom option will appear on the main menu.
  57. echo
  58. echo -n Please enter your Github username: ${} && read github_user
  59. goto utils_menu
  60. :utils_exit
  61. clear menu
  62. exit 0