custom kernel

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
Solution:
you can try sth like this https://github.com/askpng/solarpowered/blob/cachy/recipes/kernels/cachy.yml and probably use allow-erasing: ``` install: allow-erasing: true install-weak-deps: false...
GitHub
solarpowered/recipes/kernels/cachy.yml at cachy · askpng/solarpowered
Fedora Silverblue images for my personal use. Learning project, frequent changes. - askpng/solarpowered
Jump to solution
37 Replies
eyeswithoutaface
eyeswithoutafaceOP9mo ago
GitHub
hyprbazzite/recipes/recipe.yml at main · EyesWithoutFace/hyprbazzite
Contribute to EyesWithoutFace/hyprbazzite development by creating an account on GitHub.
amel
amel9mo ago
try this
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"
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
eyeswithoutaface
eyeswithoutafaceOP9mo ago
okay let me try
eyeswithoutaface
eyeswithoutafaceOP9mo ago
Hastebin
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
eyeswithoutaface
eyeswithoutafaceOP9mo ago
getting build issues sorry my clipboard seems to be crashing discord
eyeswithoutaface
eyeswithoutafaceOP9mo ago
Hastebin
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
amel
amel9mo ago
this is the exact error from your build log
[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
[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
eyeswithoutaface
eyeswithoutafaceOP9mo ago
oh mustve missed sorry I have dyslexia so sometimes errors are hard to read ngl
amel
amel9mo ago
as i said, cachy is already on 6.14.*, bazzite is still behind that
eyeswithoutaface
eyeswithoutafaceOP9mo ago
yeah I got cachy on my current install and kmod issues still as well anyway to just disable the kmods?
amel
amel9mo ago
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
eyeswithoutaface
eyeswithoutafaceOP9mo ago
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 ?
amel
amel9mo ago
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
amel
amel9mo ago
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
GitHub
modules/modules/dnf at dnf-module · blue-build/modules
BlueBuild standard modules used for building your Atomic Images - blue-build/modules
Solution
amel
amel9mo ago
you can try sth like this https://github.com/askpng/solarpowered/blob/cachy/recipes/kernels/cachy.yml and probably use allow-erasing:
install:
allow-erasing: true
install-weak-deps: false
packages:
# - cachyos-ksm-settings
# - cachyos-settings
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)
GitHub
solarpowered/recipes/kernels/cachy.yml at cachy · askpng/solarpowered
Fedora Silverblue images for my personal use. Learning project, frequent changes. - askpng/solarpowered
eyeswithoutaface
eyeswithoutafaceOP9mo ago
let me try that dnf module still having issues trying a different couple things based off the two links provided
amel
amel9mo ago
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
eyeswithoutaface
eyeswithoutafaceOP9mo ago
yeah thinking they will as well if not maybe I can try aurora or something else
amel
amel9mo ago
yea that should be easier or like wayblue even https://github.com/wayblueorg/wayblue
GitHub
GitHub - wayblueorg/wayblue: Fedora Atomic images for wayland compo...
Fedora Atomic images for wayland compositors. Contribute to wayblueorg/wayblue development by creating an account on GitHub.
amel
amel9mo ago
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
eyeswithoutaface
eyeswithoutafaceOP9mo ago
yeah looking more towards latest currently I can't fakeroot to remove because its trying to remove it and failing
eyeswithoutaface
eyeswithoutafaceOP9mo ago
I am closing this sinc eyou sent a guid and I got it working without kmds unfortuantely
a64z
a64z2w ago
I have tried everything and I always get this build error :
[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?
[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?
amel
amel2w ago
are you using the version i shared recently?
a64z
a64z2w ago
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.
GitHub
solarpowered/files/scripts/kernels/kernel-cachy.sh at main · askpn...
Fedora Silverblue images for my personal use. Learning project, frequent changes. - askpng/solarpowered
amel
amel2w ago
I see your latest build has it working
a64z
a64z2w ago
I put it into its own .sh instead of using the script module. I should of did that from the get go....
amel
amel2w ago
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
a64z
a64z2w ago
Interesting, I wonder if it's worth a bug report in bluebuild. I deally I would want to just use the dnf module
a64z
a64z2w ago
Any idea what this is about?
No description
a64z
a64z2w ago
oh it seems because I have efi, I need to find how to make keys for the new kernel?
amel
amel2w ago
it's because of secure boot. i personally don't use it so i can't really assist with that
a64z
a64z2w ago
Yea I will keep it disabled, until I take the time to make my own key but thanks @amel 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?
⚧ Xenia Meraki ☭
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.
a64z
a64z2w ago
thanks! I instead opted to install the included nvidia-open
dnf -y install --setopt=install_weak_deps=False \
kernel-cachyos-lto \
kernel-cachyos-lto-nvidia-open
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 😄

Did you find this page helpful?