<div>[quote] 2)I didn't build iPXE with the script, I'm just trying to use undionly.kpxe with the script: [/quote] </div><div> </div><div>Right there is your problem, I think. The script is in a remote location, it is not embedded in iPXE. So, when you "run" it via chainload, you are running it from the server (read once), not the client. I am not sure how to copy a script into memory for "re-use" (I would think imgfetch/imgload/initrd). </div>
<div> </div><div>As it is now, If any command fails, you lose the path to the script. If you would have chosen a different configuration characteristic which was not network dependent, this wouldn't have occurred.</div>
<div> </div><div>Instead of chainloading the script, try:</div><div> </div><div>[code]</div><div>initrd ${path-to-script}</div><div>boot</div><div>[code]</div><div> </div><div>as described here: <a href="http://www.ipxe.org/cmd/imgfetch?redirect=1">http://www.ipxe.org/cmd/imgfetch?redirect=1</a></div>
<div> </div><div>Best,</div><div> </div><div>Matt</div><div> </div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Nov 24, 2012 at 5:50 PM, Ty Christensen <span dir="ltr"><<a href="mailto:tyc@mastermindpro.com" target="_blank">tyc@mastermindpro.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Shao,<br>
<br>
1) Script on the forum post at the link I've included in this thread<br>
2) I didn't build iPXE with the script, I'm just trying to use undionly.kpxe with the script<br>
3) Don't know...not at a place to check at the moment, but I will when I return to the office<br>
<div class="im HOEnZb"><br>
-----Original Message-----<br>
From: Shao Miller [mailto:<a href="mailto:sha0.miller@gmail.com">sha0.miller@gmail.com</a>]<br>
Sent: Saturday, November 24, 2012 10:58 AM<br>
To: Ty Christensen<br>
Cc: <a href="mailto:ipxe-devel@lists.ipxe.org">ipxe-devel@lists.ipxe.org</a><br>
</div><div class="HOEnZb"><div class="h5">Subject: RE: [ipxe-devel] Handling errors in scripts<br>
<br>
Good day, Ty.<br>
<br>
1. What script are you using?<br>
<br>
2. How did you build iPXE with that script?<br>
<br>
3. What version does the iPXE you built report itself to be?<br>
<br>
- Shao Miller<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:ipxe-devel-bounces@lists.ipxe.org">ipxe-devel-bounces@lists.ipxe.org</a><br>
[mailto:<a href="mailto:ipxe-devel-bounces@lists.ipxe.org">ipxe-devel-bounces@lists.ipxe.org</a>] On Behalf Of Ty Christensen<br>
Sent: Saturday, November 24, 2012 12:26<br>
To: Thomas Miletich<br>
Cc: <a href="mailto:ipxe-devel@lists.ipxe.org">ipxe-devel@lists.ipxe.org</a><br>
Subject: Re: [ipxe-devel] Handling errors in scripts<br>
<br>
Does anyone have any idea why such simple functions are broken?  It's easy to test...just shut down the DHCP server on your physical network segment and watch as a script that is supposed to retry the DHCP request...doesn't.<br>

It exits the script every time.<br>
<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:ipxe-devel-bounces@lists.ipxe.org">ipxe-devel-bounces@lists.ipxe.org</a><br>
[mailto:<a href="mailto:ipxe-devel-bounces@lists.ipxe.org">ipxe-devel-bounces@lists.ipxe.org</a>] On Behalf Of Ty Christensen<br>
Sent: Wednesday, November 14, 2012 4:38 PM<br>
To: Thomas Miletich<br>
Cc: <a href="mailto:ipxe-devel@lists.ipxe.org">ipxe-devel@lists.ipxe.org</a><br>
Subject: Re: [ipxe-devel] Handling errors in scripts<br>
<br>
Did a fresh git sync and compiled undionly.kpxe.  Tried it, but got the same results.<br>
<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:ipxe-devel-bounces@lists.ipxe.org">ipxe-devel-bounces@lists.ipxe.org</a><br>
[mailto:<a href="mailto:ipxe-devel-bounces@lists.ipxe.org">ipxe-devel-bounces@lists.ipxe.org</a>] On Behalf Of Ty Christensen<br>
Sent: Wednesday, November 14, 2012 3:25 PM<br>
To: Thomas Miletich<br>
Cc: <a href="mailto:ipxe-devel@lists.ipxe.org">ipxe-devel@lists.ipxe.org</a><br>
Subject: Re: [ipxe-devel] Handling errors in scripts<br>
<br>
I don't think so, at least it's not ancient.  I did a git checkout only a month ago.  I'll do a fresh download and see if that makes a difference, though.<br>
<br>
<br>
-----Original Message-----<br>
From: Thomas Miletich [mailto:<a href="mailto:thomas.miletich@gmail.com">thomas.miletich@gmail.com</a>]<br>
Sent: Wednesday, November 14, 2012 3:19 PM<br>
To: Ty Christensen<br>
Cc: <a href="mailto:ipxe-devel@lists.ipxe.org">ipxe-devel@lists.ipxe.org</a><br>
Subject: Re: [ipxe-devel] Handling errors in scripts<br>
<br>
How recent is your iPXE version?<br>
<br>
Could it be ancient enough to simply not support the new scripting features yet? It's always a good idea to try the most recent version anyway.<br>
<br>
Thomas<br>
<br>
On Thu, Nov 15, 2012 at 12:11 AM, Ty Christensen <<a href="mailto:tyc@mastermindpro.com">tyc@mastermindpro.com</a>><br>
wrote:<br>
> I posted on the forums about a problem with iPXE scripts and error<br>
handling, but Robin ultimately suggested I try here instead.  To see the forum post and problem details, go here:<br>
> <a href="http://forum.ipxe.org/showthread.php?tid=6764" target="_blank">http://forum.ipxe.org/showthread.php?tid=6764</a><br>
><br>
> The gist of the problem is that simple error handling within iPXE<br>
> scripts<br>
isn't working for me.  I've tried examples from the website, which make sense to me, but errors in the DHCP or sanboot steps of my script do not invoke the goto's or other error handling.  iPXE exits entirely back to the BIOS.<br>

><br>
> I can't tell why such simple procedures in the script are not being<br>
handled correctly.  Does anyone know how to troubleshoot this?<br>
><br>
<br>
_______________________________________________<br>
ipxe-devel mailing list<br>
<a href="mailto:ipxe-devel@lists.ipxe.org">ipxe-devel@lists.ipxe.org</a><br>
<a href="https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel" target="_blank">https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>There is never time enough to do it right, but there always seems to be enough time to do it again.<br><br>
</div>