PDA

View Full Version : [SOLVED] "shutdown now" does not shutdown



qajaq
March 6th, 2010, 03:18 PM
I've just installed the Ubuntu server 9.10. At one point in the course of configuring it, I decided to change the hardware on the machine, so I gave the command
# shutdown now
The system issues a notice that it's going down for maintenance NOW! Then it displays a series of notices about what processes it's stopping, and finally it offers a menu that looks something like this:


clean Try to make free space
dpkg Repair broken packages
grub Update grub bootloader
netroot Drop to root shell prompt with networking
root Drop to root shell prompt

<OK> <Cancel>

No matter which option I choose, the machine does not shut down. Eventually, every option leads to a reboot.

I've noticed this problem, too, when using the "shutdown now" command from the CLI in desktop versions (I've used 8.10 and 9.04), but I was always able to get around it by using the GUI shutdown button. But since the server version does not have a GUI, it's time for me to learn what's going on and how to make it different.

How do I shut down an Ubuntu machine from the CLI?

cgroza
March 6th, 2010, 03:21 PM
The right command is " shutdown -h now " , your command shuts down the system but it does not halt it.

lavy
March 6th, 2010, 03:23 PM
I don't know the problem but you might find a workaround using halt command.

lavy
March 6th, 2010, 03:25 PM
The right command is " shutdown -h now " , your command shuts down the system but it does not halt it.

Yes you are right I haven't notice that :)

qajaq
March 6th, 2010, 03:34 PM
Thanks, both of you. On my system, the -h argument didn't do what I wanted, but using your clue, I read the man-page and found that the -P argument is what does it.

NullHead
March 6th, 2010, 07:01 PM
If you're not doing this with ssh remote, you could always hard-off it with the sysrq key. It's a bit oldschool, but it works. :popcorn:

qajaq
March 6th, 2010, 07:36 PM
Yeah, Nullhead, I did that in order to shut down last night, but I was looking for the more elegant solution -- which was provided here. One of the things I love most about Linux and FOSS is the free sharing of expertise. Thanks!