Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect and log when we're EFI-booting a non-EFI-capable binary #56

Open
danderson opened this issue Jan 2, 2018 · 1 comment
Open
Assignees

Comments

@danderson
Copy link
Owner

EFI iPXE can only boot EFI binaries. This generally works because linux has CONFIG_EFI_STUB, a cool hack that makes bzImage kernels multi-format, executable as either bzImage or EFI applications.

If you try booting a kernel that doesn't have CONFIG_EFI_STUB, at best iPXE will fail because of a format error. At worst, it will chainload anyway and hang the machine.

It's possible to detect whether an image is a proper EFI application by inspecting the first few dozen bytes of the kernel. Pixiecore should do an on-the-fly inspection of the kernel as it's serving the image, and log a loud warning if it's serving a non-EFI image to an EFI client.

@danderson danderson self-assigned this Jan 2, 2018
@danderson
Copy link
Owner Author

Some reading about CONFIG_EFI_STUB: https://lwn.net/Articles/632528/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant