-
Notifications
You must be signed in to change notification settings - Fork 77
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
allow compressed kernels with gz suffix #120
Conversation
handy for aarch64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix linting errors.
Fixed linting error (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a couple suggestions about error handling. Otherwise looks good.
// allow uncompressed kernels (can be handy for aarch64) | ||
kernelImage = path.Join(root, "/boot/vmlinux-"+kernelVersion) | ||
if !util.IsFile(kernelImage) { | ||
return "", errors.New("Could not locate kernel image") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is okay for now, but for the future error message should not contain caps, or newlines.
- Related to: warewulf#120
I just merged @WestleyK's lint timeout increase. Please merge with the main branch and pull that in which should get this past the lint CI. Thanks! |
Are ARM kernels always suffixed with |
|
Right after the copy of the kernel, let's also do an uncompress of the kernel. |
Co-authored-by: WestleyK <westleyk@nym.hush.com>
Co-authored-by: WestleyK <westleyk@nym.hush.com>
I am feeling a bit uneasy implementing uncompressing the kernel without a rename, as at this would mean I would add the kernel with
but the in reality we would deliver the uncompressed kernel
This solves the problem, as when the kernel is compressed and a $NAME is given and would have .gz suffix, it was the will of the user. If no $NAME is given and the kernel is compressed and has .gz suffix, the kernel would uncompressed and stored with NAME=$VERSION |
@mslacken - in my case, I like the idea of copying and rename to provide some sort of 'audatibility'. For example, I want to remind myself that the kernel I'm booting is the one I downloaded or fished out of an ISO - so I'll md5 the known good kernel and check what is in my directory that warewulf is using... so I manually gunzip the kernel to the name 'vmlinuz' and keep the known good long-named kernel beside it in the directory. I would appreciate a quick example of how the command could be used to import two same kernels for different platforms? Is it something like:
? (and while I'm at it, I would also like something like: |
@mslacken:
It is not trivial to get the kernel module version path from a kernel file directly. |
As far I see the kernel and its modules are stored at the moment as |
On an ARM SUSE system 'uname -r |
Will you check out #137, I think I got this all integated, including gzip decompression automatically for ARM kernels to support iPXE. |
I'm going to merge this because we have blockers on getting 4.2.0 out and this is holding other things up. If there are any bugs with this, let's fix those after this is merged. |
Apologies, I meant to merge the other version of the PR that includes the gunzip. Leaving this one closed for now. |
handy for aarch64