diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-12-08 00:38:17 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-12-08 00:38:17 +0300 |
commit | 8d6ae7f2a817751fad151168fa10ce28ee0869d8 (patch) | |
tree | 281032f7ec07c41589aa094bd165cc2a98f2d3a7 /meta-phosphor/recipes-phosphor/initrdscripts/files/obmc-init.sh | |
parent | c16fb8893b19075db4bcf3b5bf33c1db8c3ca2bd (diff) | |
parent | 5da3c2284560a7e08ffafd03c5b5ba44a3242228 (diff) | |
download | openbmc-8d6ae7f2a817751fad151168fa10ce28ee0869d8.tar.xz |
Merge tag '0.26' of ssh://git-amr-1.devtools.intel.com:29418/openbmc-openbmc into update
Diffstat (limited to 'meta-phosphor/recipes-phosphor/initrdscripts/files/obmc-init.sh')
-rw-r--r-- | meta-phosphor/recipes-phosphor/initrdscripts/files/obmc-init.sh | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/meta-phosphor/recipes-phosphor/initrdscripts/files/obmc-init.sh b/meta-phosphor/recipes-phosphor/initrdscripts/files/obmc-init.sh index 62be89f03..e61ede911 100644 --- a/meta-phosphor/recipes-phosphor/initrdscripts/files/obmc-init.sh +++ b/meta-phosphor/recipes-phosphor/initrdscripts/files/obmc-init.sh @@ -128,18 +128,25 @@ try_wget() { debug_takeover() { echo "$@" - test -n "$@" && echo Enter password to try to manually fix. + + if ! grep -w enable-initrd-debug-sh "$optfile" + then + echo "Fatal error, triggering kernel panic!" + exit 1 + fi + + test -n "$@" && echo Try to manually fix. cat << HERE After fixing run exit to continue this script, or reboot -f to retry, or touch /takeover and exit to become PID 1 allowing editing of this script. HERE - while ! sulogin && ! test -f /takeover + while ! /bin/sh && ! test -f /takeover do - echo getty failed, retrying + echo /bin/sh failed, retrying done - # Touch /takeover in the above getty to become pid 1 + # Touch /takeover in the above shell to become pid 1 if test -e /takeover then cat << HERE @@ -208,7 +215,12 @@ echo rofs = $rofs $rofst rwfs = $rwfs $rwfst if grep -w debug-init-sh $optfile then - debug_takeover "Debug initial shell requested by command line." + if grep -w enable-initrd-debug-sh "$optfile" + then + debug_takeover "Debug initial shell requested by command line." + else + echo "Need to also add enable-initrd-debug-sh for debug shell." + fi fi if test "x$consider_download_files" = xy && @@ -394,7 +406,7 @@ then Mounting read-write $rwdev filesystem failed. Please fix and run mount $rwdev $rwdir -t $rwfst -o $rwopts -to to continue, or do change nothing to run from RAM for this boot. +or perform a factory reset with the clean-rwfs-filesystem option. HERE debug_takeover "$msg" fi @@ -411,7 +423,7 @@ do Unable to confirm /sbin/init is an executable non-empty file in merged file system mounted at /root. -Change Root test failed! Invoking emergency shell. +Change Root test failed! HERE debug_takeover "$msg" done |