You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

boot.ipxe 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #!ipxe
  2. :main
  3. console --picture misc/splash.png
  4. menu netboot.${domain} PXE
  5. <?php
  6. $types = [['live', 'unix/live', 'Live'],
  7. ['iso', 'iso', 'ISO'],
  8. ['install', 'unix/install', 'Installers'],
  9. ['winpe', 'winpe', 'Windows PE']];
  10. $labels = "";
  11. foreach ($types as $type)
  12. {
  13. echo "\nitem --gap -- " . $type[2] . "\n";
  14. if (is_dir($type[1])) {
  15. $items = scandir($type[1]);
  16. if (is_null($items))
  17. continue;
  18. foreach ($items as $item)
  19. {
  20. if ($item[0] == '.')
  21. continue;
  22. $name = ucwords($item);
  23. $label = $item . '-' . $type[0];
  24. echo "item $label" . " $name\n";
  25. $labels .= "\n\n:" . $label . "\n";
  26. $labels .= 'set ' . $type[0] . ' ' . $item . "\n";
  27. $labels .= 'goto boot-' . $type[0] . "\n\n";
  28. }
  29. }
  30. }
  31. ?>
  32. item --gap -- Misc
  33. item chain-online Chain on rthoni.com
  34. item config Config
  35. item shell Shell
  36. item --gap -- Power
  37. item reboot Reboot
  38. item poweroff Poweroff
  39. choose choice && goto ${choice}
  40. <?php
  41. echo $labels;
  42. ?>
  43. :chain-online
  44. chain http://netboot.rthoni.com/boot.ipxe
  45. :config
  46. config
  47. goto main
  48. :shell
  49. shell
  50. :reboot
  51. reboot
  52. :poweroff
  53. poweroff
  54. :boot-install
  55. set unix install/${install}
  56. set options vga=788 -- quiet
  57. goto boot-unix
  58. :boot-live
  59. set unix live/${live}
  60. set options vga=normal ramdisk_size=14332 root=/dev/nfs nfsroot=10.15.44.1:/pxeroot/${live} rw --
  61. goto boot-unix
  62. :boot-unix
  63. initrd unix/${unix}/initrd.img
  64. boot unix/${unix}/vmlinuz ${options}
  65. :boot-iso
  66. initrd iso/${iso}
  67. chain /memdisk iso raw
  68. boot
  69. :boot-winpe
  70. kernel winpe/${winpe}/wimboot
  71. initrd winpe/${winpe}/bcd BCD
  72. initrd winpe/${winpe}/boot.sdi boot.sdi
  73. initrd winpe/${winpe}/boot.wim boot.wim
  74. boot