Add Dockerfile and supporting files.
This commit is contained in:
parent
2b73acf6d4
commit
a8bc171559
|
@ -0,0 +1 @@
|
||||||
|
html/winpe/** filter=lfs diff=lfs merge=lfs -text
|
|
@ -0,0 +1,6 @@
|
||||||
|
FROM php:8.1-apache
|
||||||
|
|
||||||
|
COPY html/ /var/www/html/
|
||||||
|
|
||||||
|
EXPOSE 80/tcp
|
||||||
|
VOLUME [ "/config" ]
|
|
@ -0,0 +1 @@
|
||||||
|
Options +Indexes
|
|
@ -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);
|
|
@ -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);
|
|
@ -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);
|
|
@ -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);
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue