2012-10-21, 14:38
How much memory does iPXE "have"? If I reload to a new php?with variables too many times, iPXE crash.
Using latest iPXE built from git (as of today). Specifically ipxe.pxe with EMBED=script
With "script"
This is my example:
With OR "choose xxx && goto xxx || "
On the 14 th run, after selected on the first menu, it redirects me straight to :failed.
Without OR "choose xxx && goto xxx " I get Error: No such file or directory
http://ipxe.org/err/2d02803b
Working example: http://127.0.0.1/test.php
Why is this not working on the 14th time?
Why would I want to do this over and over again? If I have user input that I want PHP to be able to work with, this was the only way I could get it to work.
I problably dont have to chain to another page 14 times, but was just curious why it did not work the 14th time.
As of now. I have configured adLDAP, and the use of SSH, after an login.
So we can authenticate userinput from iPXE login, in Active Directory, SSH to a linux box, run "ldapsearch -h dc ....." and look for our Admin group.
The reason I use SSH, was that I could not get adLDAPs built in fetch user/group info to work.
If we find this user in admin group, they can install a new computer. Regular users may not
Using latest iPXE built from git (as of today). Specifically ipxe.pxe with EMBED=script
With "script"
Code:
#!ipxe
dhcp
chain http://web-server-address/test.php
This is my example:
With OR "choose xxx && goto xxx || "
On the 14 th run, after selected on the first menu, it redirects me straight to :failed.
Without OR "choose xxx && goto xxx " I get Error: No such file or directory
http://ipxe.org/err/2d02803b
Working example: http://127.0.0.1/test.php
PHP Code:
<?php
header ( "Content-type: text/plain" );
echo "#!ipxe \n";
$COUNT = $_REQUEST['count'];
$MODE = $_REQUEST['mode'];
$TYPE = $_REQUEST['type'];
$DISTRO = $_REQUEST['distro'];
$MENU_TITLE = "Last selected ${TYPE} ${MODE} ${DISTRO} ${COUNT}";
echo "menu ${MENU_TITLE} \n";
echo "item domaininstall Domain Install \n";
echo "item standalone Standalone \n";
echo "item basic Basic \n";
echo "item server Server \n";
echo "item \n";
echo "item reboot Reboot \n";
echo "choose installtype && goto \${installtype} \n";
# store ipxe choice as a variable
$INSTALLTYPE = "\${installtype}";
# Installtype
echo ":domaininstall \n";
echo ":standalone \n";
echo ":basic \n";
echo ":server \n";
echo "menu ${MENU_TITLE} \n";
echo "item delete_all Delete_all \n";
echo "item linux_only Linux_only \n";
echo "item diskless Diskless \n";
echo "choose installmode && goto \${installmode} \n";
# store ipxe choice as a variable
$INSTALLMODE = "\${installmode}";
# Installmode
echo ":delete_all \n";
echo ":linux_only \n";
echo ":diskless \n";
echo "menu ${MENU_TITLE} \n";
echo "item rhws5u2 rhws5u2 \n";
echo "item rhws5u3 rhws5u3 \n";
echo "item rhws5u4 rhws5u4 \n";
echo "choose distro && goto \${distro} \n";
# store ipxe choice as a variable
$DISTRO = "\${distro}";
# Installmode
echo ":rhws5u2 \n";
echo ":rhws5u3 \n";
echo ":rhws5u4 \n";
#echo "prompt Press any key to Reload \n";
$COUNT++;
echo "chain http://". $_SERVER["SERVER_NAME"] . $_SERVER['PHP_SELF'] . "?count=${COUNT}&mode=${INSTALLMODE}&type=${INSTALLTYPE}&distro=${DISTRO} \n";
echo ":failed \n";
echo "prompt Failed, press any key to reboot \n";
echo "reboot \n";
?>
Why is this not working on the 14th time?
Why would I want to do this over and over again? If I have user input that I want PHP to be able to work with, this was the only way I could get it to work.
I problably dont have to chain to another page 14 times, but was just curious why it did not work the 14th time.
As of now. I have configured adLDAP, and the use of SSH, after an login.
So we can authenticate userinput from iPXE login, in Active Directory, SSH to a linux box, run "ldapsearch -h dc ....." and look for our Admin group.
The reason I use SSH, was that I could not get adLDAPs built in fetch user/group info to work.
If we find this user in admin group, they can install a new computer. Regular users may not