[kexec-tools] do not mount root twice

Dave Young yangrr at fedoraproject.org
Thu Jul 12 03:21:20 UTC 2012


commit ec8e35a79090e9f8682c68cfc2429bea5dd3f01f
Author: Dave Young <dyoung at redhat.com>
Date:   Thu Jul 12 11:15:35 2012 +0800

    do not mount root twice
    
    Resolves: bz821997
    
    dracut will mount rootfs for us, so we need not pass root to fstab again here.
    Here remove the root-mount line.
    
    This will depends on the root=cmdline is right, by default kdump will
    inherit it from /proc/cmdline.
    
    Vivek: add document about the assumption for the root= cmdline issue.
    
    Signed-off-by: Dave Young <dyoung at redhat.com>
    Acked-by: Vivek Goyal <vgoyal at redhat.com>

 kdump.sysconfig        |    3 +++
 kdump.sysconfig.i386   |    3 +++
 kdump.sysconfig.ppc64  |    3 +++
 kdump.sysconfig.s390x  |    3 +++
 kdump.sysconfig.x86_64 |    3 +++
 kexec-kdump-howto.txt  |   10 ++++++++++
 mkdumprd               |    2 --
 7 files changed, 25 insertions(+), 2 deletions(-)
---
diff --git a/kdump.sysconfig b/kdump.sysconfig
index 0acce5f..effe466 100644
--- a/kdump.sysconfig
+++ b/kdump.sysconfig
@@ -7,6 +7,9 @@ KDUMP_KERNELVER=""
 # the kdump kernel.  This will likely match the contents of the grub kernel
 # line.  For example:
 #   KDUMP_COMMANDLINE="ro root=LABEL=/"
+# Dracut depends on proper root= options, so please make sure that appropriate
+# root= options are copied from /proc/cmdline. In general it is best to append
+# command line options using "KDUMP_COMMANDLINE_APPEND=".
 # If a command line is not specified, the default will be taken from
 # /proc/cmdline
 KDUMP_COMMANDLINE=""
diff --git a/kdump.sysconfig.i386 b/kdump.sysconfig.i386
index 538c1a8..b951139 100644
--- a/kdump.sysconfig.i386
+++ b/kdump.sysconfig.i386
@@ -7,6 +7,9 @@ KDUMP_KERNELVER=""
 # the kdump kernel.  This will likely match the contents of the grub kernel
 # line.  For example:
 #   KDUMP_COMMANDLINE="ro root=LABEL=/"
+# Dracut depends on proper root= options, so please make sure that appropriate
+# root= options are copied from /proc/cmdline. In general it is best to append
+# command line options using "KDUMP_COMMANDLINE_APPEND=".
 # If a command line is not specified, the default will be taken from
 # /proc/cmdline
 KDUMP_COMMANDLINE=""
diff --git a/kdump.sysconfig.ppc64 b/kdump.sysconfig.ppc64
index f9f5ca7..5f322af 100644
--- a/kdump.sysconfig.ppc64
+++ b/kdump.sysconfig.ppc64
@@ -7,6 +7,9 @@ KDUMP_KERNELVER=""
 # the kdump kernel.  This will likely match the contents of the grub kernel
 # line.  For example:
 #   KDUMP_COMMANDLINE="ro root=LABEL=/"
+# Dracut depends on proper root= options, so please make sure that appropriate
+# root= options are copied from /proc/cmdline. In general it is best to append
+# command line options using "KDUMP_COMMANDLINE_APPEND=".
 # If a command line is not specified, the default will be taken from
 # /proc/cmdline
 KDUMP_COMMANDLINE=""
diff --git a/kdump.sysconfig.s390x b/kdump.sysconfig.s390x
index 0614871..6c48a39 100644
--- a/kdump.sysconfig.s390x
+++ b/kdump.sysconfig.s390x
@@ -7,6 +7,9 @@ KDUMP_KERNELVER=""
 # the kdump kernel.  This will likely match the contents of the grub kernel
 # line.  For example:
 #   KDUMP_COMMANDLINE="ro root=LABEL=/"
+# Dracut depends on proper root= options, so please make sure that appropriate
+# root= options are copied from /proc/cmdline. In general it is best to append
+# command line options using "KDUMP_COMMANDLINE_APPEND=".
 # If a command line is not specified, the default will be taken from
 # /proc/cmdline
 KDUMP_COMMANDLINE=""
diff --git a/kdump.sysconfig.x86_64 b/kdump.sysconfig.x86_64
index 2e0eb70..b291b04 100644
--- a/kdump.sysconfig.x86_64
+++ b/kdump.sysconfig.x86_64
@@ -7,6 +7,9 @@ KDUMP_KERNELVER=""
 # the kdump kernel.  This will likely match the contents of the grub kernel
 # line.  For example:
 #   KDUMP_COMMANDLINE="ro root=LABEL=/"
+# Dracut depends on proper root= options, so please make sure that appropriate
+# root= options are copied from /proc/cmdline. In general it is best to append
+# command line options using "KDUMP_COMMANDLINE_APPEND=".
 # If a command line is not specified, the default will be taken from
 # /proc/cmdline
 KDUMP_COMMANDLINE=""
diff --git a/kexec-kdump-howto.txt b/kexec-kdump-howto.txt
index c3d0b28..1478148 100644
--- a/kexec-kdump-howto.txt
+++ b/kexec-kdump-howto.txt
@@ -585,3 +585,13 @@ visible on the screen.  It does not work with all video cards however.
 Secondly, it may be worth trying to add vga15fb.ko to the extra_modules list in
 /etc/kdump.conf.  This will attempt to use the video card in framebuffer mode,
 which can blank the screen prior to the start of a dump capture.
+
+Notes on rootfs mount:
+Dracut is designed to mount rootfs by default. If rootfs mounting fails it
+will refuse to go on. So kdump leaves rootfs mounting to dracut currently.
+We make the assumtion that proper root= cmdline is being passed to dracut
+initramfs for the time being. If you need modify "KDUMP_COMMANDLINE=" in
+/etc/sysconfig/kdump, you will need to make sure that appropriate root=
+options are copied from /proc/cmdline. In general it is best to append
+command line options using "KDUMP_COMMANDLINE_APPEND=" instead of replacing
+the original command line completely.
diff --git a/mkdumprd b/mkdumprd
index 82bc07b..e4c299e 100644
--- a/mkdumprd
+++ b/mkdumprd
@@ -166,8 +166,6 @@ add_mount() {
     return 0
 }
 
-add_dracut_mount "$(to_mount "$(get_rootdev)")"
-
 # firstly get right SSH_KEY_LOCATION
 keyfile=$(awk '/sshkey/ {print $2}' $conf_file)
 if [ -f "$keyfile" ]; then


More information about the scm-commits mailing list