PDA

View Full Version : Problem shutting down


dennylin93
December 17th, 2008, 15:47
I just installed FreeBSD, and it doesn't shutdown properly. Whenever I enter "shutdown now", the system runs and "Enter full pathname of shell or RETURN for /bin/sh" appears. Is there a way to fix this? It doesn't appear when I enter "reboot" though.

DutchDaemon
December 17th, 2008, 15:58
Use shutdown -p now.

sverreh
December 17th, 2008, 15:59
I'm not sure, but maybe it helps to use the -h option (and possibly also -o)?

Oh, yes: and if your hardware supports it, do as DutchDaemon and SeanC propose:
-p

SeanC
December 17th, 2008, 16:02
Use -p or -h option.

http://www.freebsd.org/cgi/man.cgi?query=shutdown&manpath=FreeBSD+7.0-RELEASE

dennylin93
December 17th, 2008, 16:15
Thanks. "shutdown -p now" works.

SirDice
December 18th, 2008, 11:30
"Shutdown now" actually switches the machine to single user mode. Hence the prompt for a shell.

SeanC
December 18th, 2008, 15:12
"Shutdown now" actually switches the machine to single user mode. Hence the prompt for a shell.

Really? I didn't know that. Is it documented somewhere?

DutchDaemon
December 18th, 2008, 15:18
Not really clearly ... tucked away in shutdown(8), and not really referring to command-line options

Corresponding signal is then sent to init(8) to respectively halt, reboot or bring the system down to single-user state (depending on the above options).

The absence of options (i.e. a single 'shutdown') is not discussed.

lme@
December 19th, 2008, 12:10
It is documented here:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/book.html#BOOT-SINGLEUSER

DutchDaemon
December 19th, 2008, 13:41
Should find its way into the man page, really ..

lme@
December 19th, 2008, 17:38
Should find its way into the man page, really ..

Please file a PR (http://www.freebsd.org/doc/en_US.ISO8859-1/articles/problem-reports/article.html) for this. :)

DutchDaemon
December 19th, 2008, 18:04
Actually did ;)

P.S.: update Dec 23: the requested explanation about omitting command-line switches has been added to man 8 shutdown.

bsddaemon
December 19th, 2008, 20:25
It is documented here:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/book.html#BOOT-SINGLEUSER

Im just wondering, if the console marked as insecure, in case I forgot root password, how can I recover then?

In /etc/ttys file:

console none unknown off insecure

lme@
December 20th, 2008, 19:24
Im just wondering, if the console marked as insecure, in case I forgot root password, how can I recover then?

In /etc/ttys file:

console none unknown off insecure


Then you need to boot with a liveCD and set a new password.

DutchDaemon
April 1st, 2009, 09:29
shutdown(8) with proper explanation of 'shutdown now' has been MFC'd to FreeBSD6 and FreeBSD7.
http://svn.freebsd.org/viewvc/base?view=revision&revision=190605

tangram
April 1st, 2009, 15:58
Though not directly connected to the post...

If your are lazy add a nice alias for poweroff.

For csh/tcsh shell add this to your .cshrc file and source it:
alias poweroff 'shutdown -p now'

To source it:
source ~/.cshrc

To all users to shutdown add them to the operator group:
pw groupmod operator -m username