[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
+.B CONFIG_KEXEC_JUMP
+option (x86 only).
 .SH USAGE
 Using
 .B kexec
@@ -102,6 +105,30 @@ command:
 .BR kexec \ \-e
 .RE
 
+After booting the kernel, you can jump back to the first kernel if you enable
+.B CONFIG_KEXEC_JUMP
+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:
+
+.RS
+.BR "kexec_jump_back_entry=0x00000000000810d2"
+.RE
+
+Frist you need to prepare jump with \-\-load\-jump\-back\-helper and \-\-entry options.
+
+.RS
+.B kexec
+.RB \-\-load\-jump\-back\-helper \-\-entry=0x810d2
+.RE
+
+Then the first kernel can be rebooted using the command:
+
+.RS
+.BR kexec \ \-e
+.RE
+
 .SH OPTIONS
 .TP
 .B \-d\ (\-\-debug)
@@ -173,6 +200,9 @@ Specify the jump back address. (0 means it's not jump back or preserve context)
 .TP
 .BI \-\-load\-preserve\-context
 Load the new kernel and preserve context of current kernel during kexec.
+(kexec returns error if
+.B CONFIG_KEXEC_JUMP
+is not enabled)
 .TP
 .BI \-\-load\-jump\-back\-helper
 Load a helper image to jump back to original kernel.
-- 
2.14.1




More information about the kexec mailing list