When there's no kdump initramfs for lsinitrd to inspect with, there will be an error:
# kdumpctl start /boot/initramfs-3.16.0-rc7+kdump.img does not exist
Usage: lsinitrd [options] [<initramfs file> [<filename> [<filename> [...] ]]] Usage: lsinitrd [options] -k <kernel version>
-h, --help print a help message and exit. -s, --size sort the contents of the initramfs by size. -m, --mod list modules. -f, --file <filename> print the contents of <filename>. -k, --kver <kernel version> inspect the initramfs of <kernel version>.
No kdump initial ramdisk found. Rebuilding /boot/initramfs-3.16.0-rc7+kdump.img [..]
If kdump initramfs doesn't exist, we simply mark the inspecting kdump module failing. It wouldn't matter, because we need to build kdump initramfs anyway.
Signed-off-by: WANG Chao chaowang@redhat.com --- kdumpctl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl index 98de747..4f50dcb 100755 --- a/kdumpctl +++ b/kdumpctl @@ -364,7 +364,11 @@ check_rebuild() done
#check if target initrd has fadump support - initramfs_has_fadump=`lsinitrd -m $TARGET_INITRD | grep ^kdumpbase$ | wc -l` + if [ -f $TARGET_INITRD ]; then + initramfs_has_fadump=`lsinitrd -m $TARGET_INITRD | grep ^kdumpbase$ | wc -l` + else + initramfs_has_fadump=0 + fi
if [ $image_time -eq 0 ]; then echo -n "No kdump initial ramdisk found."; echo
On 08/01/2014 11:21 AM, WANG Chao wrote:
When there's no kdump initramfs for lsinitrd to inspect with, there will be an error:
# kdumpctl start /boot/initramfs-3.16.0-rc7+kdump.img does not exist
Usage: lsinitrd [options] [<initramfs file> [<filename> [<filename> [...] ]]] Usage: lsinitrd [options] -k <kernel version>
-h, --help print a help message and exit. -s, --size sort the contents of the initramfs by size. -m, --mod list modules. -f, --file <filename> print the contents of <filename>. -k, --kver <kernel version> inspect the initramfs of <kernel version>.
No kdump initial ramdisk found. Rebuilding /boot/initramfs-3.16.0-rc7+kdump.img [..]
Chao, my bad! Thanks for fixing this..
If kdump initramfs doesn't exist, we simply mark the inspecting kdump module failing. It wouldn't matter, because we need to build kdump initramfs anyway.
Signed-off-by: WANG Chao chaowang@redhat.com
kdumpctl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl index 98de747..4f50dcb 100755 --- a/kdumpctl +++ b/kdumpctl @@ -364,7 +364,11 @@ check_rebuild() done
#check if target initrd has fadump support
- initramfs_has_fadump=`lsinitrd -m $TARGET_INITRD | grep ^kdumpbase$ | wc -l`
if [ -f $TARGET_INITRD ]; then
initramfs_has_fadump=`lsinitrd -m $TARGET_INITRD | grep ^kdumpbase$ | wc -l`else
initramfs_has_fadump=0fi
if [ $image_time -eq 0 ]; then echo -n "No kdump initial ramdisk found."; echo
On Fri, Aug 01, 2014 at 01:51:09PM +0800, WANG Chao wrote:
When there's no kdump initramfs for lsinitrd to inspect with, there will be an error:
# kdumpctl start /boot/initramfs-3.16.0-rc7+kdump.img does not exist
Usage: lsinitrd [options] [<initramfs file> [<filename> [<filename> [...] ]]] Usage: lsinitrd [options] -k <kernel version>
-h, --help print a help message and exit. -s, --size sort the contents of the initramfs by size. -m, --mod list modules. -f, --file <filename> print the contents of <filename>. -k, --kver <kernel version> inspect the initramfs of <kernel version>.
No kdump initial ramdisk found. Rebuilding /boot/initramfs-3.16.0-rc7+kdump.img [..]
If kdump initramfs doesn't exist, we simply mark the inspecting kdump module failing. It wouldn't matter, because we need to build kdump initramfs anyway.
Signed-off-by: WANG Chao chaowang@redhat.com
kdumpctl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl index 98de747..4f50dcb 100755 --- a/kdumpctl +++ b/kdumpctl @@ -364,7 +364,11 @@ check_rebuild() done
#check if target initrd has fadump support
- initramfs_has_fadump=`lsinitrd -m $TARGET_INITRD | grep ^kdumpbase$ | wc -l`
- if [ -f $TARGET_INITRD ]; then
initramfs_has_fadump=`lsinitrd -m $TARGET_INITRD | grep ^kdumpbase$ | wc -l`
Chao,
Shouldn't we also check for dump mod to be fadump before we call lsinitrd. In normal cases we don't want to call "lsinitrd", It is a slow operation.
Thanks Vivek
On 08/04/14 at 08:44am, Vivek Goyal wrote:
On Fri, Aug 01, 2014 at 01:51:09PM +0800, WANG Chao wrote:
When there's no kdump initramfs for lsinitrd to inspect with, there will be an error:
# kdumpctl start /boot/initramfs-3.16.0-rc7+kdump.img does not exist
Usage: lsinitrd [options] [<initramfs file> [<filename> [<filename> [...] ]]] Usage: lsinitrd [options] -k <kernel version>
-h, --help print a help message and exit. -s, --size sort the contents of the initramfs by size. -m, --mod list modules. -f, --file <filename> print the contents of <filename>. -k, --kver <kernel version> inspect the initramfs of <kernel version>.
No kdump initial ramdisk found. Rebuilding /boot/initramfs-3.16.0-rc7+kdump.img [..]
If kdump initramfs doesn't exist, we simply mark the inspecting kdump module failing. It wouldn't matter, because we need to build kdump initramfs anyway.
Signed-off-by: WANG Chao chaowang@redhat.com
kdumpctl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl index 98de747..4f50dcb 100755 --- a/kdumpctl +++ b/kdumpctl @@ -364,7 +364,11 @@ check_rebuild() done
#check if target initrd has fadump support
- initramfs_has_fadump=`lsinitrd -m $TARGET_INITRD | grep ^kdumpbase$ | wc -l`
- if [ -f $TARGET_INITRD ]; then
initramfs_has_fadump=`lsinitrd -m $TARGET_INITRD | grep ^kdumpbase$ | wc -l`Chao,
Shouldn't we also check for dump mod to be fadump before we call lsinitrd. In normal cases we don't want to call "lsinitrd", It is a slow operation.
Right. Check v2 :)