coming back up after power failure (UPS)

Bob Johnson fbsdlists at gmail.com
Thu Mar 9 22:21:17 UTC 2006


On 3/9/06, James Long <list at museum.rain.com> wrote:
>
> You missed the point.
>
> If the system does NOT power itself down, but instead sits at the
> "press any key to reboot" prompt, then playing with the NUT configuration
> isn't going to improve anything in cases where power returns before
> batteries are drained.  The OP would have to troubleshoot his inability
> to get the machine to power off upon a line outage, which it appears
> he has done.

To extend on what you said:  after the PC shuts itself down, the UPS
is still providing power.  If the UPS returns to line power before the
UPS shuts down, the PC BIOS never sees a power down event, so it
doesn't know to turn the system back on.

One solution to this is as follows:
-  When the UPS believes it is about to run out of battery power and
shut down, the OS shuts down to single user mode and starts a script
that will reboot the  system in five minutes (or long enough to be
sure the batteries will run down first).
- If the UPS does shut down, when power is restored, the BIOS will
detect the event and power up the PC normally.  It will boot as
normal.
- If the UPS never shuts down (because line power is restored) the
script eventually times out and reboots the system anyway.

I tried to make this work a few years ago, but could find no way to
start a script after shutting down to single user mode.   I posted a
query about it but got no replies, so I quit worrying about it.  I've
since seen some hint that it is now possible to do that, but I didn't
follow it up.  Can anyone tell me how to do that?

Another solution is a UPS that always shuts down after it has notified
the host OS that it needs to do so, but that's not something NUT can
count on.

- Bob


More information about the freebsd-questions mailing list