fedora-silverblue / issue-tracker

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

Replacing the Kernel with HardHatOS COPR kernel doesnt work #407

Closed secretmango closed 1 year ago

secretmango commented 1 year ago

I am using Fedora Kinoite. I want to replace the Kernel for the hardened one, along with hardened_malloc, which I have already successfully layered.

Describe the bug Even though I fixed all dependency issues, I get

error: Multiple kernels (vmlinuz) found in: usr/lib/modules: 6.1.8-hardened1-1-hardened 6.1.7-200.fc37.x86_64+debug

To Reproduce

  1. Add the COPR repo
  2. sudo rpm-ostree override remove kernel kernel-core kernel-modules kernel-modules-extra --install kernel-hardened

OS version:

State: idle
BootedDeployment:
● fedora:fedora/37/x86_64/kinoite
                  Version: 37.20230127.0 (2023-01-27T01:11:27Z)
               BaseCommit: 3cf1fe94e740bd5c4918268b12eca5e8adf93f5407cb222a5c4f4b464a7d75b8
             GPGSignature: Valid signature by ACB5EE4E831C74BB7C168D27F55AD3FB5323552A
      RemovedBasePackages: firefox-langpacks 109.0-4.fc37 libavfilter-free libavformat-free libpostproc-free libswresample-free libavutil-free libswscale-free libavcodec-free 5.1.2-1.fc37
          LayeredPackages: 'clamtk*' 'gcc-c++' android-tools btfs cheat fail2ban ffmpeg gnome-boxes gocryptfs hardened_malloc keepassxc ksshaskpass lm_sensors make nextcloud-client
                           perl-Image-ExifTool pip powertop qemu qemu-img qemu-kvm qemu-user-static qphotorec R rpmfusion-free-release-tainted rstudio-desktop sqlitestudio stacer testdisk thonny
                           tldr tlp unrar virt-manager waydroid
            LocalPackages: mullvad-vpn-2022.5.0-1.x86_64 realvnc-vnc-server-6.11.0.47988-1.x86_64 rpmfusion-free-release-37-1.noarch rpmfusion-nonfree-release-37-1.noarch
                           rpmsphere-release-36-1.noarch
                   Pinned: yes
travier commented 1 year ago

It looks like the kernel package provides two kernels in a single RPM which confuses ostree/rpm-ostree.

secretmango commented 1 year ago

Hi, its me.

Here are some new errors.

rpm-ostree override remove kernel kernel-core kernel-modules kernel-modules-extra --install kernel-hardened
rpm-md repo 'copr:copr.fedorainfracloud.org:samsepi0l:HardHatOS' (cached); generated: 2023-03-18T15:06:31Z solvables: 8

# all going well

Running pre scripts... done
Running post scripts... done
Running posttrans scripts... done
Writing rpmdb... done
error: Multiple kernels (vmlinuz) found in: usr/lib/modules: 6.1.20-hardened1-1-hardened 6.1.18-200.fc37.x86_64+debug
miabbott commented 1 year ago

This is an rpm-ostree problem; something similar - https://github.com/coreos/rpm-ostree/issues/3530

It probably would make sense to file an issue with the rpm-ostree team

travier commented 1 year ago

Listing the content of the offending package would help with debugging here:

$ rpm -qlp <package>.rpm

If there truly are multiple kernels in a package then rpm-ostree can not know which one to use. If there is indeed only one and the package is correct, then it's an rpm-ostree bug.

secretmango commented 1 year ago

hardhatos.txt

Here is the file, its veeeery long.

travier commented 1 year ago

The only difference I can see is the usage of /usr/lib/modules instead of /lib/modules. Not sure if that's the root problem.

This indeed looks like an rpm-ostree bug. Please report it there and link the bug here.

Thanks.

secretmango commented 1 year ago

I created a comment at an existing bug report