utils-efi.ipxe.j2 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. {% if value.initrd is defined and value.initrd %}
  26. initrd {{ value.initrd }}
  27. {% endif %}
  28. boot
  29. goto utils_exit
  30. {% endif %}
  31. {% endfor %}
  32. {% for key, value in utilitiesefi.items() | sort %}
  33. {% if value.enabled | bool and value.type == "sanboot" %}
  34. :{{ key }}
  35. imgfree
  36. sanboot {{ value.kernel }}
  37. goto utils_exit
  38. {% endif %}
  39. {% endfor %}
  40. :cmdline
  41. echo If you want to change the default kernel command line parameters
  42. echo you can override the defaults here.
  43. echo
  44. echo Currently set to: ${cmdline}
  45. echo
  46. echo -n Enter cmdline parameters: ${} && read cmdline
  47. goto utils_menu
  48. :memtest86plus
  49. imgfree
  50. kernel {{ utilitiesefi.memtest86plus.util_path }}
  51. boot
  52. goto utils_menu
  53. :nbxyz_custom_url
  54. echo If you have a customized menu you would like to load into netboot.xyz
  55. echo set the base path url to your custom ipxe files here.
  56. echo It will look for custom.ipxe in that path as the entry point.
  57. echo
  58. echo -n Please enter your custom http url here: ${} && read custom_url
  59. goto utils_menu
  60. :nbxyz_custom_github
  61. echo Make sure you have a fork of https://github.com/netbootxyz/netboot.xyz-custom.
  62. echo You can then customize your fork as needed and set up your own custom options.
  63. echo Once your username is set, a custom option will appear on the main menu.
  64. echo
  65. echo -n Please enter your Github username: ${} && read github_user
  66. goto utils_menu
  67. :utils_exit
  68. clear menu
  69. exit 0