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

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