With fadump support, dracut-kdump.sh script is installed into default initrd to capture vmcore generated by firmware assisted dump. Thus in fadump case, the same initrd is being used for normal boot as well as boot after system crash. Hence a device node, added by firmware while system crashes, is checked to identify if it is a normal boot or boot after crash to determine whether or not capture vmcore. While testing fadump in fedora21 alpha, observed that vmcore capture is initiated even during normal boot, inspite of this check, with the below error:
"kdump.sh[451]: /bin/kdump.sh: line 5: return: can only `return' from a function or sourced script"
The below patch tries to fix this issue.
Signed-off-by: Hari Bathini hbathini@linux.vnet.ibm.com --- dracut-kdump.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dracut-kdump.sh b/dracut-kdump.sh index 600e84e..4fef0c5 100755 --- a/dracut-kdump.sh +++ b/dracut-kdump.sh @@ -2,7 +2,7 @@
# continue here only if we have to save dump. if [ -f /etc/fadump.initramfs ] && [ ! -f /proc/device-tree/rtas/ibm,kernel-dump ]; then - return + exit 0 fi
exec &> /dev/console
Hari,
Thanks for the fix..
On 10/23/14 at 11:54am, Hari Bathini wrote:
With fadump support, dracut-kdump.sh script is installed into default initrd to capture vmcore generated by firmware assisted dump. Thus in fadump case, the same initrd is being used for normal boot as well as boot after system crash. Hence a device node, added by firmware while system crashes, is checked to identify if it is a normal boot or boot after crash to determine whether or not capture vmcore. While testing fadump in fedora21 alpha, observed that vmcore capture is initiated even during normal boot, inspite of this check, with the below error:
"kdump.sh[451]: /bin/kdump.sh: line 5: return: can only `return' from a function or sourced script"
The below patch tries to fix this issue.
That should be the reason for my problem of system rebooting again and again after saving vmcore. The default action 'reboot' was executed due to no-proc-vmcore.
The patch looks good, ACK from my side.
Signed-off-by: Hari Bathini hbathini@linux.vnet.ibm.com
dracut-kdump.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dracut-kdump.sh b/dracut-kdump.sh index 600e84e..4fef0c5 100755 --- a/dracut-kdump.sh +++ b/dracut-kdump.sh @@ -2,7 +2,7 @@
# continue here only if we have to save dump. if [ -f /etc/fadump.initramfs ] && [ ! -f /proc/device-tree/rtas/ibm,kernel-dump ]; then
- return
- exit 0
fi
exec &> /dev/console
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
On 10/23/14 at 11:54am, Hari Bathini wrote:
With fadump support, dracut-kdump.sh script is installed into default initrd to capture vmcore generated by firmware assisted dump. Thus in fadump case, the same initrd is being used for normal boot as well as boot after system crash. Hence a device node, added by firmware while system crashes, is checked to identify if it is a normal boot or boot after crash to determine whether or not capture vmcore. While testing fadump in fedora21 alpha, observed that vmcore capture is initiated even during normal boot, inspite of this check, with the below error:
"kdump.sh[451]: /bin/kdump.sh: line 5: return: can only `return' from a function or sourced script"
The below patch tries to fix this issue.
Signed-off-by: Hari Bathini hbathini@linux.vnet.ibm.com
dracut-kdump.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dracut-kdump.sh b/dracut-kdump.sh index 600e84e..4fef0c5 100755 --- a/dracut-kdump.sh +++ b/dracut-kdump.sh @@ -2,7 +2,7 @@
# continue here only if we have to save dump. if [ -f /etc/fadump.initramfs ] && [ ! -f /proc/device-tree/rtas/ibm,kernel-dump ]; then
- return
- exit 0
fi
Acked-by: WANG Chao chaowang@redhat.com
On Thu, Oct 23, 2014 at 11:54:39AM +0530, Hari Bathini wrote:
With fadump support, dracut-kdump.sh script is installed into default initrd to capture vmcore generated by firmware assisted dump. Thus in fadump case, the same initrd is being used for normal boot as well as boot after system crash. Hence a device node, added by firmware while system crashes, is checked to identify if it is a normal boot or boot after crash to determine whether or not capture vmcore. While testing fadump in fedora21 alpha, observed that vmcore capture is initiated even during normal boot, inspite of this check, with the below error:
"kdump.sh[451]: /bin/kdump.sh: line 5: return: can only `return' from a function or sourced script"
The below patch tries to fix this issue.
Signed-off-by: Hari Bathini hbathini@linux.vnet.ibm.com
Thanks for the fix Hari. Looks good.
Acked-by: Vivek Goyal vgoyal@redhat.com
Vivek
dracut-kdump.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dracut-kdump.sh b/dracut-kdump.sh index 600e84e..4fef0c5 100755 --- a/dracut-kdump.sh +++ b/dracut-kdump.sh @@ -2,7 +2,7 @@
# continue here only if we have to save dump. if [ -f /etc/fadump.initramfs ] && [ ! -f /proc/device-tree/rtas/ibm,kernel-dump ]; then
- return
- exit 0
fi
exec &> /dev/console
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec