iPXE discussion forum
Recover from failed tftp boot - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: Recover from failed tftp boot (/showthread.php?tid=3529)



Recover from failed tftp boot - dpost - 2012-06-03 01:21

HI All,

Love this project and so thankful for its existence. I am using a snapshot taken 12-APR-2012 and I have run into a boot failure situation and I was wondering if there was a way to recover from it...

I am currently booting ipxe.lkrn and then in a script doing the following:

#!ipxe
:retry_dhcp
dhcp net1 && isset ${filename} || goto retry_dhcp
echo "Booting from ${dhcp-server}/${filename} via net1"
chain tftp://${dhcp-server}/${filename}
echo "Boot failed. Retrying..."
goto retry_dhcp

The issue is that I had the dhcp server misconfigured and it was giving out addresses on the wrong network. Doh! Anyway what would happen is the dhcp would work but the tftp would fail. I expected the chain to fail and the loop would retry the operation. This would also be the case do to a tftp transfer failure.

What happens is the boot fails with a connection timed out message (as expected) but then I get a "FATAL: INT18: BOOT FAILURE" and I have to reset the system to retry.

Is there a way to do what I want? I need to recover from a failed tftp transfer without having to physically power cycle the system.. Any help would be greatly appreciated..

Thanks,

-Don


RE: Recover from failed tftp boot - robinsmidsrod - 2012-09-28 10:39

Add a || after the chain command to ignore any error from it. Your chain line should be something like this:

Code:
chain tftp://${dhcp-server}/${filename} ||

By the way: Is there a reason you're using tftp://${dhcp-server}/${filename} instead of just chain ${filename}? Usually you let the DHCP server set the next-server variable and that will be used by the client as the default TFTP server?