43

I have a fresh installation of Ubuntu Server. "reboot" works, but shutdown fails on the * Killing all remaining processes... step. I am using:

sudo shutdown now

After the failure, indicated by [fail] (with "fail" in red), I get this message:

 * will now switch to single-user mode

with no other error messages. The user is root after the program exits.

Any ideas about how to trouble-shoot this, or what the problem might be?

The Ubuntu version is 11.10 and I ran sudo aptitude update && sudo aptitude dist-upgrade before this.

3
  • I am experiencing exactly the same issue. Commented Dec 28, 2011 at 22:28
  • See if this helps. it forced the shutdown, though the red "failed" didn't disappear.
    – user113733
    Commented Jan 15, 2012 at 13:53
  • Does the sudo poweroff make the problem go away?
    – pbies
    Commented Dec 5, 2013 at 13:43

3 Answers 3

38

I've experienced the same, so I had to use halt which worked

shutdown -h now
4
  • 3
    This may require sudo to run Commented Jan 20, 2012 at 1:20
  • Is there any explanation on why this is necessary? I have the above problem on a 13.10 distro and even the "shutdown -h now" variant does not work. The only way I can recover from this -- it seems -- is to reboot -f now but this skips the whole shutdown process and can't be good for the long-term health of the system.
    – ken
    Commented Nov 27, 2013 at 18:45
  • This works, though not really sure why the other one fails. Commented Dec 2, 2013 at 14:04
  • 1
    @user19726 - see other answers for why the simple shutdown "fails" (it is actually not failing, it is simply going to single user mode, rather than straight to halt condition).
    – qxotk
    Commented Mar 12, 2014 at 15:32
21

From the man pages of shutdown:

... runlevel 1 is used to put to system into a state where administrative tasks can be per- formed; this is the default if neither the -h or -r flag is given to shutdown."

shutdown shuts the system down from a user perspective, as linux is designed as a multi-user system, hence the system-wide message and optional time delay.

To shutdown the machine, use the -h option.

And I wouldn't worry about some processes that couldn't be killed in time, which is probably the meaning of the [fail] message you got.

1
  • As a total Noob to Linux, and seeking to up my skills, I prefer to be worried about anything that fails. I want to know Linux to the point where I can run in on the open public internet. That said, I voted for this answer: quotes the man page and explains the default behavior. I'm tempted to remove the "And I wouldn't worry..." at the end - what value does that add?
    – qxotk
    Commented Mar 12, 2014 at 15:27
7

I encountered this when trying to reboot with sudo reboot now. sudo shutdown now also failed. In both cases, the system switched to single-user mode and stalled.

Halting the system isn't feasible, since it is remote and I don't want to trek to the basement to turn it back on. What worked is sudo shutdown -r 0.

I'm running Ubuntu 13.04 server on an Asus Aspire One netbook.

I know this thread is old, but I'm experiencing this problem with a current distro.

3
  • 1
    Thanks for posting this: Ubuntu 13.04 refused to reboot properly without the shutdown -r 0 command.
    – ojdo
    Commented Sep 27, 2013 at 22:44
  • 1
    sudo shutdown -h -r worked for me, not sure on the differences.
    – Tracker1
    Commented Nov 19, 2013 at 22:01
  • Voted this up for adding perspective for the person running a physical not-nearby machine - not everyone is in a situation to turn the machine off - I am because: using a VM locally and in the cloud - both places where a machine can be turned off and started via locally available keyboard/cloud control panel.
    – qxotk
    Commented Mar 12, 2014 at 15:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .