Summary
kernel-cachyos-core's %posttrans scriptlet unconditionally invokes grub2-probe and grub2-editenv. On systems where grub2 is not the bootloader (or the install runs inside a container / bootc-image-builder / rpm-ostree build environment), these calls fail visibly in the build log:
>>> Finished %posttrans scriptlet: kernel-cachyos-core-0:7.0.11-cachyos1.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]
>>> grub2-editenv: error: failed to get canonical path of `/boot/grub2'.
>>> System has not been booted with systemd as init system (PID 1). Can't operate.
>>> Failed to connect to system scope bus via local transport: Host is down
Reproducible on every Fedora-atomic bootc image build that installs kernel-cachyos from the bieszczaders/kernel-cachyos COPR — we hit it on every Margine OS build (ghcr.io/daniel-g-carrasco/margine).
Environment
- Image base:
ghcr.io/ublue-os/bluefin-dx:stable (Fedora 44 atomic, bootc)
- Kernel:
kernel-cachyos-core-0:7.0.11-cachyos1.fc44.x86_64
- Build: GitHub Actions
ubuntu-24.04 + buildah build --layers
Why it does not (yet) break us
The scriptlet exits non-zero but dnf does not propagate the failure — the build continues. The kernel install completes, dracut runs, etc. So this is log noise + a real exit-code problem in %posttrans rather than an installer break.
Suggested fix
Guard the grub2 calls so they only run on a booted host system with a real /boot/grub2/ directory:
%posttrans
if [ -d /boot/grub2 ] && [ -e /run/systemd/system ]; then
grub2-probe ...
grub2-editenv ...
fi
This matches what mainstream Fedora kernel-core does in its own scriptlets — the upstream Fedora kernel.spec guards %post/%posttrans with similar checks for atomic/container/ostree environments.
Reference
Summary
kernel-cachyos-core's%posttransscriptlet unconditionally invokesgrub2-probeandgrub2-editenv. On systems where grub2 is not the bootloader (or the install runs inside a container /bootc-image-builder/rpm-ostreebuild environment), these calls fail visibly in the build log:Reproducible on every Fedora-atomic bootc image build that installs
kernel-cachyosfrom thebieszczaders/kernel-cachyosCOPR — we hit it on every Margine OS build (ghcr.io/daniel-g-carrasco/margine).Environment
ghcr.io/ublue-os/bluefin-dx:stable(Fedora 44 atomic, bootc)kernel-cachyos-core-0:7.0.11-cachyos1.fc44.x86_64ubuntu-24.04+buildah build --layersWhy it does not (yet) break us
The scriptlet exits non-zero but
dnfdoes not propagate the failure — the build continues. The kernel install completes, dracut runs, etc. So this is log noise + a real exit-code problem in%posttransrather than an installer break.Suggested fix
Guard the grub2 calls so they only run on a booted host system with a real
/boot/grub2/directory:This matches what mainstream Fedora
kernel-coredoes in its own scriptlets — the upstream Fedorakernel.specguards%post/%posttranswith similar checks for atomic/container/ostree environments.Reference