iPXE discussion forum
tftp second file - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: tftp second file (/showthread.php?tid=6929)



tftp second file - g10 - 2013-06-02 01:38

i would like to compile the ipxe with an embedded script that does

embeddedscript.ipxe
--------------------
#!ipxe
dhcp
read tftp file abc.txt
read first line of abc.txt "runme = http://ipaddress/winpe/boot.ipxe"
then boot runme

so how do i setup the script file and compile this
make embed=embeddedscript.ipxe didn't do anything for me, no compiler errors, and when i ran it, it was the same iso version.

note: on gpxe site i saw:
$ make EMBEDDED_IMAGE=../contrib/scripts/static.gpxe
so can i do something like that ?

PS: it would be nice to get NFS support (seems like it was removed)

thanks


RE: tftp second file - robinsmidsrod - 2013-06-05 10:08

iPXE doesn't support an eval-like command to load information like that.

You can, however create a separate iPXE script that can be used to customize the boot behavior for a single host, while keeping the boot behavior for all hosts generic. My menu script located at https://gist.github.com/robinsmidsrod/2234639 shows you how to do this particular thing. The bootstrap.ipxe file together with the hostname-XXX.ipxe is how I do it.

There is an NFS branch in mareo's git repo on git.ipxe.org. It is somewhat working, but still has some bugs in it that needs fixing up before it can be merged. The old NFS code from gPXE was never merged into iPXE (not sure why).