File kdump-ensure-initrd.target.wants-directory.patch of Package kdump.21347
Date: Wed Jul 29 14:40:10 2020 +0800
From: Shung-Hsi Yu <shung-hsi.yu@suse.com>
Subject: Make sure that initrd.target.wants directory exists
References: bsc#1172670
Upstream: merged
Git-commit: 506794bf323ceb27f4796e60e311fad11e6d6986
Creation of symbolic link to kdump-save.service will fail if the directory
doesn't exists, and dump will not be captured because kdump-save.service is
never started.
The user will see the rescue mode prompt when the kernel crashed because
systemd will proceed to initrd-switch-root, which will fail (thus triggering
rescue mode) because kdump initrd does not setup /sysroot properly.
Signed-off-by: Shung-Hsi Yu <shung-hsi.yu@suse.com>
---
init/module-setup.sh | 1 +
1 file changed, 1 insertion(+)
--- a/init/module-setup.sh
+++ b/init/module-setup.sh
@@ -273,6 +273,7 @@ install() {
done
) > "$_d"/kdump.conf
+ mkdir -p "$initdir/$systemdsystemunitdir"/initrd.target.wants
ln_r "$systemdsystemunitdir"/kdump-save.service \
"$systemdsystemunitdir"/initrd.target.wants/kdump-save.service
else