Post Reply 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Chainload ipxe script via PXE
2019-06-11, 02:20 (This post was last modified: 2019-06-11 02:46 by bishop.)
Post: #1
Chainload ipxe script via PXE
Hi, not even sure how to correctly title this thread.

Here is my working scenario.

I have an HTTP share that hosts an iPXE script, the same share also hosts the install files for esxi.

In the pxelinux.cfg foolder of my PXE server I have my config file, I use undionly.kpxe as my bootfile. This boot file has a small script to chain the pxe config file, and then in the PXE config I chainload (via HTTP) a ipxe script. This works 100%

Now some of my site have a firewall the will block HTTP traffic to overcome this I want to failback to tftp. I figured I could do something like the below in my undionly.kpxe embedded script


chain http://${next-server}/pxelinux.cfg/macaddress || chain tftp://${next-server}/pxelinux.cfg/macaddress

When I boot my server it gats all the way to the tftp file and just gets stuck no errors it simply outputs -> tftp:// ok

and hangs.

If I change the protocol from tftp tp http it works.

I know tftp works on my network as other OS types are working fine. There is no firewall as this is a lab environment. I have http, https and tftp enabled in my general.h file. I have read through mang of the tftp threads on this forum and nothing seems to apply.

Not sure how to troubleshoot further


I enabled logging using this

When I boot, I can now see that it downloads the pxe config file (mac address file ) and the when it execute it stops. My config file just contains

echo HELLO
chain http://servername/ipxescript
Find all posts by this user
Quote this message in a reply
2019-06-11, 05:09
Post: #2
RE: Chainload ipxe script via PXE
pxelinux.cfg are usually used with pxelinux, which is not iPXE

If you general.h was missing support for any protocol you would see different errors, normally you keep config/general.h unchanged, and only add what you really need to change into config/local/general.h

When troubleshooting - always use tcpdump, wireshark or other tool to see the packets and what is going on.
I would change to just do an imgfetch, followed by imgstat,
and than chain macaddress

if the filename is the same for both than the last chain will load from local "cache"
but imgstat will show filesize etc.

I also want to stress that iPXE does not use config files, but rather scripts, which helps make it easier to understand what is going on.
debugging is enabled with the DEBUG= flags during compile.

to diagnose scripts, build with DEBUG=script

Use GitHub Discussions
VRAM bin
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 

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