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.5KB

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