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

iPXE booting on aarch64 does not work with compressed kernel #1019

Closed
Prashanth684 opened this issue Nov 10, 2021 · 12 comments
Closed

iPXE booting on aarch64 does not work with compressed kernel #1019

Prashanth684 opened this issue Nov 10, 2021 · 12 comments
Labels

Comments

@Prashanth684
Copy link

Prashanth684 commented Nov 10, 2021

The aarch64 kernel is compressed and does not provide a default decompressor. iPXE booting using the compressed aarch64 kernel fails because iPXE does not support compressed kernels. This is the error we get when trying it:

image

iPXE does have a fix upstream for this: ipxe/ipxe@866fa1ce7 but it is not in any release yet.
Opening this issue to potentially discuss whether we need an uncompressed kernel artifact for aarch64.

@bgilbert
Copy link
Contributor

bgilbert commented Nov 10, 2021

aarch64 compressed kernels are gzipped blobs; they're not prefixed with decompression code the way x86_64 kernels are. aarch64 considers decompression to be the bootloader's responsibility.

I think the above commit adds the relevant decompression support to iPXE, but we'd need someone to test it. Also, it seems the default build configs do not enable compression (the compile flag is IMAGE_GZIP). If enabling that flag solves the problem, we'd probably want to talk to upstream about enabling it by default (at least on aarch64).

If we don't manage to get support enabled by default in iPXE, and we don't want to ship an uncompressed kernel for aarch64, we should at least update our iPXE docs to recommend decompressing the kernel image.

@pamoedom
Copy link

Thanks @Prashanth684 for raising the ticket and @bgilbert for the follow up, much appreciated!

FWIW, here you have also the whole boot logs from the latest test when using uncompressed kernel but default compressed initramfs, the boot successfuly worked on this manner.

Regards.

@aleskandro
Copy link

Hello, I can confirm that enabling IMAGE_GZIP when building iPXE allows to properly boot a compressed kernel on aarch64

@mcb30
Copy link

mcb30 commented Feb 10, 2022

Upstream iPXE fix merged as ipxe/ipxe#586

@dustymabe
Copy link
Member

Thank you @aleskandro @mcb30!

We'll wait for a release to happen so we can refer to it here and then close out the issue.

@aleskandro
Copy link

Hello @dustymabe a release is already landed at https://boot.ipxe.org/ that includes the required flag for aarch64. Should we close now?

@dustymabe
Copy link
Member

Hmm. I was hoping to get a new release here: https://github.com/ipxe/ipxe/tags

i.e. if the sources are picked up and rebuilt (i.e. in a distribution) they'd need a new release from https://github.com/ipxe/ipxe right?

@dustymabe
Copy link
Member

@mcb30 - are there any plans to do a new upstream release/tag of ipxe?

@yselkowitz
Copy link

Fedora usually packages a git snapshot of ipxe which matches the version bundled in qemu, but there is an open request to rebase to a current git snapshot: https://bugzilla.redhat.com/show_bug.cgi?id=2063876

@aleskandro
Copy link

The bz linked above is now closed and the build linked in the errata includes the fix. Should we close this?

@dustymabe
Copy link
Member

Thanks @aleskandro - I'll close this out.

It is interesting to note, however that in kernel 6.2 the format of the AARCH64 kernel changed. I wonder if iPXE still works with it or not.

@mcb30
Copy link

mcb30 commented Mar 31, 2023

It is interesting to note, however that in kernel 6.2 the format of the AARCH64 kernel changed. I wonder if iPXE still works with it or not.

It does - the AARCH64 kernel is now a standard (non-compressed) UEFI executable and so will work in iPXE even without the IMAGE_GZIP feature enabled.

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

No branches or pull requests

7 participants