Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion base/comps/components.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1593,7 +1593,6 @@ includes = ["**/*.comp.toml", "component-check-disablement.toml"]
[components.kdsoap]
[components.kdsoap-ws-discovery-client]
[components.kdump-anaconda-addon]
[components.kdump-utils]
[components.kea]
[components.keepalived]
[components.kernel-srpm-macros]
Expand Down
7 changes: 7 additions & 0 deletions base/comps/kdump-utils/kdump-utils.comp.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[components.kdump-utils]

# Upstream (currently unmerged) PR: https://github.com/rhkdump/kdump-utils/pull/153
[[components.kdump-utils.overlays]]
description = "Use only first match in _find_kernel_path_by_release()"
type = "patch-add"
source = "kdumpctl-Use-only-first-match-in-_find_kernel_path_b.patch"
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
From c999bac950b817d229549d57f592980f4dc1655b Mon Sep 17 00:00:00 2001
From: Dan Streetman <ddstreet@ieee.org>
Date: Tue, 21 Apr 2026 14:00:20 -0400
Subject: [PATCH] kdumpctl: Use only first match in
_find_kernel_path_by_release()

Running 'grubby --info ALL' (or even for a specific kernel version)
can return multiple entries for the same kernel version/release
(usually with different append parameters, initrds, etc), so when
grepping for a specific kernel version/release, we need to use only
the first match.

This results in kdumpctl failing with the error message (from grubby):
"The param $KERNELPATH\n$KERNELPATH is incorrect"
replacing $KERNELPATH with the actual vmlinuz path.

This bug is hidden when /boot is a separate partition, because the
grubby script has regex ("/${param##*/}" = "${bls_linux[$i]}") which
strips all duplicate lines and base path, and successfully matches
"/vmlinuz-*".

This is reproducable by simply moving the /boot contents into a normal
dir in the rootfs (instead of separate fs).
---
kdumpctl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kdumpctl b/kdumpctl
index afcb19d..2c14148 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -1698,7 +1698,7 @@ _find_kernel_path_by_release()

# Insert '/' before '+' to cope with grep's EREs
_release=${_release//+/\\+}
- _grubby_kernel_str=$(grubby --info ALL | grep -E "^kernel=.*$_release(/\w+)?\"$")
+ _grubby_kernel_str=$(grubby --info ALL | grep -m 1 -E "^kernel=.*$_release(/\w+)?\"$")
_kernel_path=$(_filter_grubby_kernel_str "$_grubby_kernel_str")
if [[ -z $_kernel_path ]]; then
ddebug "kernel $_release doesn't exist"
--
2.51.0

Loading