utils-efi.ipxe.j2 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 ${space} Set Github username [user: ${github_user}]
  13. item nbxyz ${space} netboot.xyz endpoints
  14. choose --default ${menu} menu || goto utils_exit
  15. echo ${cls}
  16. goto ${menu} ||
  17. chain ${menu}.ipxe || goto utils_exit
  18. goto utils_exit
  19. {% for key, value in utilitiesefi.items() | sort %}
  20. {% if value.enabled | bool and value.type == "direct" %}
  21. :{{ key }}
  22. imgfree
  23. kernel {{ value.kernel }}
  24. initrd {{ value.initrd }}
  25. boot
  26. goto utils_exit
  27. {% endif %}
  28. {% endfor %}
  29. :cmdline
  30. echo If you want to change the default kernel command line parameters
  31. echo you can override the defaults here.
  32. echo
  33. echo Currently set to: ${cmdline}
  34. echo
  35. echo -n Enter cmdline parameters: ${} && read cmdline
  36. goto utils_menu
  37. :nbxyz-custom
  38. echo EXPERIMENTAL
  39. echo
  40. echo Make sure you have a fork of https://github.com/netbootxyz/netboot.xyz-custom.
  41. echo You can then customize your fork as needed and set up your own custom options.
  42. echo Once your username is set, a custom option will appear on the main menu.
  43. echo
  44. echo -n Please enter your Github username: ${} && read github_user
  45. goto utils_menu
  46. :utils_exit
  47. clear menu
  48. exit 0