Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Mar 2006 17:19:45 -0500
From:      "Bob Johnson" <fbsdlists@gmail.com>
To:        "James Long" <list@museum.rain.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: coming back up after power failure (UPS)
Message-ID:  <54db43990603091419n73d44758ne475fc920848e43c@mail.gmail.com>
In-Reply-To: <20060309200708.GA15255@ns.museum.rain.com>
References:  <20060309174609.GA14114@ns.museum.rain.com> <MIEPLLIBMLEEABPDBIEGKEBHHEAA.fbsd_user@a1poweruser.com> <20060309200708.GA15255@ns.museum.rain.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 3/9/06, James Long <list@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54db43990603091419n73d44758ne475fc920848e43c>