Currently, kexec-tools tries to reset crashkernel when using anaconda to
install the system. But grubby isn't ready and complains that,
10:34:17,014 INF packaging: Configuring (running scriptlet for): kexec-tools-2.0.23-9.el9.x86_64 1646034766 53ff7158f8808774f4e3c3c87e504aa7a6d677b537754dac86c87925c8f0a397
10:34:17,205 INF dnf.rpm: grep: /boot/grub2/grubenv: No such file or directory
grep: /boot/grub2/grubenv: No such file or directory
grep: /boot/grub2/grubenv: No such file or directory
kexec-tools is supposed to update the kernel crashkernel parameter after
package upgrade. Unfortunately, the posttrans RPM scriptlet doesn't
distinguish between package install and upgrade. This patch skips
reset_crashkernel_after_update as similar to e218128e ("Only try to
reset crashkernel for osbuild during package install").
Reported-by: Jan Stodola <jstodola(a)redhat.com>
Signed-off-by: Coiby Xu <coxu(a)redhat.com>
---
kdumpctl | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kdumpctl b/kdumpctl
index 7caaae56..b82d8694 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -1657,6 +1657,10 @@ reset_crashkernel_after_update()
local _kernel _crashkernel _dump_mode _fadump_val _old_default_crashkernel _new_default_crashkernel
declare -A _crashkernel_vals
+ if _is_package_install; then
+ return
+ fi
+
_crashkernel_vals[old_kdump]=$(cat /tmp/old_default_crashkernel 2> /dev/null)
_crashkernel_vals[old_fadump]=$(cat /tmp/old_default_crashkernel_fadump 2> /dev/null)
_crashkernel_vals[new_kdump]=$(get_default_crashkernel kdump)
--
2.38.1