utils.ipxe 5.6 KB

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