From 54cf7f8b008604ca9af8eaf08f028c6e6bf1fc5e Mon Sep 17 00:00:00 2001 From: Lichen Liu Date: Wed, 12 Jul 2023 11:10:28 +0800 Subject: [PATCH] Revert "Revert "Append both nofail and x-systemd.before to kdump mount target"" Resolves: bz2219378 Upstream: RHEL-ONLY Conflict: None The commit 68d02c2a casused a regression that mount sysroot will fail in the kdump kernel. Since that commit only fixed a print issue, revert it. This issue is related to a systemd bug which has been fixed by this PR: https://github.com/systemd/systemd/pull/23893, before these patches are backported to RHEL-8, we should keep the nofail and x-systemd.before options. Fixes: 68d02c2a (Revert "Append both nofail and x-systemd.before to kdump mount target") Signed-off-by: Lichen Liu --- mkdumprd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mkdumprd b/mkdumprd index f6438e9..f5bfd65 100644 --- a/mkdumprd +++ b/mkdumprd @@ -84,6 +84,9 @@ to_mount() { # with 'noauto' in fstab nfs and non-root disk mount will fail in 2nd # kernel, filter it out here. _options=$(echo $_options | sed 's/\(^\|,\)noauto\($\|,\)/\1/g') + # use both nofail and x-systemd.before to ensure systemd will try best to + # mount it before kdump starts, this is an attempt to improve robustness + _options="$_options,nofail,x-systemd.before=initrd-fs.target" echo "$_pdev $_new_mntpoint $_fstype $_options" }