If the directory where the kdump.img saved has not enough space for the kdump.img, after restart kdump, it will get an incomplete file named initramfs-xxxkdump.img, the restart of kdump failed, but did not remove the incomplete file. So when reboot the system, kdump will load the incomplete file, and then when kernel crash, the kdump will fail because the file initramfs-xxxkdump.img is incomplete.
So, when the dracut failed build the initramfs-xxxkdump.img, kdump should remove the file initramfs-xxxkdump.img so that kdump will not load a wrong initramfs-xxxkdump.img when reboot the system.
Signed-off-by: Chao Fan cfan@redhat.com --- kdumpctl | 1 + 1 file changed, 1 insertion(+)
diff --git a/kdumpctl b/kdumpctl index eaf7f67..b82e3f0 100755 --- a/kdumpctl +++ b/kdumpctl @@ -175,6 +175,7 @@ rebuild_kdump_initrd() $MKDUMPRD $TARGET_INITRD $kdump_kver if [ $? != 0 ]; then echo "mkdumprd: failed to make kdump initrd" >&2 + rm -f $TARGET_INITRD return 1 fi
Patch is good, there's some grammer mistakes in log.
On 07/08/15 at 04:30pm, Chao Fan wrote:
If the directory where the kdump.img saved has not enough space for the
~ is ~~~~~doesn't have or has no
kdump.img, after restart kdump, it will get an incomplete file named
~~~restarting kdump service
initramfs-xxxkdump.img, the restart of kdump failed, but did not remove the
~ restarting of kdump service
incomplete file. So when reboot the system, kdump will load the incomplete file, and then when kernel crash, the kdump will fail because the file initramfs-xxxkdump.img is incomplete.
So, when the dracut failed build the initramfs-xxxkdump.img, kdump should
~~if ~ building
remove the file initramfs-xxxkdump.img so that kdump will not load a wrong initramfs-xxxkdump.img when reboot the system.
Signed-off-by: Chao Fan cfan@redhat.com
kdumpctl | 1 + 1 file changed, 1 insertion(+)
diff --git a/kdumpctl b/kdumpctl index eaf7f67..b82e3f0 100755 --- a/kdumpctl +++ b/kdumpctl @@ -175,6 +175,7 @@ rebuild_kdump_initrd() $MKDUMPRD $TARGET_INITRD $kdump_kver if [ $? != 0 ]; then echo "mkdumprd: failed to make kdump initrd" >&2
return 1 firm -f $TARGET_INITRD
-- 2.1.0
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec