utils.ipxe 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #!ipxe
  2. menu Utilities
  3. item --gap Utilities:
  4. item clonezilla ${space} Clonezilla
  5. item hdt ${space} Hardware Detection Tool
  6. item memtest ${space} MemTest86+
  7. item testpr ${space} Test netboot.xyz branch
  8. choose --default ${menu} menu || goto utils_exit
  9. echo ${cls}
  10. goto ${menu} ||
  11. chain ${menu}.ipxe || goto utils_exit
  12. goto linux_exit
  13. :hdt
  14. kernel ${memdisk} iso raw
  15. initrd http://www.hdt-project.org/raw-attachment/wiki/hdt-0.5.0/hdt-0.5.2.iso
  16. boot
  17. goto utils_exit
  18. :clonezilla
  19. set version 2.4.2-61
  20. iseq ${arch} x86_64 && set cz_arch amd64 || set cz_arch i686-pae
  21. set project clonezilla
  22. set iso ${project}_live_stable/${version}/${project}-live-${version}-${cz_arch}.iso
  23. set czurl http://sourceforge.net/projects/clonezilla/files/${iso}/download
  24. kernel ${memdisk} iso raw ${params}
  25. :retry
  26. iseq ${try} xxxxx && exit ||
  27. set try ${try}x
  28. initrd ${czurl} || goto retry
  29. boot || goto utils_exit
  30. :memtest
  31. chain utils/memtest.bin ${params} && goto main_menu ||
  32. echo MEMORY ERROR DETECTED! ${errno}
  33. echo Press any key to continue ...
  34. read a
  35. goto utils_exit
  36. :testpr
  37. echo This will chainload into a testing branch of netboot.xyz. You'll need to enter
  38. echo your Github User and the first part of the commit hash of the commit you want
  39. echo to test or the branch name. This assumes you are testing from a netboot.xyz
  40. echo repo.
  41. echo
  42. echo -n Specify Github User Name: ${} && read github_user
  43. echo -n Specify branch name or shortened commit hash ( i.e. my_feature or 30b7ca ): ${} && read github_hash
  44. echo
  45. echo Attempting to chainload:
  46. chain --autofree https://raw.githubusercontent.com/${github_user}/netboot.xyz/${github_hash}/src/menu.ipxe || echo Unable to find branch... && sleep 5 && goto utils_exit
  47. goto utils_exit
  48. :utils_exit
  49. clear menu
  50. chain menu.ipxe
  51. exit 0