[PATCH v2] add description for jumping back to the primary kernel in man page

Gioh Kim gi-oh.kim at profitbricks.com
Fri Feb 16 03:25:14 PST 2018

"--load-preserve-context", "--load-jump-back-helper" and "--entry"
options are described separately but there is not any description
how to use them.

Signed-off-by: Gioh Kim <gi-oh.kim at profitbricks.com>
 kexec/kexec.8 | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/kexec/kexec.8 b/kexec/kexec.8
index e0131b4..675a285 100644
--- a/kexec/kexec.8
+++ b/kexec/kexec.8
@@ -30,6 +30,9 @@ when configuring the kernel. The
 option enables the
 .B kexec
 system call.
+After booting into secondary kernel, you can jump back to the primary kernel with enabling
+option (x86 and sh only).
 .B kexec
@@ -94,7 +97,7 @@ then you would use the following command to load the kernel:
 .RB \-l\  /boot/vmlinux
 .RB "\-\-append=" "root=/dev/hda1" "\ \-\-initrd=" /boot/initrd
 After this kernel is loaded, it can be booted to at any time using the
@@ -102,6 +105,25 @@ command:
 .BR kexec \ \-e
+For jumping back to the primary kernel, you need to prepare the jump with following command:
+.B kexec
+.RB \-\-load\-jump\-back\-helper \ \-\-entry=<address>
+.BR <address>
+value is specified by
+.BR kexec_jump_back_entry=<address>
+kernel parameter in /proc/cmdline. Then the primary kernel can be booted
+using the command:
+.BR kexec \ \-e
 .B \-d\ (\-\-debug)
@@ -173,6 +195,9 @@ Specify the jump back address. (0 means it's not jump back or preserve context)
 .BI \-\-load\-preserve\-context
 Load the new kernel and preserve context of current kernel during kexec.
+(kexec returns error if
+is not enabled)
 .BI \-\-load\-jump\-back\-helper
 Load a helper image to jump back to original kernel.

More information about the kexec mailing list