Add Dockerfile and supporting files.

This commit is contained in:
Jack Hadrill 2022-07-24 19:59:02 +01:00
parent 2b73acf6d4
commit a8bc171559
199 changed files with 729 additions and 0 deletions

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
html/winpe/** filter=lfs diff=lfs merge=lfs -text

6
Dockerfile Normal file
View File

@ -0,0 +1,6 @@
FROM php:8.1-apache
COPY html/ /var/www/html/
EXPOSE 80/tcp
VOLUME [ "/config" ]

1
html/.htaccess Normal file
View File

@ -0,0 +1 @@
Options +Indexes

31
html/ipxe/iscsi-boot.php Normal file
View File

@ -0,0 +1,31 @@
<?php
header("Content-Type: text/plain");
$config = json_decode(file_get_contents("/config/config.json"), true);
$menuOptions = "";
$gotoSections = "";
foreach($config["iscsi-targets"] as $target) {
$id = uniqid();
$menuOptions .= "item {$id} {$target['name']}\r\n";
$gotoSections .= ":{$id}\r\n";
$gotoSections .= "sanboot {$target['target']}\r\n";
$gotoSections .= "goto back\r\n";
};
$template = "#!ipxe
menu Select an iSCSI target to boot from
item --gap -- iSCSI targets
{$menuOptions}
item
item back Back to main menu
choose selected
goto \${selected} || goto shell
{$gotoSections}
:back
chain http://{$config['host']}/ipxe/main-menu.php";
print($template);

31
html/ipxe/iscsi-hook.php Normal file
View File

@ -0,0 +1,31 @@
<?php
header("Content-Type: text/plain");
$config = json_decode(file_get_contents("/config/config.json"), true);
$menuOptions = "";
$gotoSections = "";
foreach($config["iscsi-targets"] as $target) {
$id = uniqid();
$menuOptions .= "item {$id} {$target['name']}\r\n";
$gotoSections .= ":{$id}\r\n";
$gotoSections .= "sanhook --drive 0x80 {$target['target']}\r\n";
$gotoSections .= "goto back\r\n";
};
$template = "#!ipxe
menu Select an iSCSI target to hook
item --gap -- iSCSI targets
{$menuOptions}
item
item back Back to main menu
choose selected
goto \${selected} || goto shell
{$gotoSections}
:back
chain http://{$config['host']}/ipxe/main-menu.ipxe";
print($template);

69
html/ipxe/main-menu.php Normal file
View File

@ -0,0 +1,69 @@
<?php
header("Content-Type: text/plain");
$config = json_decode(file_get_contents("/config/config.json"), true);
$template = "#!ipxe
:start
menu Select target boot device
item --gap -- iSCSI targets
item --key i iscsiboot Boot from JackNet AD assigned iSCSI disks
item --key i iscsihook Hook a JackNet AD assigned iSCSI disk
item --gap -- OS installers
item --key w winpe Boot WinPE
item --key n netbootxyz Boot netboot.xyz
item --gap -- Advanced options
item --key c config Configure settings
item shell Drop to iPXE shell
item reboot Reboot computer
item
item --key x exit Exit iPXE and continue BIOS boot
choose selected
goto \${selected} || goto shell
# Boot from an iSCSI target.
:iscsiboot
login
params
param username \${username:uristring}
param password \${password:uristring}
chain http://{$config['host']}/ipxe/iSCSIBoot.php##params
goto start
# Hook an iSCSI target and then continue with normal boot process.
:iscsihook
login
params
param username \${username:uristring}
param password \${password:uristring}
chain http://{$config['host']}/ipxe/iSCSIHook.php##params
goto start
# Boot from WinPE.
:winpe
chain /winpe.ipxe
goto start
# Boot Netboot.xyz
:netbootxyz
chain http://boot.netboot.xyz/menu.ipxe
goto start
# Utility functions.
:shell
echo Type 'exit' to return to the menu
shell
goto start
:reboot
reboot
:exit
exit";
print($template);

14
html/ipxe/winpe.php Normal file
View File

@ -0,0 +1,14 @@
<?php
header("Content-Type: text/plain");
$config = json_decode(file_get_contents("/config/config.json"), true);
$template = "#!ipxe
kernel http://{$config['host']}/winpe/wimboot
initrd http://{$config['host']}/winpe/amd64/media/Boot/BCD BCD
initrd http://{$config['host']}/winpe/amd64/media/Boot/boot.sdi boot.sdi
initrd http://{$config['host']}/winpe/amd64/media/sources/boot.wim boot.wim
boot";
print($template);

BIN
html/winpe/amd64/fwfiles/efisys.bin (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/fwfiles/etfsboot.com (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/BCD (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/BCDTemplate (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/Fonts/chs_boot.ttf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/Fonts/cht_boot.ttf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/Fonts/jpn_boot.ttf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/Fonts/kor_boot.ttf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/Fonts/malgun_boot.ttf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/Fonts/malgunn_boot.ttf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/Fonts/meiryo_boot.ttf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/Fonts/meiryon_boot.ttf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/Fonts/msjh_boot.ttf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/Fonts/msjhn_boot.ttf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/Fonts/msyh_boot.ttf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/Fonts/msyhn_boot.ttf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/Fonts/segmono_boot.ttf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/Fonts/segoe_slboot.ttf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/Fonts/segoen_slboot.ttf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/Fonts/wgl4_boot.ttf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/Resources/bootres.dll (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/bg-bg/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/boot.sdi (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/bootfix.bin (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/cs-cz/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/cs-cz/memtest.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/da-dk/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/da-dk/memtest.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/de-de/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/de-de/memtest.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/el-gr/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/el-gr/memtest.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/en-gb/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/en-us/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/en-us/memtest.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/es-es/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/es-es/memtest.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/es-mx/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/et-ee/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/fi-fi/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/fi-fi/memtest.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/fr-ca/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/fr-fr/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/fr-fr/memtest.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/hr-hr/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/hu-hu/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/hu-hu/memtest.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/it-it/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/it-it/memtest.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/ja-jp/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/ja-jp/memtest.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/ko-kr/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/ko-kr/memtest.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/lt-lt/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/lv-lv/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/memtest.exe (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/nb-no/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/nb-no/memtest.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/nl-nl/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/nl-nl/memtest.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/pl-pl/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/pl-pl/memtest.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/pt-br/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/pt-br/memtest.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/pt-pt/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/pt-pt/memtest.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/ro-ro/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/ru-ru/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/ru-ru/memtest.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/sk-sk/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/sl-si/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/sr-latn-rs/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/sv-se/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/sv-se/memtest.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/tr-tr/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/tr-tr/memtest.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/uk-ua/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/zh-cn/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/zh-cn/memtest.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/zh-tw/bootmgr.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/Boot/zh-tw/memtest.exe.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/EFI/Boot/bg-bg/bootx64.efi.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/EFI/Boot/bootx64.efi (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/EFI/Boot/cs-cz/bootx64.efi.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/EFI/Boot/da-dk/bootx64.efi.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/EFI/Boot/de-de/bootx64.efi.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/EFI/Boot/el-gr/bootx64.efi.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/EFI/Boot/en-gb/bootx64.efi.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/EFI/Boot/en-us/bootx64.efi.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/EFI/Boot/es-es/bootx64.efi.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/EFI/Boot/es-mx/bootx64.efi.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/EFI/Boot/et-ee/bootx64.efi.mui (Stored with Git LFS) Normal file

Binary file not shown.

BIN
html/winpe/amd64/media/EFI/Boot/fi-fi/bootx64.efi.mui (Stored with Git LFS) Normal file

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More