iPXE discussion forum

Full Version: ipxe chain to wdsmgfw.efi
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi I've a working DHCP/ipxe setup which uses a following ipxe script.

echo info chain http://${next-server}:PORT#/ipxe/${netX/mac:hex}
chain http://${next-server}:PORT#/ipxe/${netX/mac:hex}

When ipxe vist above chain I like to do either linux or windows.
Linux works fine as Im loading the image using kernel & initrd.

But for windows is not working as Im asking it to fetch the image via another chain:
set netX/next-server windows-tftp-IP
chain tftp://windows-tftp-IP/SMSboot\\x64\\wdsmgfw.efi

Can anyone plz help?
Do you get any kind of error or lead to as what is wrong?

Have you seen this very similar thread?: http://forum.ipxe.org/showthread.php?tid=10403

http://${next-server}:PORT#/ipxe/MAC-ADDRESS... ok
Could not boot: Exec format error (http://ipxe.org/2e008081)

Just read the thread you sent. I don't think they are doing double chain loading
(2017-10-17 19:35)danishm Wrote: [ -> ]http://${next-server}:PORT#/ipxe/MAC-ADDRESS... ok
Could not boot: Exec format error (http://ipxe.org/2e008081)

Is that supposed to return a script or what does it give back?

If it is a script have you followed the last main point on the page your error links to?
http://ipxe.org/2e008081 Wrote:
  • If you are trying to boot an iPXE script, check that the ”#!ipxe” signature is present at the beginning of the script.
    • If you have edited the script on a Windows machine, check that the script was saved using ASCII (or UTF-8) rather than UTF-16 encoding. (Some editors add what is known as BOM at the beginning which will cause issues)
It return a script which looks like following:
# below are stored for reference only. not actually used
echo +--------- ipxe ---------------------------------------------
echo | mac.................: ${mac}
echo | uuid................: ${uuid}
echo | serial..............: ${serial}
echo | ip..................: ${ip}
echo | manufacturer........: ${manufacturer}
echo | product.............: ${product}
echo +------------------------------------------------------------
set netX/next-server IP-addr
chain tftp://IP-addr/SMSboot\\x64\\wdsmgfw.efi

File normally gets generated as part of the an automated python code (which runs on linux-box) but to rule that out I manually created a file using vi (default for vi is ASCII text, and I made sure its in ASCII).

I guess the question Im looking for is it allow to do multiple chain loading while in UEFI mode ?

First Chain: chain http://IP-addr:port#/ipxe/${net0/mac:hex}
(First chain then sends the request to a another ipxe script and request to do a second chain)
Second Chain: chain tftp://IP-addr/SMSboot\\x64\\wdsmgfw.efi
Are you sure you are in EFI mode? could you post a screen-shot of what you actually see with that error, preferably together with the iPXE "Features" header.

chain works just fine with multiple steps. but eighter your tftp server returns garbage when using that chain, or you are not running in the mode that you think you are, and thus get the "Exec format error (http://ipxe.org/2e008081)" message.

Following the suggestions on the error page, without making any assumptions is the best way to solve this.
You might also want to use wireshark or similar on the machine with the tftp server, to actually see what the server returns, and then verify that it is correct.
For example by using imgfetch tftp://IP-addr/SMSboot\\x64\\wdsmgfw.efi followed by imgstat you will get the filesize of the downloaded file, which you then can compare to the file on the server.
This is what works for me:


set        wdsserver:ipv4
set        netX/next-server    ${wds-server}

chain tftp://${wds-server}/Boot\x64\wdsmgfw.efi
d4rk3... Thanks this indeed worked.. cheers
(2018-01-26 00:33)danishm Wrote: [ -> ]d4rk3... Thanks this indeed worked.. cheers

Glad it worked, happy to help Big Grin
Reference URL's