diff options
author | Aaron Ball <nullspoon@iohq.net> | 2016-05-22 21:57:20 -0600 |
---|---|---|
committer | Aaron Ball <nullspoon@iohq.net> | 2016-05-22 21:57:20 -0600 |
commit | 27d8537d672ae79f428732644595023e0030b80c (patch) | |
tree | 006bbf441f2bdd7901d8f384cf84ed38ef001f1d /init | |
parent | c1d71c7e8f123df2af8a2b57e858ea9f5acebf4d (diff) | |
download | mkinitramfs-27d8537d672ae79f428732644595023e0030b80c.tar.gz mkinitramfs-27d8537d672ae79f428732644595023e0030b80c.tar.xz |
Added basic support for interractive mode
Drops the boot sequence into an interractive bash shell, just prior to
mounting the new root fs (the first step where real issues may occur).
This is mostly useful for debugging to see what the environment looks
like, manually mount partitions, etc.
Diffstat (limited to 'init')
-rwxr-xr-x | init | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -1,7 +1,8 @@ #!/bin/bash -DEBUG=0 -ROOTDEV='' +export DEBUG=0 +export INTERRACTIVE=0 +export ROOTDEV='' function screen_init { # Clear screen @@ -56,10 +57,14 @@ function parse_cmdline { # Enable debug mode (this is gonna be slow DEBUG=1 ;; + interractive) + # Enable interractive mode + INTERRACTIVE=1 + ;; esac done } - + # # Returns type of partition. If part is LUKS encrypted, returns 'luks'. If @@ -138,6 +143,12 @@ function main { ROOTDEV=$(setup_encrypted ${ROOTDEV}) log "New rootdev: ${ROOTDEV}" fi + + # Drop to interractive shell if requested + if [[ ${INTERRACTIVE} == 1 ]]; then + log "Interractive shell requested. Type 'exit' to continue boot sequence." + bash --norc + fi # Mount the fakeroot. log "Mounting fakeroot" |