Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to detect ARM architecture from iPXE script?
2018-10-31, 21:20
Post: #16
RE: How to detect ARM architecture from iPXE script?
(2018-10-31 20:35)korekhov Wrote:  Another question - why iPXE is complaining about kernel not being EFI while stock grubaa64.efi (from Ubuntu 18.04) has no problem with it?
Because grub has support for booting it as non EFI kernel - which might result in that EFI features are not available inside of your OS.

(2018-10-31 20:35)korekhov Wrote:  Could not boot: Exec format error (http://ipxe.org/2e008081)
iPXE>

According to http://ipxe.org/err/2e0080, iPXE is most probably tripping over this:

Quote:If you are trying to load a Linux kernel, make sure it is build with CONFIG_EFI_STUB and that it is a working EFI binary.
Yep, And thanks for properly including the error message with URL, also thanks for reading that page properly before asking.

(2018-10-31 20:35)korekhov Wrote:  But again, the same vmlinuz works with grub2 w/o any issues. Is iPXE missing some features that grub2 posses that allows it not to care if the kernel is EFI or not?
Again this is because grub runs it as an kernel, instead of an EFI.
This is not a "missing" feature in iPXE, but rather an security consideration, and so far a selected choice to not support execution of anything in EFI mode, other then via the firmware load_image function.
You can see the source code for this in the error url

(2018-10-31 20:35)korekhov Wrote:  If so, any pointers on how exactly to rebuild vmlinuz with CONFIG_EFI_STUB? Strangely enough, I'm having hard time figuring this mostly because grub2 just does not seem to care so nobody needs to rebuild their kernel, I guess.
Where is the kernel from? Ask the source to build it properly, or maybe there already is a kernel that is more suitable to use already.
If not then modify your kernel config file and set CONFIG_EFI_STUB=Y is the easiest way, but searching for the config option gives several pages with great information, one example is https://wiki.archlinux.org/index.php/EFISTUB

One possible reason for this issue is also that you have an EFI capable kernel, but the 64/32 bit does not match between kernel and firmware mode, they must match the firmware. (CPU support is not relevant here)

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


Messages In This Thread
RE: How to detect ARM architecture from iPXE script? - NiKiZe - 2018-10-31 21:20



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