Ho to get a core dump on a changed Linux kernel ?

I am running a Ubuntu 14.04 VM with 4G ram, 4 cores, compiled and installed a 3.18 kernel.

BOOT_IMAGE=/boot/vmlinuz-3.18.7+ root=UUID=4a45cb37-0577-4307-bfc5-da80ee9097db ro crashkernel=384M-:128M

user@dhcp194:~/source/nfs4tc$ sudo kdump-config test USE_KDUMP:
1 KDUMP_SYSCTL: kernel.panic_on_oops=1 KDUMP_COREDIR:
/var/crash crashkernel addr: 0x30000000 kdump kernel addr: relocatable kdump kernel: /boot/vmlinuz-3.18.7+ kdump initrd: /boot/initrd.img-3.18.7+ kexec command to be used: /sbin/kexec -p --command-line="BOOT_IMAGE=/boot/vmlinuz-3.18.7+ root=UUID=4a45cb37-0577-4307-bfc5-da80ee9097db ro irqpoll maxcpus=1 nousb" --initrd=/boot/initrd.img-3.18.7+ /boot/vmlinuz-3.18.7+

kdump-load throws an error.

user@dhcp194:~/source/nfs4tc$ sudo kdump-config load Could not find a free area of memory of 0x9521000 bytes... locate_hole failed * failed to load kdump kernel

syslog snippet:

/var/log/syslog.1:Apr 3 17:30:23 dhcp194 kdump-tools: failed to load kdump kernel /var/log/syslog.1:Apr 3 17:58:12 dhcp194 kdump-tools: failed to load kdump kernel /var/log/syslog.1:Apr 3 19:39:09 dhcp194 kdump-tools: failed to load kdump kernel

It works in a fresh installed VM, but after changing the kernel it wont. I use default .config file for kernel compilation. Any help ?

share|improve this question

Let's call a crash kernel - the one kdump must load, and system kernel - your host kernel.

  1. Enable CONFIG_KEXEC in your system kernel
  2. In your system kernel bootloader must pass crashkernel=YM@X string to your system kernel cmd line (possibly in your case through atags) where Y is a reserved space for your crash kernel (in MBs) and X is a physical address where crashkernel will be located.

To check 2. you could review /proc/iomem. If there is no "crash kernel" section in it, then something is going wrong. And next ... use -d option in kexec utility for verbose mode

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.