Post Reply 
 
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
starting script from command line
2012-12-06, 17:53 (This post was last modified: 2012-12-06 17:56 by MultimediaMan.)
Post: #4
RE: starting script from command line
Yes, or they embed them in the ipxe binary (undionly.kpxe/ipxe.pxe or ipxe.lkrn).

For the first time users, it would be safe to say that the CTRL-B command line is where you get your feet wet, but past that, it's all scripts on a webserver or a PHP engine.

That's the beauty of iPXE; you can compile a small embedded script which executes a certain repeatable process as specific or as general as you want; once that process is established, you can expand or leverage it further as you see fit.

Myself, I have an embedded script which attempt to dhcp (three times) and checks for the UUID of a system as the chainload file. If it's not there, then it exits out. If it is there, it executes whatever is in the script.

Example embedded script:

Code:
#!ipxe
#Generic Boot Script

set 0_attempt 1

:0_retry

dhcp ||
isset ${17} && goto 0_next ||
iseq ${0_attempt} 3 && goto 0_end
iseq ${0_attempt} 2 && set 0_attempt 3
iseq ${0_attempt} 1 && set 0_attempt 2

goto 0_retry

:0_next

chain ${17}/ipxe/boot/${uuid}.ipxe ||

:0_end

exit

"Thus far, you have been adrift within the sheltered harbor of my patience..."
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: ipxe - thomil - 2012-12-04, 18:26
RE: ipxe - mrc333777 - 2012-12-06, 15:15
RE: starting script from command line - MultimediaMan - 2012-12-06 17:53



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