CachyOS / CachyOS/copr-linux-cachyos

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

Open
#85 2 comments 0 reactions 1 assignee Claimed by @mikaeldui View on GitHub
atomic desktops
Dominant language
Shell
Stars
349
Forks
34
Avg merge
21h 59m
Merged PRs (30d)
2

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.