Skip to content

6.19.8-cachyos1.lto.fc44 kernel-install posttrans fails in podman: /usr/lib/modules/.../modules.dep missing #85

Description

@m-fe02

Hi CachyOS team, I'm having trouble trying to install the Cachy kernel in my custom Fedora BootC project.

It seems there is some difference between how dracut is called in the posttrans script of the latest release of the kernel.

  • Environment:

Fedora 44 (ostree + podman BootC environment)

install-cachyos-kernel.sh:

#!/bin/bash
set -ex

# Install CachyOS Kernel
dnf -y remove kernel kernel-*
rm -rf /usr/lib/modules/*
dnf -y copr enable bieszczaders/kernel-cachyos-lto
dnf -y install --setopt=install_weak_deps=False kernel-cachyos-lto
dnf -y copr disable bieszczaders/kernel-cachyos-lto
setsebool -P domain_kernel_load_modules on

For 6.19.6-cachyos1.lto.fc44, this succeeds (with warnings as expected).

Succession example:

>>> Running %posttrans scriptlet: kernel-cachyos-lto-core-0:6.19.6-cachyos1.lto.fc44.x86_64
>>> Finished %posttrans scriptlet: kernel-cachyos-lto-core-0:6.19.6-cachyos1.lto.fc44.x86_64
>>> Scriptlet output:
>>> grub2-probe: error: failed to get canonical path of `overlay'.
>>> No path or device is specified.
>>> Usage: grub2-probe [OPTION...] [OPTION]... [PATH|DEVICE]
>>> Try 'grub2-probe --help' or 'grub2-probe --usage' for more information.
>>> dracut[E]: No '/dev/log' or 'logger' included for syslog logging
>>> grub2-editenv: error: failed to get canonical path of `/boot/grub2'.

For 6.19.8-cachyos1.lto.fc44, transaction fails inside %posttrans.

Failure log:

>>> Running %posttrans scriptlet: kernel-cachyos-lto-core-0:6.19.8-cachyos1.lto.fc44.x86_64
>>> Non-critical error in %posttrans scriptlet: kernel-cachyos-lto-core-0:6.19.8-cachyos1.lto.fc44.x86_64
>>> Scriptlet output:
>>> Generating initramfs
>>> error: rpm-ostree kernel-install: Adding kernel: Running dracut: Subprocess failed: ExitStatus(unix_wait_status(256))
>>> dracut[E]: No '/dev/log' or 'logger' included for syslog logging
>>> dracut[I]: Detected podman container.
>>> dracut[I]: Executing: /usr/bin/dracut --no-hostonly --kver 6.19.8-cachyos1.lto.fc44.x86_64 --reproducible -v --add ostree -f /tmp/.tmpjgixVE/initramfs.img
>>> dracut[F]: /usr/lib/modules/6.19.8-cachyos1.lto.fc44.x86_64/modules.dep is missing. Did you run depmod?
>>> 
>>> /usr/lib/kernel/install.d/05-rpmostree.install failed with exit status 1.
>>> 
>>> [RPM] %posttrans(kernel-cachyos-lto-core-6.19.8-cachyos1.lto.fc44.x86_64) scriptlet failed, exit status 1
Transaction failed: Rpm transaction failed.

6.19.6 posttrans appears to perform dracut and grub operations directly, resulting in warnings only, and completed successfully without invoking rpm-ostree kernel-install.

6.19.8 posttrans appears to trigger rpm-ostree kernel-install (via /usr/lib/kernel/install.d/05-rpmostree.install), which executes /usr/bin/dracut --add ostree and fails if modules.dep is missing.

Was there a change in how dracut get's called in the RPM spec?

Since this gets invoked in a script within a BootC environment, I wonder if there is any implicit behavior I'm causing by removing the default fedora kernel. However this did work in the past.

Or if anyone else is doing similar work with BootC, I'd be happy to hear any suggestions on how to make the installation successful going forward.

Regards

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

atomic desktopsIssue related to Fedora Atomic Desktops: Silverblue, Kinote, Bluefin, Bazzite.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions