----- Original Message -----
From: "Minfei Huang" <mhuang(a)redhat.com>
To: "Chao Fan" <cfan(a)redhat.com>
Cc: kexec(a)lists.fedoraproject.org
Sent: Wednesday, July 8, 2015 4:06:42 PM
Subject: Re: [PATCH] remove the incomplete kdump.img
On 07/08/15 at 03:41pm, Chao Fan wrote:
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(a)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 $TARGET_INITRD
It is better to use "-f" option to remove the initramfs. If not, it will
raise the warning, once the file is inexistence.
Thanks
Minfei
Hi Minfei,
Ok, I will update my patch soon.
Thank you very much.
Chao Fan
return 1
fi
--
2.1.0
_______________________________________________
kexec mailing list
kexec(a)lists.fedoraproject.org
https://lists.fedoraproject.org/mailman/listinfo/kexec