Installing custom kernel fails on posttrans with "Failed to chase '/boot': No such file or directory"
Opened this issue · 6 comments
Describe the bug
When I attempt to install the linux-surface kernel (which contains a few additional drivers that have not been upstreamed to the mainline kernel yet), rpm-ostree
fails with the following error:
error: Running %posttrans for kernel-surface-core: bwrap(/bin/sh): Child process killed by signal 1; run `journalctl -t 'rpm-ostree(kernel-surface-core.posttrans)'` for more information
Upon checking out the output of the suggested journalctl
command, I get this:
Oct 04 09:34:03 silverblue rpm-ostree(kernel-surface-core.posttrans)[5995]: Failed to chase '/boot': No such file or directory
To Reproduce
- Follow the installation instructions of linux-surface
- Watch
rpm-ostree override
fail onposttrans
Expected behavior
I expected I would be able to install the linux-surface kernel, as I had been in Fedora Silverblue 35 through 38.
OS version:
State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: no runs since boot
BootedDeployment:
● fedora:fedora/39/x86_64/silverblue
Version: 39.20231003.n.0 (2023-10-03T08:02:40Z)
BaseCommit: 6bfcd9ff87fd52085c7fd4c00e8e7c3b734c4e03b2b197c5af30b7e1dbe49ad3
GPGSignature: Valid signature by E8F23996F23218640CB44CBE75CF5AC418B8E74C
LayeredPackages: firefoxpwa gocryptfs guake intel-media-driver langpacks-pt_BR
libavcodec-freeworld libcamera libcamera-gstreamer libcamera-ipa
libcamera-qcam libcamera-tools nautilus-python neovim openssl
podman-remote rpmfusion-free-release rpmfusion-nonfree-release
seahorse-nautilus steam-devices sushi zsh
Additional context
Looking it up online, I found this thread where someone faced a similar problem while trying to use a custom kernel in Fedora Silverblue 39. Perhaps this is not an issue only with the linux-surface, but custom kernels in general.
It's a classic issue: https://github.com/coreos/rpm-ostree/blob/0bdd4f247b7a62255460354820470e4e6332547d/rust/src/scripts.rs#L18
We should fix those posttrans scripts once and for all upstream to get rid of it.
Fix would have to happen in https://gitlab.com/cki-project/kernel-ark/-/blob/os-build/redhat/kernel.spec.template?ref_type=heads for all Fedora kernels or in the specfile specific to this package.
Thanks for the info, @travier!
Fix would have to happen in https://gitlab.com/cki-project/kernel-ark/-/blob/os-build/redhat/kernel.spec.template?ref_type=heads for all Fedora kernels or in the specfile specific to this package.
From the looks of it, the kernel-surface
package simply takes a Fedora kernel and applies some patches to it. That means I would have to contribute to the spec file that you linked, right? I have little experience packaging RPMs, but if you could point me in the right direction, I can give this a go :)
I've made https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2743. Help with testing welcomed :)
Wow, you were really quick! Thank you for this. I read the docs on getting a local build of the kernel-ark package. I think I can test it tomorrow!