diff options
author | Aaron Ball <nullspoon@oper.io> | 2019-03-31 16:41:12 -0600 |
---|---|---|
committer | Aaron Ball <nullspoon@oper.io> | 2019-03-31 16:41:12 -0600 |
commit | 42c4949feddb2c7b126cd41d345d79600df05a61 (patch) | |
tree | 0ed997a84ac43cc87a59416bd28e235d36255456 | |
parent | 08d69e6d5b1d529f91745419065d4a2879b717af (diff) | |
download | mkinitramfs-42c4949feddb2c7b126cd41d345d79600df05a61.tar.gz mkinitramfs-42c4949feddb2c7b126cd41d345d79600df05a61.tar.xz |
init:Add debug shell and auto reboot on failure to decrypt root
-rwxr-xr-x | init | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -99,9 +99,12 @@ setup_encrypted() { # Notify user and wait for input on failure if [ "$?" -gt 0 ]; then - echo "An error was detected mounting the encrypted root." >&2 - echo "Pausing. Press enter to continue." >&2 - read + # Ensure decryption was successful, it not, drop to debug shell and reboot once done. + printf 'ERROR: Could not decrypt device\n' >&2 + printf 'Dropping to debug shell (will automatically reboot on exit).\n' >&2 + /bin/bash --norc + printf 'Rebooting\n' >&2 + init 6 fi # Probe the new crypto device for an additional partition table |