utils-efi.ipxe.j2 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. :cmdline
  31. echo If you want to change the default kernel command line parameters
  32. echo you can override the defaults here.
  33. echo
  34. echo Currently set to: ${cmdline}
  35. echo
  36. echo -n Enter cmdline parameters: ${} && read cmdline
  37. goto utils_menu
  38. :nbxyz_custom_url
  39. echo If you have a customized menu you would like to load into netboot.xyz
  40. echo set the base path url to your custom ipxe files here.
  41. echo It will look for custom.ipxe in that path as the entry point.
  42. echo
  43. echo -n Please enter your custom http url here: ${} && read custom_url
  44. goto utils_menu
  45. :nbxyz_custom_github
  46. echo Make sure you have a fork of https://github.com/netbootxyz/netboot.xyz-custom.
  47. echo You can then customize your fork as needed and set up your own custom options.
  48. echo Once your username is set, a custom option will appear on the main menu.
  49. echo
  50. echo -n Please enter your Github username: ${} && read github_user
  51. goto utils_menu
  52. :utils_exit
  53. clear menu
  54. exit 0