Linux distribution kernels packaged as container images for testing software against many kernels in CI.
Upstream kernels are well covered by cilium/ci-kernels. This repository adds what upstream builds cannot give: the kernels that distributions actually ship. They differ from upstream a lot. For example, the RHEL 8 kernel is called 4.18 but carries eBPF features from much newer kernels.
The images are used by the kernel tests of coroot-node-agent.
Images are published as ghcr.io/coroot/ci-kernels:<tag> for linux/amd64.
| Tag | Distribution | Kernel |
|---|---|---|
3.10-el7 |
RHEL 7, CentOS 7 | 3.10.0-1160.119.1.el7 |
4.18-el8 |
RHEL 8, AlmaLinux 8, Rocky Linux 8 | 4.18.0-553.186.1.el8_10 |
5.14-el9 |
RHEL 9, AlmaLinux 9, Rocky Linux 9 | 5.14.0-687.66.2.el9_8 |
5.4-ubuntu20.04 |
Ubuntu 20.04 | 5.4.0-218-generic |
5.15-ubuntu22.04 |
Ubuntu 22.04 | 5.15.0-204-generic |
6.8-ubuntu24.04 |
Ubuntu 24.04 | 6.8.0-149-generic |
An image is not runnable. It only carries files:
/boot/vmlinuzis the kernel image./boot/releaseis the kernel release, as printed byuname -r./lib/modules/<release>holds the modules and thedepmodindexes.
The layout matches cilium/ci-kernels, so a tool that boots one can boot the other.
Two things are changed compared to the distribution packages:
- Modules are stored uncompressed (
.ko), so that any module loader works, including the one in BusyBox. - Hardware drivers and sound modules are removed. Networking, filesystems, crypto, virtio and other paravirtualized drivers are kept.
Copy the files out of the image and boot them with QEMU:
c=$(docker create ghcr.io/coroot/ci-kernels:4.18-el8 /none)
docker cp "$c:/boot/vmlinuz" vmlinuz
docker cp "$c:/lib/modules" modules
docker rm "$c"
qemu-system-x86_64 -enable-kvm -cpu host -m 2G -nographic -no-reboot \
-kernel vmlinuz -initrd initramfs.gz -append "console=ttyS0 panic=-1"The initramfs is yours to build. Put the modules directory into it as /lib/modules and load what you need with modprobe.
boot.sh is a complete example with a BusyBox initramfs.
Kernels are listed in kernels.txt, one per line: a tag followed by the URLs of the packages that contain the kernel image and its modules.
Both .rpm and .deb packages are supported.
To add a kernel or to move one to a newer release, edit that file, update the table above and open a pull request.
./build.sh 4.18-el8 # builds ghcr.io/coroot/ci-kernels:4.18-el8 locally
./boot.sh 4.18-el8 # boots it in QEMU and loads a moduleDocker is the only requirement. QEMU runs in a container and uses KVM when /dev/kvm exists.
The Build workflow builds and boots every kernel on pull requests, and publishes the images on pushes to main.
The scripts in this repository are licensed under the Apache License 2.0. The images contain unmodified binaries from the distributions' kernel packages, which are licensed under GPL-2.0. The corresponding sources are published by the distributions. The exact package versions are listed in kernels.txt.