Skip to content
Advertisement

could not to setup crash dump on centos7 for debug kernel

I am trying to setup kdump to generate the vmcore for kernel-3.10.0-123.el7. For the perf kernel kernel-3.10.0-123.el7.x86_64.rpm i setup kdump and kdump is working fine too, generating vmcore. Then i installed

kernel-debug-3.10.0-123.el7.x86_64.rpm

using yum install kernel-debug-3.10.0-123.el7.x86_64.rpm and kdump worked fine.

But then i didnt have vmlinux to read vmcore of debug kernel. Then I build source using rpmbuild from the source

kernel-3.10.0-123.el7.src.rpm

But I see the vmlinux in

~/rpmbuild/BUILD/kernel-3.10.0-123.el7/linux-3.10.0-123.el7.x86_64/vmlinux

for perf kernel only not for debug kernel

So from ~/rpmbuild/SOURCES

i copied linux-3.10.0-123.el7.x86_64.tar.xz and used kernel-3.10.0-x86_64-debug.config as .config to get vmlinux

When i used this newly built vmlinux for debug kernel with crash it threw error that kernel version mismatch. Now I am stuck.

Please help me in setting up the kdump on centos7 with debug kernel & debug vmlinux.

Advertisement

Answer

Since I am new to centos I was not aware of debug pakages has vmlinux. i have installed debug rpms using following command:

yum --enablerepo=debug install kexec-tools crash kernel-debug kernel-debuginfo-`uname -r`

I notice kernel-debuginfo-3.10.0-123.el7.x86_64 has vmlinux at location:

/usr/lib/debug/lib/modules/3.10.0-123.el7.x86_64/vmlinux

So i got the vmlinux.

This vmlinux works with non-debug kernel.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement