Ver Fonte

Merge pull request #105 from antonym/windows

Adds support for loading Windows Installs
Antony Messerli há 8 anos atrás
pai
commit
81812f83a5
4 ficheiros alterados com 55 adições e 0 exclusões
  1. 1 0
      README.md
  2. 1 0
      docs/index.md
  3. 1 0
      src/menu.ipxe
  4. 52 0
      src/windows.ipxe

+ 1 - 0
README.md

@@ -44,6 +44,7 @@ Full documentation is at ReadTheDocs:
 * [Kali Linux](https://www.kali.org)
 * [Mageia](http://www.mageia.org)
 * [Manjaro Linux](https://manjaro.github.io)
+* [Microsoft Windows](https://www.microsoft.com)
 * [MirOS](https://www.mirbsd.org)
 * [OpenBSD](http://openbsd.org)
 * [OpenSUSE](http://opensuse.org)

+ 1 - 0
docs/index.md

@@ -48,6 +48,7 @@ You'll need to make sure to have [DOWNLOAD_PROTO_HTTPS](https://github.com/ipxe/
 * [Kali Linux](https://www.kali.org)
 * [Mageia](http://www.mageia.org)
 * [Manjaro Linux](https://manjaro.github.io)
+* [Microsoft Windows](https://www.microsoft.com)
 * [MirOS](https://www.mirbsd.org)
 * [OpenBSD](http://openbsd.org)
 * [OpenSUSE](http://opensuse.org)

+ 1 - 0
src/menu.ipxe

@@ -47,6 +47,7 @@ item linux ${space} Linux Installers
 item bsd ${space} BSD Installers
 item freedos ${space} FreeDOS Installers
 item hypervisor ${space} Hypervisor Installers
+item windows ${space} Windows Installers
 item --gap Tools:
 item utils ${space} Utilities
 item shell ${space} iPXE shell

+ 52 - 0
src/windows.ipxe

@@ -0,0 +1,52 @@
+#!ipxe
+
+# Microsoft Windows
+# https://www.microsoft.com
+
+set win_arch x64
+goto ${menu} ||
+
+:windows
+set os Microsoft Windows
+clear win_version
+menu ${os} 
+item --gap Installers
+item win_install ${space} Load ${os} Installer...
+item --gap Options:
+item arch_set ${space} Architecture [ ${win_arch} ]
+item url_set ${space} Base URL [ ${win_base_url} ]
+choose win_version || goto windows_exit
+goto ${win_version}
+
+:arch_set
+iseq ${win_arch} x64 && set win_arch x86 || set win_arch x64
+goto windows
+
+:url_set
+echo Set the HTTP URL of an extracted Windows ISO without the trailing slash:
+echo e.g. http://www.mydomain.com/windows
+echo
+echo -n URL: ${} && read win_base_url
+echo
+echo netboot.xyz will attempt to load the following files:
+echo ${win_base_url}/${win_arch}/bootmgr
+echo ${win_base_url}/${win_arch}/boot/bcd
+echo ${win_base_url}/${win_arch}/boot/boot.sdi
+echo ${win_base_url}/${win_arch}/sources/boot.wim
+echo
+prompt Press any key to return to Windows Menu...
+goto windows
+
+:win_install
+isset ${win_base_url} && goto boot || echo URL not set... && goto url_set
+
+:boot
+kernel http://${boot_domain}/wimboot
+initrd ${win_base_url}/${win_arch}/bootmgr bootmgr
+initrd ${win_base_url}/${win_arch}/boot/bcd bcd
+initrd ${win_base_url}/${win_arch}/boot/boot.sdi boot.sdi
+initrd ${win_base_url}/${win_arch}/sources/boot.wim boot.wim
+boot
+
+:windows_exit
+exit 0