iPXE discussion forum
Problem with EFI PXE booting and the snponly.efi target - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: Problem with EFI PXE booting and the snponly.efi target (/showthread.php?tid=1087)



Problem with EFI PXE booting and the snponly.efi target - rand0m_ - 2011-12-19 16:29

Hi there, I am trying to PXE boot a Dell PowerEdge r410 machine in EFI mode and am not having much luck. I have compiled the snponly target like this:
Code:
# make bin-x86_64-efi/snponly.efi EMBED=demo.ipxe
  [LD] bin-x86_64-efi/snponly.efi.tmp
  [FINISH] bin-x86_64-efi/snponly.efi

# cat demo.ipxe
#!ipxe
dhcp
shell

And it successfully PXE boots, but it does not appear that the correct features to load linux or anything else (elf, bzimage, etc) are compiled in. Is there any way I can fix this? The ipxe.efi target may or may not have those featues, I can't tell because PXE booting it causes the machine to freeze.

Here is a screenshot of what happens when I PXE boot:

http://imgur.com/ySeCS


Switching the machine to BIOS and using the undionly.kpxe file works great --- apparently the proper features get compiled in automatically -- but unfortunately BIOS mode won't work for my application.

Ultimately I would like ipxe to load a Windows PE environment by chainloading bootmgfw.efi.. but it would be nice to test functionality using something sane like Linux first :-)

Thanks!!

-r


RE: Problem with EFI PXE booting and the snponly.efi target - noisome - 2012-09-20 20:00

I am going to bump this because I am also wondering about this.


RE: Problem with EFI PXE booting and the snponly.efi target - robinsmidsrod - 2012-09-21 13:56

iPXE is currently only capable of working like a network card driver in EFI mode. All the sophisticated features available in BIOS mode are not available. See http://ipxe.org/efi/vision for more details.


RE: Problem with EFI PXE booting and the snponly.efi target - noisome - 2012-09-21 14:33

(2012-09-21 13:56)robinsmidsrod Wrote:  iPXE is currently only capable of working like a network card driver in EFI mode. All the sophisticated features available in BIOS mode are not available. See http://ipxe.org/efi/vision for more details.

I have read it since its been spammed in every thread.

I'm guessing you're not referring to this?

Quote:iPXE will provide the same advanced features within the UEFI environment as are currently provided within the BIOS environment.

So where is it going to be said that the advance features will NEVER be provided since

And this is not the current effort?

Quote:The guiding principle is that iPXE should go beyond the constraints of the standard UEFI model, in order to replicate the success that it has achieved by going beyond the constraints of the standard PXE model.

If I'm missing what the vision is, then only currently the separation between legacy and UEFI versions is limited only because they haven't been implemented, not because its not envisioned to ever be implemented.


RE: Problem with EFI PXE booting and the snponly.efi target - robinsmidsrod - 2012-09-21 15:01

I never said it won't be implemented, I just said that it is currently not implemented. The reason I link to that document is because quite a lot of people expect the full iPXE feature set to be available in EFI mode, but at the moment only a limited feature set is available (primarily network card driver support).

If you have C programming experience you're more than welcome to try and contribute towards getting more features implemented in EFI mode. The development team of iPXE is very small, so contributions are most welcome.


RE: Problem with EFI PXE booting and the snponly.efi target - Fred_Lin - 2013-10-29 06:55

Dear Robinsmidsrod ,

We retry EFI PXE booting these days starting with "git clone git://git.ipxe.org/ipxe.git ; make bin-x86_64-efi/snponly.efi" . But it still encountered the following problem. It seems that EFI PXE booting is still not supported yet . Could you advise which C files to start if we would like to hack into the source codes ? Thanks a lot .

