windows.ipxe.j2 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #!ipxe
  2. # Microsoft Windows
  3. # https://www.microsoft.com
  4. set win_arch x64
  5. goto ${menu} ||
  6. :windows
  7. set os Microsoft Windows
  8. clear win_version
  9. menu ${os}
  10. item --gap Installers
  11. item win_install ${space} Load ${os} Installer...
  12. item --gap Options:
  13. item arch_set ${space} Architecture [ ${win_arch} ]
  14. item url_set ${space} Base URL [ ${win_base_url} ]
  15. choose win_version || goto windows_exit
  16. goto ${win_version}
  17. :arch_set
  18. iseq ${win_arch} x64 && set win_arch x86 || set win_arch x64
  19. goto windows
  20. :url_set
  21. echo Set the HTTP URL of an extracted Windows ISO without the trailing slash:
  22. echo e.g. http://www.mydomain.com/windows
  23. echo
  24. echo -n URL: ${} && read win_base_url
  25. echo
  26. echo netboot.xyz will attempt to load the following files:
  27. echo ${win_base_url}/${win_arch}/bootmgr
  28. echo ${win_base_url}/${win_arch}/bootmgr.efi
  29. echo ${win_base_url}/${win_arch}/boot/bcd
  30. echo ${win_base_url}/${win_arch}/boot/boot.sdi
  31. echo ${win_base_url}/${win_arch}/sources/boot.wim
  32. echo
  33. prompt Press any key to return to Windows Menu...
  34. goto windows
  35. :win_install
  36. isset ${win_base_url} && goto boot || echo URL not set... && goto url_set
  37. :boot
  38. imgfree
  39. kernel {{ wimboot_location }}
  40. initrd -n bootmgr ${win_base_url}/${win_arch}/bootmgr bootmgr ||
  41. initrd -n bootmgr.efi ${win_base_url}/${win_arch}/bootmgr.efi bootmgr.efi ||
  42. initrd -n bcd ${win_base_url}/${win_arch}/boot/bcd bcd ||
  43. initrd -n bcd ${win_base_url}/${win_arch}/Boot/BCD bcd ||
  44. initrd -n boot.sdi ${win_base_url}/${win_arch}/boot/boot.sdi boot.sdi ||
  45. initrd -n boot.sdi ${win_base_url}/${win_arch}/Boot/boot.sdi boot.sdi ||
  46. initrd -n boot.wim ${win_base_url}/${win_arch}/sources/boot.wim boot.wim
  47. boot
  48. :windows_exit
  49. exit 0