Solved Unable to shutdown

Hello,

//edit: Thanks for clarification, had only experience on a different system and didn't consider it at all working this way with arguments, else going to runlevel 1


my problem seems desktop independent, occurs in tty like in xfce, after running
"shutdown now" in tty or term in xfce (buttons are grayed out) and expecting normal shutdown,
I get thrown into tty with a confirmation, that is looking like:



*** FINAL System shutdown message from user@bsd ***
System going down IMMEDIATELY
timestamp bsd shutdown[pid]: shutdown by user:
Stopping cron.
(+power and devd)
Waiting for pids yada yada
Writing entropy file:
Writing early boot entropy file: .

Terminated
timestamp bsd syslogd: exiting on signal 15
wlan0: link state changed to DOWN
Enter full pathname of shell or RETURN for /bin/sh:
root@bsd:

going full circle...
Before I troubleshoot myself into the head, how should i approach this?
Or maybe even someone knows an easy solution

Sorry for all inconvenience of reading.
 
"shutdown now"
The correct command would be shutdown -p now. The -p is important.

Code:
     -p      The system is halted and the power is turned off (hardware
             support required, otherwise the system is halted) at the
             specified time.
If you don't supply an option you will get dropped to single user mode, instead of shutting down and/or powering off. See shutdown(8).
 
disconix did you try using `poweroff` without any parameters? SirDice what would happen if I use it without any parameters?

I used "shutdown now", what I was used from my only other unix like arch system and never gave a single thought. It shuts down arch and puts BSD into root shell tty, that confused me.
In retrospect a stupid problem, "shutdown" alone would have hinted to the correct solution and the obvious poweroff seems to link to it.
I hope my next audio problem will be as simple to solve haha...
 
else going to runlevel 1
There are no runlevels on BSD. It runs in single-user or multi-user mode. Runlevels are a System V-style of initialization. Linux used it too, until it mostly got replaced by systemd.

"shutdown" alone would have hinted to the correct solution
It does?
Code:
root@fbsd-test:~ # shutdown
usage: shutdown [-] [-c | -h | -p | -r | -k] [-o [-n]] time [warning-message ...]
       poweroff
Or were you expecting a screen full explanation of the options? That's what man pages are for.

And reading shutdown(8) it states:
Code:
     When run without options, the shutdown utility will place the system into
     single user mode at the time specified.

had only experience on a different system
That's fine. Just remember there are lots of subtle, and sometimes not so subtle, differences with every UNIX(-like) system. A common pitfall is assuming they are all the same.
 
There are no runlevels on BSD. It runs in single-user or multi-user mode. Runlevels are a System V-style of initialization. Linux used it too, until it mostly got replaced by systemd.
Frankly, I do not know what "runlevel 0" means and associated it only with "main root shell" and "single user environment", similarly my knowledge does not allow me to differentiate between sysd, sysinit, sysv or whatever they are called.

I'll gladly learn, just haven't made it to chapter 15 of the Handbook.

Or were you expecting a screen full explanation of the options? That's what man pages are for.
"shutdown" alone would have hinted to inproper/differentiating usage (as this command starts a timer on my other system), while "shutdown now" just put me into root shell over and over.
A common pitfall is assuming they are all the same.
It is emberassing but great, because easily solveable by learning.
 
hruodr Well, I have been using `poweroff` without any issues since more than a decade now. As according to the man pages calling "poweroff" is equivalentto running "shutdown -p now" , I am too lazy to change my established (long term) methods. 😁

disconix if you want to enable the greyed out buttons, you can add your user to "operator" group (or wheel I think), that would give them authority to shut down the system.
 
Back
Top