iPXE discussion forum

Full Version: Recover from failed tftp boot
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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?
Reference URL's