1
0

utils.ipxe 5.8 KB

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