aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorGarrett Fields <[email protected]>2019-12-17 20:45:06 -0500
committerBrian Behlendorf <[email protected]>2019-12-17 17:45:06 -0800
commite8b199faec442a2e831f715ce187acf4bce0e930 (patch)
tree888f4926e16bbb20742ce6bf225e080c357f5ba3 /contrib
parentad976437738c67751d97732e12ad5df54b6b518f (diff)
Force systems with kernel option "quiet" to display prompt for password
On systems that utilize TTY for password entry, if the kernel option "quiet" is set, the system would appear to freeze on a blank screen, when in fact it is waiting for password entry from the user. Since TTY is the fallback method, this has no effect on systemd or plymouth password prompting. By temporarily setting "printk" to "7", running the command, then resuming with the original "printk" state, the user can see the password prompt. Reviewed-by: Richard Laager <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Garrett Fields <[email protected]> Closes #9731
Diffstat (limited to 'contrib')
-rw-r--r--contrib/initramfs/scripts/zfs.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/initramfs/scripts/zfs.in b/contrib/initramfs/scripts/zfs.in
index 523694473..554016062 100644
--- a/contrib/initramfs/scripts/zfs.in
+++ b/contrib/initramfs/scripts/zfs.in
@@ -436,7 +436,11 @@ decrypt_fs()
# Prompt with ZFS tty, otherwise
else
+ # Setting "printk" temporarily to "7" will allow prompt even if kernel option "quiet"
+ storeprintk="$(awk '{print $1}' /proc/sys/kernel/printk)"
+ echo 7 > /proc/sys/kernel/printk
$ZFS load-key "${ENCRYPTIONROOT}"
+ echo "$storeprintk" > /proc/sys/kernel/printk
fi
fi
fi