Installing akmod with the correct kernel version

I am trying to install akmod using the akmod module but the version is always mismatching in bazzite. The problem is the bazzite-41 akmod are tagged to latest kernel while stable bazzite are usually pretty behind, akmod have kernel tags but im not sure how to do it correctly
Solution:
i got it working, i use the copy modules and containerfile to manually specify the tag ```yml modules: - type: copy from: ghcr.io/ublue-os/akmods-extra:KERNEL_VERSION...
GitHub
feat: use kernel version as tags in akmod · Issue #354 · blue-build...
If using bazzite as a base, installing akmod using the current module will almost likely drift because bazzite move pretty fast. The kernel version in bazzite-41 tag is usually newer than the stabl...
Jump to solution
2 Replies
asen23
asen23OP2mo ago
from what i understand the process should go something like this 1. Somehow get the kernel version 2. Copy rpm from akmods:{KERNEL_VERSION} 3. Install rpm but im not sure how to do the step 1
Solution
asen23
asen232mo ago
i got it working, i use the copy modules and containerfile to manually specify the tag
modules:
- type: copy
from: ghcr.io/ublue-os/akmods-extra:KERNEL_VERSION
src: /rpms/
dest: /tmp/rpms

- type: containerfile
snippets:
- RUN sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo
- RUN find /tmp/rpms
- RUN rpm-ostree install /tmp/rpms/kmods/*nct6687*.rpm
modules:
- type: copy
from: ghcr.io/ublue-os/akmods-extra:KERNEL_VERSION
src: /rpms/
dest: /tmp/rpms

- type: containerfile
snippets:
- RUN sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo
- RUN find /tmp/rpms
- RUN rpm-ostree install /tmp/rpms/kmods/*nct6687*.rpm
the kernel version is obtained using skopeo in github action and substituted using sed before bluebuild action with skip_checkout: true
- name: Inspect image and extract label
run: |
LABEL_VALUE=bazzite-$(skopeo inspect docker://ghcr.io/ublue-os/bazzite:stable | jq -r '"\(.Labels["org.opencontainers.image.version"] | split(".")[0])-\(.Labels["ostree.linux"])"')
echo "kernel_version=$LABEL_VALUE" >> $GITHUB_ENV
- name: Display extracted label
run: |
echo "Extracted ostree.linux label: $kernel_version"
- name: Modify file with extracted label
run: |
sed -i "s/KERNEL_VERSION/$kernel_version/g" ./recipes/akmods-modules.yml
- name: Inspect image and extract label
run: |
LABEL_VALUE=bazzite-$(skopeo inspect docker://ghcr.io/ublue-os/bazzite:stable | jq -r '"\(.Labels["org.opencontainers.image.version"] | split(".")[0])-\(.Labels["ostree.linux"])"')
echo "kernel_version=$LABEL_VALUE" >> $GITHUB_ENV
- name: Display extracted label
run: |
echo "Extracted ostree.linux label: $kernel_version"
- name: Modify file with extracted label
run: |
sed -i "s/KERNEL_VERSION/$kernel_version/g" ./recipes/akmods-modules.yml
it works but pretty jank imo, i hope it could be implemented in bluebuild so i opened https://github.com/blue-build/cli/issues/354
GitHub
feat: use kernel version as tags in akmod · Issue #354 · blue-build...
If using bazzite as a base, installing akmod using the current module will almost likely drift because bazzite move pretty fast. The kernel version in bazzite-41 tag is usually newer than the stabl...

Did you find this page helpful?