Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
scripting [2011/05/26 09:49]
mcb30
scripting [2011/12/02 21:36]
mcb30
Line 98: Line 98:
  
 ===== Advanced topics ===== ===== Advanced topics =====
 +
 +{{ :​clipart:​bootrom.jpeg?​120x96|An iPXE ROM}}
 +
 +==== Embedded scripts ====
 +
 +You can [[:embed]] a script within iPXE to override its default behaviour. ​ For example, you may wish to build a version of iPXE containing an [[:​embed|embedded script]] that uses DHCP to obtain an IP address but then boots from a predefined SAN target. ​
  
 ==== Dynamic scripts ==== ==== Dynamic scripts ====
Line 115: Line 121:
     set initiator-iqn iqn.2010-04.org.ipxe:​BKQ42M1     set initiator-iqn iqn.2010-04.org.ipxe:​BKQ42M1
     sanboot iscsi:​192.168.0.20::::​iqn.2010-04.org.ipxe:​winxp     sanboot iscsi:​192.168.0.20::::​iqn.2010-04.org.ipxe:​winxp
- 
-{{ :​clipart:​bootroms.jpeg?​350x190|Some PXE ROMs}} 
- 
-==== Embedded scripts ==== 
- 
-You can embed a script within iPXE to override its default behaviour.((When you embed a script, you will no longer see the "Press Ctrl-B for the iPXE command line" prompt at startup or if booting fails. ​ If you wish, you can provide your own replacement prompt using the ''​[[:​cmd:​prompt]]''​ command.)) ​ For example, if you want to obtain an IP address using DHCP but then always boot from a fixed URL (ignoring any boot filename provided by DHCP), then you could embed a script such as: 
- 
-    #!ipxe 
-    ​ 
-    dhcp 
-    chain http://​bootserver/​boot.php?​asset=${asset} 
- 
-To embed this script within iPXE, add ''​EMBED=<​script>''​ when you [[:​download|build]] iPXE.  For example, to embed a script saved as ''​myscript.ipxe''​ into a [[:​howto:​chainloading|chainloadable]] iPXE image: 
- 
-    make bin/​undionly.kpxe EMBED=myscript.ipxe 
  
scripting.txt ยท Last modified: 2014/03/14 00:22 by mcb30
Recent changes RSS feed CC Attribution-Share Alike 4.0 International Driven by DokuWiki
All uses of this content must include an attribution to the iPXE project and the URL https://ipxe.org
References to "iPXE" may not be altered or removed.