https://blue-build.org/ logo
custom kernel
# questions
n
How would I go about adding a custom kernel I tried adding the copr then using the install option but if I rebase to that built image it says multiple kernels found in module
a
message has been deleted
m
try this
Copy code
modules:
  - type: rpm-ostree
    repos:
      # - https://copr.fedorainfracloud.org/coprs/bieszczaders/kernel-cachyos-addons/repo/fedora-%OS_VERSION%/bieszczaders-kernel-cachyos-addons-fedora-%OS_VERSION%.repo - if you need cachyos-ksm-settings
      - https://copr.fedorainfracloud.org/coprs/bieszczaders/kernel-cachyos/repo/fedora-%OS_VERSION%/bieszczaders-kernel-cachyos-fedora-%OS_VERSION%.repo #cachy kernel
    install:
    # - cachyos-ksm-settings - if you need cachyos-ksm-settings
    - libcap-ng
    - libcap-ng-devel
    - procps-ng
    - procps-ng-devel
  - type: script
    snippets:
    - "echo 'Enable SElinux policy' && setsebool -P domain_kernel_load_modules on"
    - "echo 'CachyOS kernel override' && rpm-ostree override remove kernel kernel-core kernel-modules kernel-modules-core kernel-modules-extra --install kernel-cachyos"
replace kernel-cachyos with kernel-cachyos-rt if thats what you need
you dont need to use extra keys if you use copr repos
n
okay let me try
getting build issues sorry my clipboard seems to be crashing discord
m
this is the exact error from your build log
Copy code
[08:18:37 g.i/e/hyprbazzite:latest] => 2.048 error: Could not depsolve transaction; 2 problems detected:
[08:18:37 g.i/e/hyprbazzite:latest] => 2.048  Problem 1: package kmod-zenergy-0.0.git.36.32f6eb3d-1.fc41.x86_64 from @System requires kernel-uname-r = 6.13.7-108.bazzite.fc41.x86_64, but none of the providers can be installed
[08:18:37 g.i/e/hyprbazzite:latest] => 2.048   - conflicting requests
[08:18:37 g.i/e/hyprbazzite:latest] => 2.048  Problem 2: package kernel-devel-matched-6.13.7-108.bazzite.fc41.x86_64 from @System requires kernel-core = 6.13.7-108.bazzite.fc41, but none of the providers can be installed
[08:18:37 g.i/e/hyprbazzite:latest] => 2.048   - package kernel-core-6.13.7-108.bazzite.fc41.x86_64 from @System requires kernel-modules-core-uname-r = 6.13.7-108.bazzite.fc41.x86_64, but none of the providers can be installed
[08:18:37 g.i/e/hyprbazzite:latest] => 2.048   - conflicting requests
version problem
n
oh mustve missed sorry I have dyslexia so sometimes errors are hard to read ngl
m
as i said, cachy is already on 6.14.*, bazzite is still behind that
n
yeah I got cachy on my current install and kmod issues still as well
anyway to just disable the kmods?
m
its out of my knowledge level atm, but i can suggest you try using bluebuild on your local machine and just run the this, figure out what package conflicts are around, and eliminate the conflicting packages one by one
eithr that or use the (experimental?) dnf module with allow-erasing: true
n
eliminate how exactly is adding them to rpm-ostree override remove not the way? because if so I have them all added to removedbasepackages
dnf5 module
?
m
yeah basically you identify packages that are causing problems, in the error above for example its kmod-zenergy and kernel-devel-matched. remove them using rpm-ostree module, run build, if it errors see what package is erroring, etc. again this is probablly not the best approach
theres also the experimental* (i say so bc its not on the main module repo yet & is undergoing dev still afaik) dnf module https://github.com/blue-build/modules/tree/dnf-module/modules/dnf
you can try sth like this https://github.com/askpng/solarpowered/blob/cachy/recipes/kernels/cachy.yml and probably use allow-erasing:
Copy code
install:
      allow-erasing: true
      install-weak-deps: false
      packages:
        # - cachyos-ksm-settings
        # - cachyos-settings
but im not sure if it will work (well or at all, bc again, a/kmods) on your end, since bazzite has its own optimization (also, YMMV)
n
let me try that dnf module
still having issues trying a different couple things based off the two links provided
m
hmm honestly i cant advise much from here, but bazzite kernel is probably not going to be easily replaceable in bazzite
i see youre already asking at the ublue discord so i think they might be able to help you further
n
yeah thinking they will as well if not maybe I can try aurora or something else
m
yea that should be easier or like wayblue even https://github.com/wayblueorg/wayblue
you could try using this rpm-ostree module and specify to install kernel-cachyos-6.13.8-cachyos2.fc41.x86_64, but if it works, you'll need to manually adjust the kernel version as bazzite updates their kernels
n
yeah looking more towards latest currently I can't fakeroot to remove because its trying to remove it and failing
I am closing this sinc eyou sent a guid and I got it working without kmds unfortuantely
a
I have tried everything and I always get this build error :
Copy code
[05:16:06 r.g.c/o/i/origami-test:latest] => 34.08 dracut[F]: /usr/lib/modules/6.17.9-cachyos1.fc43.x86_64/modules.dep is missing. Did you run depmod?
m
are you using the version i shared recently?
a
I also used this script (https://github.com/askpng/solarpowered/blob/main/files/scripts/kernels/kernel-cachy.sh) and get the same error . I noticed in your build you get the same error but your build continues.
m
I see your latest build has it working
a
I put it into its own .sh instead of using the script module. I should of did that from the get go....
m
well, yeah. that's why i put it in the script file
it has something to do with the exit handling, because the post-install script gives a non 0 exit code
a
Interesting, I wonder if it's worth a bug report in bluebuild. I deally I would want to just use the dnf module
oh it seems because I have efi, I need to find how to make keys for the new kernel?
m
it's because of secure boot. i personally don't use it so i can't really assist with that
a
Yea I will keep it disabled, until I take the time to make my own key
but thanks @mel for oyur cachy kernel script ❤️
another thing, I don't have Nvidia device to test with. What would happen if I installed CachyOS kernel on top of Bluebuild Nvidia Image? Would I still have Nvidia drivers or would the kernel overwrite them?
x
I think you'd still have nvidia drivers. The kernel is pretty separate from nvidia's gpu drivers I imagine. Lumaeris has a kernel replace on her image, she's also adding nvidia drivers to Zirconium. So all that is worth a look maybe for doing similar.
a
thanks!
I instead opted to install the included nvidia-open
Copy code
dnf -y install --setopt=install_weak_deps=False \
    kernel-cachyos-lto \
    kernel-cachyos-lto-nvidia-open
oddly the
[05:16:06 r.g.c/o/i/origami-test:latest] => 34.08 dracut[F]: /usr/lib/modules/6.17.9-cachyos1.fc43.x86_64/modules.dep is missing. Did you run depmod?
error gets resolved when adding the
kernel-cachyos-lto-nvidia-open
package to the build 😄