[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
+.B CONFIG_KEXEC_JUMP
+option (x86 and sh only).
 .SH USAGE
 Using
 .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
 .RE
-.PP
+
 After this kernel is loaded, it can be booted to at any time using the
 command:
 
@@ -102,6 +105,25 @@ command:
 .BR kexec \ \-e
 .RE
 
+For jumping back to the primary kernel, you need to prepare the jump with following command:
+
+.RS
+.B kexec
+.RB \-\-load\-jump\-back\-helper \ \-\-entry=<address>
+.RE
+
+The
+.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:
+
+.RS
+.BR kexec \ \-e
+.RE
+.PP
+
 .SH OPTIONS
 .TP
 .B \-d\ (\-\-debug)
@@ -173,6 +195,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