On Thu, Jun 12, 2014 at 08:26:22PM +0530, Hari Bathini wrote:
The script dracut-kdump.sh is responsible for capturing vmcore
during
second kernel boot. Currently this script gets installed into kdump
initrd as part of kdumpbase dracut module. Since it's always installed
into kdump initrd, this script assumes that '/proc/vmcore' will always
be present when it is invoked.
With fadump support, 'dracut-kdump.sh' script also gets installed into
default initrd to capture vmcore generated by firmware assisted dump.
Thus in fadump case, the same initrd is going to be used for normal
boot as well as boot after system crash. Hence a check is required to
see if '/proc/vmcore' file exists before executing steps to capture
vmcore. This check will help to bypass the vmcore capture steps during
normal boot process.
Hi Hari,
What happens if /proc/vmcore is present? So we use the existing logic
to copy the vmcore to destination? But existing logic will reboot the
machine after copying vmcore and I think that's not what you want.
Also existing logic will do error handling and try to dump somewhere
else and reboot machine.
I don't think you want to reboot the machine. Have you taken care of
all that and I missed it?
Thanks
Vivek
Signed-off-by: Mahesh Salgaonkar <mahesh(a)linux.vnet.ibm.com>
---
dracut-kdump.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dracut-kdump.sh b/dracut-kdump.sh
index cb13d92..55ac8bc 100755
--- a/dracut-kdump.sh
+++ b/dracut-kdump.sh
@@ -1,5 +1,8 @@
#!/bin/sh
+# continue only if /proc/vmcore is present.
+[ ! -f /proc/vmcore ] && return
+
exec &> /dev/console
. /lib/dracut-lib.sh
. /lib/kdump-lib.sh
_______________________________________________
kexec mailing list
kexec(a)lists.fedoraproject.org
https://lists.fedoraproject.org/mailman/listinfo/kexec