On Wed, Jan 28, 2015 at 04:29:52PM +0800, Baoquan He wrote:
Previously /boot is asumed as the default dir where kernel and
initrd
is put. However, the directory containing the running kernel image
on Atomic systems differs in each installation. Usually something like:
/boot/ostree/rhel-atomic-host-b50a015b637c353dc6554c851f8a1212b60d6121a7316715e4a63e2a4113cd72
This means that kdump will not find vmlinuz when installed on an
Atomic host, and thus the kdump service will fail to start.
In this patch, get the sub directory where kernel is put and append
it to /boot.
Note:
If user change KDUMP_BOOTDIR to other directory, then he need to
take care of all related things himself. Otherswise situation
will become complicated.
Bao,
I don't think that we should adjust boot directory unconditionally. What
if I put a vmlinuz in /boot dir for testing and I want to test it? kdump
will not use that vmlinuz.
I think a better approach is to first look for vmlinuz in /boot direct as
specified by user and if you don't find one there, then you adjust the
directory. That will make sure that existing users of the functionality
are not broken.
Thanks
Vivek
Signed-off-by: Baoquan He <bhe(a)redhat.com>
---
kdumpctl | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/kdumpctl b/kdumpctl
index 1c97405..aac1118 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -292,6 +292,15 @@ get_pcs_cluster_modified_files()
echo $modified_files
}
+adjust_boot_dir()
+{
+ #If user specify different boot dir then /boot, he need take care of
+ # the whole thing like /boot//ostree/rhel-atomicxxxx/vmlinuz-xxx
+ [ $KDUMP_BOOTDIR != "/boot" ] && return
+ eval $(cat /proc/cmdline | grep "BOOT_IMAGE" | cut -d' ' -f1)
+ KDUMP_BOOTDIR=$KDUMP_BOOTDIR$(dirname $BOOT_IMAGE)
+}
+
setup_target_initrd()
{
if [ $DEFAULT_DUMP_MODE == "fadump" ]; then
@@ -311,6 +320,8 @@ check_rebuild()
local _force_rebuild force_rebuild="0"
local initramfs_has_fadump
+ adjust_boot_dir
+
if [ -z "$KDUMP_KERNELVER" ]; then
kdump_kver=`uname -r`
else
--
1.8.5.3
_______________________________________________
kexec mailing list
kexec(a)lists.fedoraproject.org
https://lists.fedoraproject.org/mailman/listinfo/kexec