fedora-silverblue / issue-tracker

Fedora Silverblue issue tracker
https://fedoraproject.org/atomic-desktops/silverblue/
123 stars 3 forks source link

Installing custom kernel fails on posttrans with "Failed to chase '/boot': No such file or directory" #497

Open pesader opened 1 year ago

pesader commented 1 year ago

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

  1. Follow the installation instructions of linux-surface
  2. Watch rpm-ostree override fail on posttrans

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.

travier commented 1 year ago

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.

travier commented 1 year ago

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.

travier commented 1 year ago

https://github.com/coreos/rpm-ostree/issues/4057

pesader commented 1 year ago

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 :)

travier commented 1 year ago

I've made https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2743. Help with testing welcomed :)

pesader commented 1 year ago

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!

LorbusChris commented 2 months ago

I'm getting a slightly different error:

Running posttrans scripts... done
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
Sep 02 13:17:35 fedora rpm-ostree(kernel-surface-core.posttrans)[4645]: error: rpm-ostree kernel-install wrapper: No such file or directory (os error 2)

also ref https://github.com/linux-surface/linux-surface/issues/1511