Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

kernel headers in base images #853

Open
lukemarsden opened this issue Jul 9, 2021 · 3 comments
Open

kernel headers in base images #853

lukemarsden opened this issue Jul 9, 2021 · 3 comments
Labels
area/kernels help wanted Extra attention is needed kind/enhancement Categorizes issue or PR as related to improving an existing feature.

Comments

@lukemarsden
Copy link

what's the easiest way to get kernel headers into base images?

out of the box, with ignite this fails like this:

root@15f66fdddbe70ea4:~# apt-get -y install linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux-headers-5.4.43
E: Couldn't find any package by glob 'linux-headers-5.4.43'
E: Couldn't find any package by regex 'linux-headers-5.4.43'

presumably because you're compiling a custom kernel? is there an option to use the stock ubuntu kernel?

@lukemarsden
Copy link
Author

(use case: running sysdig in ignite, see https://docs.sysdig.com/en/steps-for-kubernetes--vanilla-.html)

@stealthybox
Copy link
Contributor

Our builds are fairly plain, so existing kernel-headers for the same major version would likely be operable, but it's not ideal to pretend to rely on that.
A symlink can be used to make the upstream header files match your ignite kernel's version name?

Are you able to get unblocked even though that's not an ideal solution?

One thing we could do is publish debs and rpms alongside the kernel builds.
We don't currently have apt/rpm repos to distribute these packages.
We could start using one or host them as a GitHub download.

Potentially, if the kernel OCI image could bundle headers optionally, we could have ignite learn to unpack those into some location in the final rootfs. That would be a decent workaround.

@stealthybox
Copy link
Contributor

This is how to build the raw header files:
https://unix.stackexchange.com/a/424982

This is how to produce the apt/deb pkgs:
https://stackoverflow.com/a/19497460/5957101

We would modify our ignite/images/kernel/ build to produce these artifacts.

@stealthybox stealthybox added area/kernels help wanted Extra attention is needed kind/enhancement Categorizes issue or PR as related to improving an existing feature. labels Jul 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/kernels help wanted Extra attention is needed kind/enhancement Categorizes issue or PR as related to improving an existing feature.
Projects
None yet
Development

No branches or pull requests

2 participants