utils.ipxe 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. #!ipxe
  2. menu Utilities - Image Sig Checks: [${img_sigs_enabled}]
  3. item --gap Utilities:
  4. item alt_linux_rescue ${space} ALT Linux Rescue
  5. item avg ${space} AVG Rescue CD
  6. item clonezilla ${space} Clonezilla
  7. item dban ${space} DBAN
  8. item gparted ${space} GParted
  9. item hdt ${space} Hardware Detection Tool
  10. item memtest-420 ${space} Memtest86+ 4.20
  11. item memtest-501 ${space} Memtest86+ 5.01
  12. item partition-wizard ${space} Partition Wizard
  13. item pogostick ${space} Pogostick - Offline Windows Password and Registry Editor
  14. item supergrub ${space} Super Grub2 Disk
  15. item sysrcd ${space} SystemRescueCD
  16. item ubcd ${space} Ultimate Boot CD (UBCD)
  17. item --gap netboot.xyz tools:
  18. item nbxyz-custom ${space} Set Github User [user: ${github_user}]
  19. item testdistro ${space} Test Distribution ISO
  20. item testpr ${space} Test netboot.xyz branch
  21. choose --default ${menu} menu || goto utils_exit
  22. echo ${cls}
  23. goto ${menu} ||
  24. chain ${menu}.ipxe || goto utils_exit
  25. goto utils_exit
  26. :alt_linux_rescue
  27. iseq ${arch} x86_64 && goto alt_linux_rescue_x64 ||
  28. set util_path nightly.altlinux.org/p8/release/alt-p8-rescue-20170312-i586.iso
  29. set util_file alt-p8-rescue-20170312-i586.iso
  30. goto boot_memdisk
  31. :alt_linux_rescue_x64
  32. set util_path nightly.altlinux.org/p8/release/alt-p8-rescue-20170312-x86_64.iso
  33. set util_file alt-p8-rescue-20170312-x86_64.iso
  34. goto boot_memdisk
  35. :avg
  36. set avg_version 160420a12074
  37. set util_path download.avg.com/filedir/inst/avg_arl_cdi_all_120_${avg_version}.iso
  38. set util_file avg_arl_cdi_all_120_${avg_version}.iso
  39. goto boot_memdisk
  40. :clonezilla
  41. set clonezilla_version 2.5.0-25
  42. set util_path sourceforge.net/projects/clonezilla/files/clonezilla_live_stable/${clonezilla_version}/clonezilla-live-${clonezilla_version}-amd64.iso/download
  43. set util_file clonezilla-live-${clonezilla_version}-amd64.iso
  44. goto boot_memdisk
  45. :dban
  46. set dban_version 2.3.0
  47. set util_path sourceforge.net/projects/dban/files/dban/dban-${dban_version}/dban-${dban_version}_i586.iso/download
  48. set util_file dban-${dban_version}_i586.iso
  49. goto boot_memdisk
  50. :gparted
  51. set gparted_version 0.28.1-1
  52. set util_path sourceforge.net/projects/gparted/files/gparted-live-stable/${gparted_version}/gparted-live-${gparted_version}-amd64.iso/download
  53. set util_file gparted-live-${gparted_version}-amd64.iso
  54. goto boot_memdisk
  55. :hdt
  56. set util_path www.hdt-project.org/raw-attachment/wiki/hdt-0.5.0/hdt-0.5.2.iso
  57. set util_file hdt-0.5.2.iso
  58. goto boot_memdisk
  59. :memtest-420
  60. set util_path boot.netboot.xyz/utils/memtest86-4.20.bin
  61. set util_file memtest86-4.20.bin
  62. goto boot_memtest
  63. :memtest-501
  64. set util_path boot.netboot.xyz/utils/memtest86-5.01.bin
  65. set util_file memtest86-5.01.bin
  66. goto boot_memtest
  67. :partition-wizard
  68. set util_path www.partitionwizard.com/download/pwfree91-x64.iso
  69. set util_file pwfree91-x64.iso
  70. goto boot_memdisk
  71. :pogostick
  72. set util_path pogostick.net/~pnh/ntpasswd/cd140201.zip
  73. set util_file cd140201.zip
  74. goto boot_memdisk
  75. :supergrub
  76. set util_path sourceforge.net/projects/supergrub2/files/2.02s4/super_grub2_disk_hybrid_2.02s4.iso/download
  77. set util_file super_grub2_disk_hybrid_2.02s4.iso
  78. goto boot_memdisk
  79. :sysrcd
  80. set sysrcdpath sourceforge.net/projects/netboot-xyz/files/distros/sysresccd-x86/4.8.1
  81. kernel --name altker64 https://${sysrcdpath}/altker64/download setkmap=no net.ifnames=0 backstore=off
  82. initrd --name initram.igz https://${sysrcdpath}/initram.igz/download
  83. initrd --name sysrcd.dat https://${sysrcdpath}/sysrcd.dat/download /sysrcd.dat
  84. echo
  85. echo MD5sums:
  86. md5sum altker64 initram.igz sysrcd.dat
  87. iseq ${img_sigs_enabled} true && goto verify_sigs_sysrcd || goto skip_sigs_sysrcd
  88. :verify_sigs_sysrcd
  89. echo
  90. echo Checking signatures...
  91. imgverify altker64 ${sigs}${menu}/altker64.sig || goto error
  92. imgverify initram.igz ${sigs}${menu}/initram.igz.sig || goto error
  93. imgverify sysrcd.dat ${sigs}${menu}/sysrcd.dat.sig || goto error
  94. echo Signatures verified!
  95. echo
  96. :skip_sigs_sysrcd
  97. boot
  98. goto utils_exit
  99. :ubcd
  100. set util_path mirror.sysadminguide.net/ubcd/ubcd537.iso
  101. set util_file ubcd537.iso
  102. goto boot_memdisk
  103. :boot_memdisk
  104. imgfree
  105. kernel ${memdisk} iso raw
  106. initrd --name ${util_file} http://${util_path}
  107. echo
  108. echo MD5sums:
  109. md5sum memdisk ${util_file}
  110. iseq ${img_sigs_enabled} true && goto verify_sigs || goto skip_sigs
  111. :verify_sigs
  112. echo
  113. echo Checking signatures...
  114. imgverify memdisk ${sigs}memdisk.sig || goto error
  115. imgverify ${util_file} ${sigs}${menu}/${util_file}.sig || goto error
  116. echo Signatures verified!
  117. echo
  118. :skip_sigs
  119. boot
  120. goto utils_exit
  121. :boot_memtest
  122. chain https://${util_path} && goto main_menu ||
  123. goto utils_exit
  124. :nbxyz-custom
  125. echo EXPERIMENTAL
  126. echo
  127. echo Make sure you have a fork of https://github.com/antonym/netboot.xyz-custom.
  128. echo You can then customize your fork as needed and set up your own custom options.
  129. echo Once your username is set, a custom option will appear on the main menu.
  130. echo
  131. echo -n Please enter your Github username: ${} && read github_user
  132. goto utils_exit
  133. :testdistro
  134. echo This option will allow you to test booting an ISO using memdisk. Please
  135. echo specify the url of the ISO you want to test and it will automatically
  136. echo attempt to load the ISO using memdisk.
  137. echo -n URL: ${} && read distro_iso
  138. kernel ${memdisk} iso raw
  139. initrd ${distro_iso}
  140. boot
  141. goto utils_exit
  142. :testpr
  143. clear github_user
  144. clear github_hash
  145. echo This will chainload into a testing branch of netboot.xyz. You'll need to enter
  146. echo your Github User and the first part of the commit hash of the commit you want
  147. echo to test or the branch name. This assumes you are testing from a netboot.xyz
  148. echo repo.
  149. echo
  150. echo -n Specify Github User Name: ${} && read github_user
  151. echo -n Specify branch name or hash ( i.e. my_feature or 30b7ca ): ${} && read github_hash
  152. echo
  153. echo Attempting to chainload:
  154. 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
  155. goto utils_exit
  156. :utils_exit
  157. clear menu
  158. exit 0