The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 807 - File: showthread.php PHP 7.3.15 (Linux)
File Line Function
/showthread.php 807 errorHandler->error





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

Code:
#!ipxe

dhcp
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://10.10.10.10/pxelinux.cfg/macaddress... 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

UPDATE:

I enabled logging using this
#define LOG_LEVEL LOG_ALL
#define CONSOLE_PCBIOS CONSOLE_USAGE_ALL

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

#!ipxe
echo HELLO
chain http://servername/ipxescript
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Chainload ipxe script via PXE - bishop - 2019-06-11 02:20



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