I always shut down the system with
halt, which is the equivalent of
shutdown -h now. On every linux system I've ever used, including up until recently the pi, this halts the system and turns off the power if the hardware is capable.
On the pi -- again, up until recently -- it just shuts the system down so that the power can be unplugged. I generally leave it on 24/7, but occasionally I want to disconnect it from power to tinker or whatever. Sometime in the past few months, I noticed that it was rebooting immediately, and I kind of shrugged it off; I have an 8x8 LED attached as a system monitor, so I'd wait until it signaled runlevel 0 had run then yank the cord.
That's not really ideal IMO, and I am absolutely completely totally positive it was not doing this until recently; I've had the pi for the better part of a year.
I just spent some time using
shutdown with various switches (
-n) and combinations of switches, and none of them will halt the system without triggering an immediate reboot.1
My first thought is that something is causing a quick voltage drop and that triggers the reboot, but that's just a thought. So my questions are:
Has anyone else noticed this?
Does anyone have any idea about why it would happen? A recent firmware update? [As it turns out, I hadn't been updating the firmware -- see my answer].
1 Correction :
shutdown -fn now will halt it, although this means skipping the init scripts intended to stop services correctly (BTW I don't see anything in
/etc/rc0.d that would cause the reboot) and mysteriously leaves the board's ethernet lights on, presumably because the networking service was not properly stopped.