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 2.0KB

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