How to reboot from start scripts?

Josef Wolf jw at raven.inka.de
Mon Oct 8 22:30:58 UTC 2007


Thanks for your answer, Derek!

On Mon, Oct 08, 2007 at 05:28:38PM -0300, Derek Broughton wrote:
> Josef Wolf wrote:
> > On Wed, Sep 12, 2007 at 05:42:21PM +0200, Josef Wolf wrote:
> >> On Wed, Sep 12, 2007 at 09:37:29AM -0500, glenn opdycke-hansen wrote:
> >> > Another option (to reboot) is to Ctl-Alt-Backspace to shut down
> >> > XWindows. Than should bring up a logon screen where you can select
> >> > reboot.
> >> 
> >> I just tried and noticed that ctrl-alt-backspace is even worse:
> >> 
> >> I forced /etc/init.d/checkfs.sh to notice a problem on the root partition
> >> and throw me into a root shell to fix that problem.  From that shell,
> >> I pressed C-A-D.  See what happened:
> >> 
> >> The boot seems to continue and finally X11 is started up.  I switch
> >> back to vterm1 with CTRL-ALT-F1 and see the login prompt.  But when I
> >> try to login on vterm1, I notice that the root shell is still running
> >> and tries to execute my login name as a command!  That means that login
> >> and shell were racing for terminal input from vterm1.
> 
> This looks bad...

Fine that you agree in this aspect :)

> >> Next, I pressed CTRL-D several times to get rid of the shell.  Surprise:
> >> as soon as the shell exits, fsck on the remaining disks start to run!
> >> 
> >> That means, ctrl-alt-del started up into multiuser mode while not even
> >> all filesystems were checked/mounted.  I consider this to be a very
> >> strange behavior which is far from what I would have expected.
> 
> While you've definitely got problems here, this _is_ what I expect.

Ough... Really?

> Given that we can't find any way to actually reboot from inside the
> single-user mode, exiting, ctrl-alt-del, "init N", shutdown, or anything
> else you can think of is going to have the same result, and one of the
> results of exiting the single-user shell is that all of the secondary
> partitions (ie, not /) get fscked (at least, if fsck is required) on entry
> to runlevel 2. 

So there is really no way to properly shutdown/reboot from single-user
mode?




More information about the ubuntu-users mailing list