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

Gioh Kim gi-oh.kim at profitbricks.com
Thu Feb 15 03:44:19 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 | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/kexec/kexec.8 b/kexec/kexec.8
index e0131b4..b7ac028 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 another kernel, you can jump back to the first kernel with enabling
+option (x86 only).
 .B kexec
@@ -102,6 +105,30 @@ command:
 .BR kexec \ \-e
+After booting the kernel, you can jump back to the first kernel if you enable
+kernel option and specify \-\-load\-preserve\-context option.
+You can see
+.BR "kexec_jump_back_entry=<address>"
+kernel parameter in /proc/cmdline file, for example:
+.BR "kexec_jump_back_entry=0x00000000000810d2"
+Frist you need to prepare jump with \-\-load\-jump\-back\-helper and \-\-entry options.
+.B kexec
+.RB \-\-load\-jump\-back\-helper \-\-entry=0x810d2
+Then the first kernel can be rebooted using the command:
+.BR kexec \ \-e
 .B \-d\ (\-\-debug)
@@ -173,6 +200,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