aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2021-03-14 19:24:39 +0100
committerThomas Deutschmann <whissi@gentoo.org>2021-03-14 20:39:48 +0100
commit90138e02119bae09efe78f6ece02c039ad132137 (patch)
tree51378854df1b7c6b19f09f54d2297888540c11e1 /doc
parentinitrd.scripts: run_shell(): Exit early when /dev is gone (diff)
downloadgenkernel-90138e02119bae09efe78f6ece02c039ad132137.tar.gz
genkernel-90138e02119bae09efe78f6ece02c039ad132137.tar.bz2
genkernel-90138e02119bae09efe78f6ece02c039ad132137.zip
linuxrc: Refactor switch_root error handling
Previous idea (commit 93bf318e5114233f3cacc4575ab2e58d60e785c7) never worked: Exec will replace initramfs' init (PID 1) with specified command so that any further line will never be reached. If that command will fail now, init basically ended which will trigger a kernel panic: !! A fatal error has occured since /sbin/openrc-init did not !! boot correctly. Trying to open a shell ... + exec /bin/bash /init: exec: line 1366: /bin/bash: not found [ 55.060649] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00 The new error handling will keep init running in loop which will allow user to fix every detected problem until we are confident that switch_root call has a chance to succeed. In case the user cannot fix the problem (maybe because of gk.userinteraction.disabled), we will call the newly added gk.emergency action (reboot, poweroff or halt). Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/genkernel.8.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/genkernel.8.txt b/doc/genkernel.8.txt
index b75f979..44f3d59 100644
--- a/doc/genkernel.8.txt
+++ b/doc/genkernel.8.txt
@@ -832,6 +832,12 @@ when not set. This will allow remote user to provide answer through
will load that font. This boolean option allows you to disable
loading of the user embedded bootfont.
+*gk.emergency*=<reboot|poweroff|halt>::
+ By default, genkernel tries to spawn a rescue shell in case of
+ a critical failure (see *gk.userinteraction.disabled* to prevent this).
+ This option controls the action to execute when rescue is not possible.
+ Default is "halt".
+
*gk.hw.load-all*=<...>::
By default, genkernel loads various module groups (nvme, sata,
scsi, pata, usb...) until block device specified in *root* parameter
@@ -856,7 +862,7 @@ or desired, e.g. for a kiosk system, this boolean option will disable
any prompting, including the rescue shell.
NOTE: Because no user interaction is possible when this option is set,
-system will automatically reboot on error after a timeout.
+on error, system will immediately execute *gk.emergency* action.
*noload*=<...>::
List of modules to skip loading.