The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 807 - File: showthread.php PHP 7.3.15 (Linux)
File Line Function
/showthread.php 807 errorHandler->error





Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Issue with iPXE and PHP
2012-11-30, 01:25
Post: #1
Issue with iPXE and PHP
Hi! I was wondering if someone could give me a sanity check please because something is going wrong with my attempt to implement a PHP bootserver...

Essentially the problem is that iPXE gets the first script but hangs after getting the second (with no error).

I have DHCP, TFTP and Apache set up correctly. I am able to build iPXE with the embedded demo script from the documentation. That works fine (loads the kernel from http://demo.ipxe.org etc).

So what I am trying to do is to have an embedded ipxe script that points to my local webserver: http://bs1/boot.php?mac=zzzzzzzzzzzz etc. This is the script I embedded:


#!ipxe

dhcp
chain http://bs1/boot.php?mac=${net0/mac}


(FYI, I tried it with the FQDN and iPXE kept giving me dns error, so I just put http://bs1 now...).


The reason I am passing the mac address is that I intend to serve different images according to the machines mac address (guess thats obvious!).

The PHP script I have on my webserver is:


<?PHP
header ("Content-type: text/plain");
$ma = $_GET['mac'];

echo "#!ipxe\n";
echo "dhcp\n";
echo "chain http://boot.ipxe.org/demo/boot.php";

?>


As you can see, I have pointed this script to your demo site as a test and last-resort because I tried pointing it to local kernel and initrd and it hung then too. So iPXE wont access mine or your files, but simply hangs and shows no error. Help!!
Am I missing something obvious?

I wondered if it was due to formatting of the php or something...
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Issue with iPXE and PHP - sarahphillips - 2012-11-30 01:25
RE: Issue with iPXE and PHP - thomil - 2012-12-05, 01:19
RE: Issue with iPXE and PHP - NiKiZe - 2017-12-17, 11:27
RE: Issue with iPXE and PHP - Torgeir - 2012-12-05, 11:23



User(s) browsing this thread: 1 Guest(s)