==
http://192.168.168.1/ipxe/vmlinuz... ok
Could not select: Exec format error (http://ipxe.org/2e008001)
Could not boot image: Exec format error (http://ipxe.org/2e008001)
==


RE: Problem with EFI PXE booting and the snponly.efi target - robinsmidsrod - 2013-11-03 23:03

Your error is because you do not have Linux kernel bzImage supported in the binary. The Features banner indicates the only binary you can load is EFI. You need to load elilo or grub EFI and let it handle loading the kernel, or compile in support for bzImage into your version of ipxe. Check the files in src/config/*.h for details.


RE: Problem with EFI PXE booting and the snponly.efi target - Fred_Lin - 2013-11-14 10:10

Dear Robinsmidsrod ,

Please guide me how to load grub.efi and then let it handle loading the kernel. Thanks a lot .

The following is my trial .

===

iPXE> chain http://192.168.202.1/grub.efi
http://192.168.202.1/grub.efi... ok
Could not boot: No such device (http://ipxe.org/2c048007)
iPXE> imgfetch http://192.168.202.1/grub.efi
http://192.168.202.1/grub.efi... ok
iPXE> boot
Could not boot: No such device (http://ipxe.org/2c048007)
iPXE> kernel http://192.168.202.1/grub.efi
http://192.168.202.1/grub.efi... ok
iPXE> boot
Could not boot: No such device (http://ipxe.org/2c048007)

===


RE: Problem with EFI PXE booting and the snponly.efi target - robinsmidsrod - 2013-11-20 18:14

Fred_Lin: That error message indicates that no network device is available. Does ifstat list any devices, and are they opened? Does route indicate valid network configuration?


RE: Problem with EFI PXE booting and the snponly.efi target - garrick - 2013-11-27 18:56

I have been running into the same problem as the others on this thread. Was there any resolution?

I'm using snponly.efi. It seems ipxe cannot even chain boot itself and everything else that I try to boot fails in the same manner (as reported by Fred_Lin). Yes, ifstat shows the interface is up and open. Yes, route shows a correct route. (I've tried to attached a screenshot, but the web forum always gives me an error when I do so.)

Also, it was recommended to build with bzimage support (my end goal is to boot a non-efistub Linux kernel). Is that even possible with snponly.efi? Every time I try to build, I get the following error:

# make bin-x86_64-efi/snponly.efi
[...SNIP...]
[AR] bin-x86_64-efi/blib.a
ar: creating bin-x86_64-efi/blib.a
[HOSTCC] util/elf2efi64
[LD] bin-x86_64-efi/snponly.efi.tmp
ld: bin-x86_64-efi/snponly.efi.tmp: hidden symbol `obj_bzimage' isn't defined
make: *** [bin-x86_64-efi/snponly.efi.tmp] Error 1


RE: Problem with EFI PXE booting and the snponly.efi target - robinsmidsrod - 2013-11-27 21:52

There is currently no way for iPXE (EFI version) to boot anything that is not a valid EFI binary. You'll need the Linux kernel compiled with the CONFIG_EFI_STUB flag (I think that's what it's called) enabled to turn it into an EFI binary.

Maybe someone else here can help out with this EFI stuff. I haven't touched it much, to be honest. I'm just repeating what I've heard others say, like a parrot. Smile


RE: Problem with EFI PXE booting and the snponly.efi target - garrick - 2013-11-27 22:23

(2013-11-27 21:52)robinsmidsrod Wrote:  There is currently no way for iPXE (EFI version) to boot anything that is not a valid EFI binary. You'll need the Linux kernel compiled with the CONFIG_EFI_STUB flag (I think that's what it's called) enabled to turn it into an EFI binary.

Maybe someone else here can help out with this EFI stuff. I haven't touched it much, to be honest. I'm just repeating what I've heard others say, like a parrot. Smile

I kind of guessed that the advice to enable BZIMAGE support for EFI was a red herring; I'm not sure why there are so many posts online advising that. However, my point is that iPXE is refusing to even boot any EFI images, as well. Right now, all I'm trying to do is something extremely basic:

iPXE 1.0.0+ -- Open Source Network Boot Firmware -- http://ipxe.org
Features: HTTP DNS TFTP EFI Menu
iPXE> dhcp
Configuring (net0 00:50:56:ba:13:10)...... ok
iPXE> ifstat
net0: 00:50:56:ba:13:10 using <NULL> on EFI SNP (open)
[Link:up, TX:3 TXE:0 RX:11 RXE:5]
[RXE: 5 x "Operation not supported (http://ipxe.org/3c086003)"]
iPXE> route
net0: 10.5.15.50/255.255.255.0 gw 10.5.15.1
iPXE> chain http://10.5.15.100/snponly.efi
http://10.5.15.100/snponly... ok
Could not boot: No such device (http://ipxe.org/2c048007)
iPXE> ifstat
net0: 00:50:56:ba:13:10 using <NULL> on EFI SNP (open)
[Link:up, TX:86 TXE:0 RX:137 RXE:31]
[RXE: 30 x "Operation not supported (http://ipxe.org/3c086003)"]
[RXE: 1 x "Error 0x06376006 (http://ipxe.org/06376006)"]
iPXE> route
net0: 10.5.15.50/255.255.255.0 gw 10.5.15.1

ifstat and route show the interface is configured and opened, but it still refuses to boot the file that it downloaded via HTTP. This is the case whether I try to chain boot snpboot.efi, ipxe.efi, or grub.efi. Googling around I can't find any threads of anyone successfully getting snponly.efi to successfully boot anything. Everyone seems to get the same "No such device" error. Is this supposed to work, or am I attempting to do something that isn't supported yet?

My eventual goal here is to use iPXE to chain load grub.efi, but it seems to not be able to boot any EFI application no matter what I throw at it.


RE: Problem with EFI PXE booting and the snponly.efi target - robinsmidsrod - 2013-11-28 09:40

I believe there are some patches on the mailing-list that try to address these issues in snponly.efi. They have not been applied to mainline. Not sure why. I believe they are also applied on one or more branches in the xcat ipxe repo on git.ipxe.org.

Also, loading ipxe.efi is broken, currently, and you need to load ipxe either as an .efirom or .efidrv. iPXE as an EFI application in general is currently broken. It is only snponly.efi (with the unofficial patches) that is known to be working at all.

Just one question that puzzles me with the above listing. Why are you trying to chain snponly.efi when you're already running iPXE?


RE: Problem with EFI PXE booting and the snponly.efi target - garrick - 2013-12-02 22:14

(2013-11-28 09:40)robinsmidsrod Wrote:  I believe there are some patches on the mailing-list that try to address these issues in snponly.efi. They have not been applied to mainline. Not sure why. I believe they are also applied on one or more branches in the xcat ipxe repo on git.ipxe.org.

Also, loading ipxe.efi is broken, currently, and you need to load ipxe either as an .efirom or .efidrv. iPXE as an EFI application in general is currently broken. It is only snponly.efi (with the unofficial patches) that is known to be working at all.

Just one question that puzzles me with the above listing. Why are you trying to chain snponly.efi when you're already running iPXE?

It took me quite some time to find the patches to which you're referring, but I think they are the ones in the following post:

http://lists.ipxe.org/pipermail/ipxe-devel/2013-August/002713.html

I applied those and snponly.efi seems to now be working correctly; I can now chain load other EFI programs. It sure would be nice if those patches could get applied upstream!

Chain loading snponly.efi (from snponly.efi) was just a simple test case that I was using while I was trying to figure out why iPXE could not chain load any other EFI programs. It's not my end goal. My end goal is to chain load grub.efi (from snponly.efi) which is now working correctly with the two patches applied to iPXE.