Documentation: kdump: describe jumping to dump-capture kernel
Subsystems (3)
PATCH 1/1 Documentation: kdump: describe jumping to dump-capture kernel
Jumping between the system kernel and the dump-capture kernel has been supported for long time but there is no description how to use it. This patch adds the description how to use kexec tool to jump to the dump-capture kernel and jump back to the system kernel.
--- Documentation/kdump/kdump.txt | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+)
Documentation/kdump/kdump.txt +38 -0
@@ -460,6 +460,44 @@ and the system will boot into the dump-capture kernel. For testing purposes, you can trigger a crash by using "ALT-SysRq-c", "echo c > /proc/sysrq-trigger" or write a module to force the panic. +Jump between the System kernel and the Dump-capture kernel +=============================== + +Without system crash, the system can jump to the dump-capture kernel. + +1) Enable "jump between system kernel and dump-capture kernel" support under + "Processor type and features" + + CONFIG_KEXEC_JUMP=y + +2) Load the dump-capture kernel with --load-preserve-context and mem-max + options as following. + + kexec -l <dump-capture-kernel-vmlinux-image> \ + --initrd=<initrd-for-dump-capture-kernel> --args-linux \ + --append="root=<root-dev> <arch-specific-options>" \ + --load-preserve-context \ + --mem-max=<the highest memory address addr to load code into> + +3) Jump to the loaded kernel + + kexec -e + +Now the system is running with the dump-capture kernel. You can jump back +to the system kernel. + +1) Find kexec_jump_back_entry address in kernel booting parameters in + /proc/cmdline. That is the address for kexec to jump to. For example: + kexec_jump_back_entry=0x00000000000810d2 + +2) Following command sets the jump-back address for kexec. + + kexec --load-jump-back-helper --entry=0x810d2 + +3) Jump to the system kernel + + kexec -e + Write Out the Dump File =======================
Signature · 7 lines
2.11.0 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Quoted 46 lines · Gioh Kim
Jumping between the system kernel and the dump-capture kernel has been supported for long time but there is no description how to use it. This patch adds the description how to use kexec tool to jump to the dump-capture kernel and jump back to the system kernel.
Signed-off-by Gioh Kim <[email protected]>--- Documentation/kdump/kdump.txt | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+)Documentation/kdump/kdump.txt +28
-0@@ -460,6 +460,44 @@ and the system will boot into the dump-capture kernel. For testing purposes, you can trigger a crash by using "ALT-SysRq-c", "echo c > /proc/sysrq-trigger" or write a module to force the panic. +Jump between the System kernel and the Dump-capture kernel +=============================== + +Without system crash, the system can jump to the dump-capture kernel. + +1) Enable "jump between system kernel and dump-capture kernel" support under + "Processor type and features" + + CONFIG_KEXEC_JUMP=y + +2) Load the dump-capture kernel with --load-preserve-context and mem-max + options as following. + + kexec -l <dump-capture-kernel-vmlinux-image> \ + --initrd=<initrd-for-dump-capture-kernel> --args-linux \ + --append="root=<root-dev> <arch-specific-options>" \ + --load-preserve-context \ + --mem-max=<the highest memory address addr to load code into> + +3) Jump to the loaded kernel + + kexec -e + +Now the system is running with the dump-capture kernel. You can jump back +to the system kernel. + +1) Find kexec_jump_back_entry address in kernel booting parameters in + /proc/cmdline. That is the address for kexec to jump to. For example:
Documentation/kdump/kdump.txt and the system will boot into the dump-capture kernel. · line 500
Quoted 10 lines
Documentation/kdump/kdump.txt +10
-0+ kexec_jump_back_entry=0x00000000000810d2 + +2) Following command sets the jump-back address for kexec. + + kexec --load-jump-back-helper --entry=0x810d2 + +3) Jump to the system kernel + + kexec -e +
This is essentially the 'kexec -l' use case, i.e we are loading another kernel and not the kexec -p (or the conventional kdump) use case and description.
I remember not being able to use the kexec -p (kdump feature) with the jump/preserve primary kernel attributes case previously, but that was some time back and haven't tried the same recently. So I am not sure if the kexec -p case works well with the jump feature currently, but I can try to setup an environment at my end.
So I don't think that the kdump kernel documentation is the right place for this addition (as in this kernel document we essentially capture the 'kexec -p' or kdump case and not the 'kexec -l'). Rather we should add it the kexec man page (inside kexec-tools). See
<git://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git> for the man page.
And I agree that this is a useful piece of documentation as I have burnt my hands while experimenting with the jump feature previously and I think it would be great to have this included somewhere in the kexec man page for ready reference.
Regards,
Bhupesh
Quoted 6 lines
Documentation/kdump/kdump.txt +0
-1Write Out the Dump File ======================= --2.11.0
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Hi,
Quoted 4 lines · Gioh Kim
Jumping between the system kernel and the dump-capture kernel has been supported for long time but there is no description how to use it. This patch adds the description how to use kexec tool to jump to the dump-capture kernel and jump back to the system kernel.
I do not think this should belong to kdump documentation. There are a lot of choices after a vmcore saving, one can reboot, halt, even go ahead with real root filesystem init path. We do not need to document all these in kdump.txt.
Since it is a general use case not only for kdump, add more info in kexec man page would be better.
Quoted 58 lines
Signed-off-by Gioh Kim <[email protected]>--- Documentation/kdump/kdump.txt | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+)Documentation/kdump/kdump.txt +38
-0@@ -460,6 +460,44 @@ and the system will boot into the dump-capture kernel. For testing purposes, you can trigger a crash by using "ALT-SysRq-c", "echo c > /proc/sysrq-trigger" or write a module to force the panic. +Jump between the System kernel and the Dump-capture kernel +=============================== + +Without system crash, the system can jump to the dump-capture kernel. + +1) Enable "jump between system kernel and dump-capture kernel" support under + "Processor type and features" + + CONFIG_KEXEC_JUMP=y + +2) Load the dump-capture kernel with --load-preserve-context and mem-max + options as following. + + kexec -l <dump-capture-kernel-vmlinux-image> \ + --initrd=<initrd-for-dump-capture-kernel> --args-linux \ + --append="root=<root-dev> <arch-specific-options>" \ + --load-preserve-context \ + --mem-max=<the highest memory address addr to load code into> + +3) Jump to the loaded kernel + + kexec -e + +Now the system is running with the dump-capture kernel. You can jump back +to the system kernel. + +1) Find kexec_jump_back_entry address in kernel booting parameters in + /proc/cmdline. That is the address for kexec to jump to. For example: + kexec_jump_back_entry=0x00000000000810d2 + +2) Following command sets the jump-back address for kexec. + + kexec --load-jump-back-helper --entry=0x810d2 + +3) Jump to the system kernel + + kexec -e + Write Out the Dump File =======================Signature · 1 line
2.11.0
Thanks
Dave
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 7 lines · Dave Young
Hi,
Quoted 4 lines · Gioh Kim
Jumping between the system kernel and the dump-capture kernel has been supported for long time but there is no description how to use it. This patch adds the description how to use kexec tool to jump to the dump-capture kernel and jump back to the system kernel.
Quoted 7 lines
I do not think this should belong to kdump documentation. There are a lot of choices after a vmcore saving, one can reboot, halt, even go ahead with real root filesystem init path. We do not need to document all these in kdump.txt.
Since it is a general use case not only for kdump, add more info in kexec man page would be better.
Hi,
Whenever I find a kernel option, I search Documentation files, and next is google.
So I think it would be better to describe how to use a kernel option or kernel feature in kernel document.
Quoted 62 lines
Quoted 57 lines
Signed-off-by Gioh Kim <[email protected]>--- Documentation/kdump/kdump.txt | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+)Documentation/kdump/kdump.txt +38
-1@@ -460,6 +460,44 @@ and the system will boot into the dump-capture kernel. For testing purposes, you can trigger a crash by using "ALT-SysRq-c", "echo c > /proc/sysrq-trigger" or write a module to force the panic. +Jump between the System kernel and the Dump-capture kernel +=============================== + +Without system crash, the system can jump to the dump-capture kernel. + +1) Enable "jump between system kernel and dump-capture kernel" support under + "Processor type and features" + + CONFIG_KEXEC_JUMP=y + +2) Load the dump-capture kernel with --load-preserve-context and mem-max + options as following. + + kexec -l <dump-capture-kernel-vmlinux-image> \ + --initrd=<initrd-for-dump-capture-kernel> --args-linux \ + --append="root=<root-dev> <arch-specific-options>" \ + --load-preserve-context \ + --mem-max=<the highest memory address addr to load code into> + +3) Jump to the loaded kernel + + kexec -e + +Now the system is running with the dump-capture kernel. You can jump back +to the system kernel. + +1) Find kexec_jump_back_entry address in kernel booting parameters in + /proc/cmdline. That is the address for kexec to jump to. For example: + kexec_jump_back_entry=0x00000000000810d2 + +2) Following command sets the jump-back address for kexec. + + kexec --load-jump-back-helper --entry=0x810d2 + +3) Jump to the system kernel + + kexec -e + Write Out the Dump File ======================= --Quoted 2 lines
2.11.0
Thanks
Dave
Signature · 20 lines
GIOH KIM Linux Kernel Entwickler ProfitBricks GmbH Greifswalder Str. 207 D - 10405 Berlin Tel: +49 176 2697 8962 Fax: +49 30 577 008 299 Email: [email protected] URL: https://www.profitbricks.de Sitz der Gesellschaft: Berlin Registergericht: Amtsgericht Charlottenburg, HRB 125506 B Geschäftsführer: Achim Weiss, Matthias Steinberg _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Quoted 16 lines · Gi-Oh Kim
Quoted 7 lines · Dave Young
Hi,
Quoted 4 lines · Gioh Kim
Jumping between the system kernel and the dump-capture kernel has been supported for long time but there is no description how to use it. This patch adds the description how to use kexec tool to jump to the dump-capture kernel and jump back to the system kernel.
Quoted 7 lines
I do not think this should belong to kdump documentation. There are a lot of choices after a vmcore saving, one can reboot, halt, even go ahead with real root filesystem init path. We do not need to document all these in kdump.txt.
Since it is a general use case not only for kdump, add more info in kexec man page would be better.
Quoted 6 lines
Hi,
Whenever I find a kernel option, I search Documentation files, and next is google.
So I think it would be better to describe how to use a kernel option or kernel feature in kernel document.
But this is not the kernel documentation for kexec warm reboot. Instead this is the kdump documentation. The example you quoted above is the 'kexec -l' use case and not 'kexec -p'.
Rather the man page for kexec-tools should be a good place to include this documentation.
Regards,
Bhupesh
Quoted 73 lines
Quoted 56 lines
Quoted 56 lines
Signed-off-by Gioh Kim <[email protected]>--- Documentation/kdump/kdump.txt | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+)Documentation/kdump/kdump.txt +38
-0@@ -460,6 +460,44 @@ and the system will boot into the dump-capture kernel. For testing purposes, you can trigger a crash by using "ALT-SysRq-c", "echo c > /proc/sysrq-trigger" or write a module to force the panic. +Jump between the System kernel and the Dump-capture kernel +=============================== + +Without system crash, the system can jump to the dump-capture kernel. + +1) Enable "jump between system kernel and dump-capture kernel" support under + "Processor type and features" + + CONFIG_KEXEC_JUMP=y + +2) Load the dump-capture kernel with --load-preserve-context and mem-max + options as following. + + kexec -l <dump-capture-kernel-vmlinux-image> \ + --initrd=<initrd-for-dump-capture-kernel> --args-linux \ + --append="root=<root-dev> <arch-specific-options>" \ + --load-preserve-context \ + --mem-max=<the highest memory address addr to load code into> + +3) Jump to the loaded kernel + + kexec -e + +Now the system is running with the dump-capture kernel. You can jump back +to the system kernel. + +1) Find kexec_jump_back_entry address in kernel booting parameters in + /proc/cmdline. That is the address for kexec to jump to. For example: + kexec_jump_back_entry=0x00000000000810d2 + +2) Following command sets the jump-back address for kexec. + + kexec --load-jump-back-helper --entry=0x810d2 + +3) Jump to the system kernel + + kexec -e + Write Out the Dump File =======================Quoted 6 lines
Quoted 3 lines
--
2.11.0Thanks
Dave--
GIOH KIM
Linux Kernel EntwicklerProfitBricks GmbH
Greifswalder Str. 207
D - 10405 Berlin
Quoted 8 lines
Tel: +49 176 2697 8962 Fax: +49 30 577 008 299 Email: [email protected] URL: https://www.profitbricks.deSitz der Gesellschaft: Berlin
Registergericht: Amtsgericht Charlottenburg, HRB 125506 B Geschäftsführer: Achim Weiss, Matthias Steinberg
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 19 lines · Bhupesh SHARMA
Quoted 18 lines · Gi-Oh Kim
Quoted 7 lines · Dave Young
Hi,
Quoted 4 lines · Gioh Kim
Jumping between the system kernel and the dump-capture kernel has been supported for long time but there is no description how to use it. This patch adds the description how to use kexec tool to jump to the dump-capture kernel and jump back to the system kernel.
Quoted 7 lines
I do not think this should belong to kdump documentation. There are a lot of choices after a vmcore saving, one can reboot, halt, even go ahead with real root filesystem init path. We do not need to document all these in kdump.txt.
Since it is a general use case not only for kdump, add more info in kexec man page would be better.
Hi,
Quoted 8 lines
Quoted 4 lines
Whenever I find a kernel option, I search Documentation files, and next is google.
So I think it would be better to describe how to use a kernel option or kernel feature in kernel document.But this is not the kernel documentation for kexec warm reboot. Instead this is the kdump documentation. The example you quoted above is the 'kexec -l' use case and not 'kexec -p'.
I thought enabling CONFIG_KEXEC_JUMP in kernel is the main topic and describing 'kexec -l' is showing how to use the CONFIG_KEXEC_JUMP option. Ok, I'll check the manual page of kexec.
I think it would be enough if I add a short note for -l and --load-preserve-context about the kernel option.
Thank you ;-)
Quoted 88 lines
Rather the man page for kexec-tools should be a good place to include this documentation.
Regards,
BhupeshQuoted 81 lines
Quoted 56 lines
Quoted 56 lines
Signed-off-by Gioh Kim <[email protected]>--- Documentation/kdump/kdump.txt | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+)Documentation/kdump/kdump.txt +38
-0@@ -460,6 +460,44 @@ and the system will boot into the dump-capture kernel. For testing purposes, you can trigger a crash by using "ALT-SysRq-c", "echo c > /proc/sysrq-trigger" or write a module to force the panic. +Jump between the System kernel and the Dump-capture kernel +=============================== + +Without system crash, the system can jump to the dump-capture kernel. + +1) Enable "jump between system kernel and dump-capture kernel" support under + "Processor type and features" + + CONFIG_KEXEC_JUMP=y + +2) Load the dump-capture kernel with --load-preserve-context and mem-max + options as following. + + kexec -l <dump-capture-kernel-vmlinux-image> \ + --initrd=<initrd-for-dump-capture-kernel> --args-linux \ + --append="root=<root-dev> <arch-specific-options>" \ + --load-preserve-context \ + --mem-max=<the highest memory address addr to load code into> + +3) Jump to the loaded kernel + + kexec -e + +Now the system is running with the dump-capture kernel. You can jump back +to the system kernel. + +1) Find kexec_jump_back_entry address in kernel booting parameters in + /proc/cmdline. That is the address for kexec to jump to. For example: + kexec_jump_back_entry=0x00000000000810d2 + +2) Following command sets the jump-back address for kexec. + + kexec --load-jump-back-helper --entry=0x810d2 + +3) Jump to the system kernel + + kexec -e + Write Out the Dump File =======================Quoted 6 lines
Quoted 3 lines
--
2.11.0Thanks
Dave--
GIOH KIM
Linux Kernel EntwicklerProfitBricks GmbH
Greifswalder Str. 207
D - 10405 BerlinTel: +49 176 2697 8962 Fax: +49 30 577 008 299 Email: [email protected] URL: https://www.profitbricks.deSitz der Gesellschaft: Berlin
Registergericht: Amtsgericht Charlottenburg, HRB 125506 B Geschäftsführer: Achim Weiss, Matthias Steinberg
Signature · 20 lines
GIOH KIM Linux Kernel Entwickler ProfitBricks GmbH Greifswalder Str. 207 D - 10405 Berlin Tel: +49 176 2697 8962 Fax: +49 30 577 008 299 Email: [email protected] URL: https://www.profitbricks.de Sitz der Gesellschaft: Berlin Registergericht: Amtsgericht Charlottenburg, HRB 125506 B Geschäftsführer: Achim Weiss, Matthias Steinberg _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec