Currently we have two issues against mounting filesystems by systemd.
1. If any failure in sysroot.mount, initrd.target won't be reached.
2. If any failure in mounting /etc/fstab, initrd.target won't be reached
Our kdump.sh is in dracut-pre-pivot hook which is ordered after
initrd.target. That means if systemd doesn't reach initrd.target,
pre-pivot service will not run.
To fix issue 1), we can add rootflags=nofail to 2nd kernel cmdline, so
that initrd.target will not require sysroot.mount. initrd.target
wouldn't care about the failures in sysroot.mount. And our kdump.sh will
run eventually.
To fix issue 2), we can add rd.fstab=0. With this specified in kernel
cmdline, systemd won't mount anything from /etc/fstab so that
initrd.target won't have a dependency on the mount unit. Instead a
dracut module 95fstab-sys, will install 00-mount-sys.sh to pre-pivot
hook. 00-mount-sys.sh will mount everything from /etc/fstab and even if
it fails to mount, kdump will run.
Signed-off-by: WANG Chao <chaowang(a)redhat.com>
---
kdump.sysconfig.i386 | 2 +-
kdump.sysconfig.ppc64 | 2 +-
kdump.sysconfig.s390x | 2 +-
kdump.sysconfig.x86_64 | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/kdump.sysconfig.i386 b/kdump.sysconfig.i386
index 1425ce1..534f6d4 100644
--- a/kdump.sysconfig.i386
+++ b/kdump.sysconfig.i386
@@ -16,7 +16,7 @@ KDUMP_COMMANDLINE=""
# This variable lets us append arguments to the current kdump commandline
# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
-KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices numa=off
udev.children-max=2 panic=10"
+KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices numa=off
udev.children-max=2 panic=10 rootflags=nofail rd.fstab=0"
# Any additional kexec arguments required. In most situations, this should
# be left empty
diff --git a/kdump.sysconfig.ppc64 b/kdump.sysconfig.ppc64
index 22e7bd5..40f67d4 100644
--- a/kdump.sysconfig.ppc64
+++ b/kdump.sysconfig.ppc64
@@ -16,7 +16,7 @@ KDUMP_COMMANDLINE=""
# This variable lets us append arguments to the current kdump commandline
# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
-KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 noirqdistrib reset_devices
cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10"
+KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 noirqdistrib reset_devices
cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10
rootflags=nofail rd.fstab=0"
# Any additional kexec arguments required. In most situations, this should
# be left empty
diff --git a/kdump.sysconfig.s390x b/kdump.sysconfig.s390x
index 129b205..8e0af33 100644
--- a/kdump.sysconfig.s390x
+++ b/kdump.sysconfig.s390x
@@ -16,7 +16,7 @@ KDUMP_COMMANDLINE=""
# This variable lets us append arguments to the current kdump commandline
# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
-KDUMP_COMMANDLINE_APPEND="maxcpus=1 cgroup_disable=memory numa=off
udev.children-max=2 panic=10"
+KDUMP_COMMANDLINE_APPEND="maxcpus=1 cgroup_disable=memory numa=off
udev.children-max=2 panic=10 rootflags=nofail rd.fstab=0"
# Any additional /sbin/mkdumprd arguments required.
MKDUMPRD_ARGS=""
diff --git a/kdump.sysconfig.x86_64 b/kdump.sysconfig.x86_64
index a143b5c..938586e 100644
--- a/kdump.sysconfig.x86_64
+++ b/kdump.sysconfig.x86_64
@@ -16,7 +16,7 @@ KDUMP_COMMANDLINE=""
# This variable lets us append arguments to the current kdump commandline
# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
-KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices cgroup_disable=memory
mce=off numa=off udev.children-max=2 panic=10"
+KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices cgroup_disable=memory
mce=off numa=off udev.children-max=2 panic=10 rootflags=nofail rd.fstab=0"
# Any additional kexec arguments required. In most situations, this should
# be left empty
--
1.8.3.1
Show replies by thread