-
Notifications
You must be signed in to change notification settings - Fork 396
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
pkg/boot/linux.go: Decompress kernel before doing kexec #2755
Conversation
83cfd56
to
6a5d2d0
Compare
A kernel should decompress itself on kexec, shouldn't it? What kind of compression is on this thing? (Is that a feature not available on aarch64?) u-root's kexec is in use in memory-constrained environments sometimes, so we'd likely prefer if this was either behind a flag or could be avoided altogether due to its use of memory. |
On aarch64 kexec does not decompress the kernel (that may not be true for the new zimage in Linux though). As far as I know that is only happening on x86 (bzImage). That is actually what the kexec u-root command already does (so if I do "kexec ..." in u-root it works but not with the localboot cmd). No Idea why there are different code paths for kexec and kexec localboot cmd in the first place, but I guess that is something for another patch. Line 284 in 585ee83
I used a aarch64 fedora server image for testing. |
Oh this is for jsonboot. I didn't even notice that. It probably ultimately shouldn't be a different codepath, but jsonboot doesn't yet. |
Ultimately, IMO any remaining |
6a5d2d0
to
dd691e9
Compare
Have you looked into the failing tests? |
|
It is possible/likely that the kernel is compressed. In order for kexec to actually find the magic value for aarch64 Linux kernels it needs to be decompressed before refering it to the kexec syscall. Test: aarch64 Fedora 36 Server image can now be started via localboot Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
dd691e9
to
25dc9d7
Compare
Codecov ReportPatch coverage is
📢 Thoughts on this report? Let us know!. |
It is possible/likely that the kernel is compressed. In order for kexec to actually find the magic value for aarch64 Linux kernels it needs to be decompressed before refering it to the kexec syscall.
Test: aarch64 Fedora 36 Server image can now be started via localboot.