Comment 4 for bug 476161

Revision history for this message
Luke (lukekuhn) wrote : RE: [Bug 476161] A workaround for no recovery shell

I have written a workaround for any of the various "no recovery shell" bugs. It's not perfect as you have to reboot in single-suer mode to use it(and again for a root filesystem error correction), but it allows you to recover without booting from another device. It looks for the word "single" on /proc/cmdline, and if it is present stops mountall, opens a recovery shell, and restarts mountall on exiting the shell. It basically does what mountall-shell.conf would do if it caught the stopped mountall signal.

Cut and paste the text below, save it as "recovery-shell.conf" and drop it into /etc/init .

# Recovery shell-opens shell BEFORE Mountall starts
author "Luke"
description "Bugfix-Recovery shell for single user mode,to recover from failed boots"

start on startup

task
console owner

script
        if test $(grep single /proc/cmdline | head -c 4) ; then

        initctl stop mountall
        usplash_write "QUIT"
        setupcon
    echo "A Root Shell will now be started for recovery."
        sulogin
        exec start --no-wait mountall
        fi
end script

_________________________________________________________________
Windows 7: Unclutter your desktop.
http://go.microsoft.com/?linkid=9690331&ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen:112009