utils-efi.ipxe.j2 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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.kernel }}
  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. :memtest86plus
  47. imgfree
  48. kernel {{ utilitiesefi.memtest86plus.util_path }}
  49. boot
  50. goto utils_menu
  51. :nbxyz_custom_url
  52. echo If you have a customized menu you would like to load into netboot.xyz
  53. echo set the base path url to your custom ipxe files here.
  54. echo It will look for custom.ipxe in that path as the entry point.
  55. echo
  56. echo -n Please enter your custom http url here: ${} && read custom_url
  57. goto utils_menu
  58. :nbxyz_custom_github
  59. echo Make sure you have a fork of https://github.com/netbootxyz/netboot.xyz-custom.
  60. echo You can then customize your fork as needed and set up your own custom options.
  61. echo Once your username is set, a custom option will appear on the main menu.
  62. echo
  63. echo -n Please enter your Github username: ${} && read github_user
  64. goto utils_menu
  65. :utils_exit
  66. clear menu
  67. exit 0