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 <lichliu@redhat.com>
This commit is contained in:
Lichen Liu 2023-07-12 11:10:28 +08:00
parent b16ff946bf
commit 54cf7f8b00
1 changed files with 3 additions and 0 deletions

View File

@ -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"
}