utils.ipxe 5.4 KB

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