how to use kexec to jump back to the original kernel
bhupesh.linux at gmail.com
Sun Feb 11 22:56:12 PST 2018
On Fri, Feb 9, 2018 at 7:24 PM, Gioh Kim <gurugio at gmail.com> wrote:
> "echo c > /proc/sysrq-trigger" generates the kernel dump but it
> reboots the system.
> I'd like to generate kernel dump without system reboot.
> I think it is possible to jump to the kdump kernel and generate kernel
> dump, and come back to the operating kernel with kexec.
> I know I can jump to the kdump kernel with "kexec -e" but I cannot
> figure out how to come back to the operating kernel.
> For example, I tried following sequences after reading kexec manual page.
> 0. rebuild kernel with CONFIG_KEXEC_JUMP option
> 1. kexec --load=/boot/vmlinuz --initrd=/boot/initrd --reuse-cmdline
Instead you should be using something like:
# kexec -l /boot/vmlinuz-`uname -r` --initrd=/boot/initramfs-`uname
-r`.img --reuse-cmdline --load-preserve-context --mem-min=addr
to let the kernel know that the primary kernel context should be
retained so that we can return to the same once we do a 'kexec -e'
from the secondary kernel.
Can you please try the same. Also can you please share the details of
the hardware you are using this one, AFAIK only x86 and sh
architectures support CONFIG_KEXEC_JUMP in upstream linux.
> 2. kexec -e
> 3. now kdump kernel is running
> 4. kexec --load-jump-back-helper --entry=<ADDRESS>
> 5. kexec -e
> I can jump to the kdump kernel with step 1 and step 2.
> kexec manual says I need an entry address.
> I don't know what address I should use.
> I found a email thread about jump_back_entry= but there is no
> parameter like jump_back_entry in kernel booting parameters of
> Does anybody know how to use kexec to jump between kdump kernel and
> operating kernel?
> Best regards,
> Gioh Kim
> kexec mailing list
> kexec at lists.infradead.org
More information about the kexec