This is an old revision of the document!
====== Pxeknife integretion with rom-o-matic ====== ===== Plan ===== provide pxe images/rom/nic with gpxe script embedded. This script will connect to pxeknife server to get boot loader. ===== Implementation ===== In file rom-o-matic/build.php the image is compiled by following command <code> make -C '$dir' '$target' </code> I have modified it to compile with embedded image by modifying above code with <code> make -C '$dir' EMBEDDED_IMAGE=./pxeDHCP.gpxe '$target' </code> the script //./pxeDHCP.gpxe// contains following code <code> #!gpxe echo "Hi, We will be using PXEKnife from URL http://www.alien.doesntexist.org/pxeknife" echo "It is assumed that you have dhcp networking" imgload pxeSTATIC.gpxe imgstat ifopen net0 echo "Hit Control+C to cancel DHCP" echo "You may want to do this if you want to use static-IP" echo "Otherwise, it will try DHCP, and then anyway go to static-IP" sleep 4 dhcp net0 set 209:string pxelinux.cfg/default set 210:string http://www.alien.doesntexist.org/pxeknife/ echo "Here we go" chain http://www.alien.doesntexist.org/pxeknife/pxelinux.0 echo "PxeKnife booting cancelled, using local disk instead.." </code> The code is hosted at url [[http://www.alien.doesntexist.org/pxeknife/PHP/gpxe_generation/]] ===== Problems ===== When I boot using qemu with following command <code> qemu -fda gpxe-git-e1000.dsk </code> I get following error <code> no such interface: net0 </code> and booting fails :-(. I also tried with gpxe-git-3c509-eisa.dsk but same result.\\ But when I compile the the gpxe with same script and no target, it works fine <code> make EMBEDDED_IMAGE=./pxeDHCP.gpxe qemu -fda bin/gpxe.dsk </code> ==== Solution ==== Problem was that, qemu does not support all network drivers, and you need to tell qemu which device driver to emulate. Following qemu command is working for rtl8139 ===== For static IP ===== To support static IP, the plan is to have two scripts, one with DHCP and one with Static. When DHCP fails, static will pick up and continue execution. ==== Problem ==== Second script is not getting executed.