From owner-freebsd-questions@FreeBSD.ORG Thu Mar 9 22:21:16 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E106316A420 for ; Thu, 9 Mar 2006 22:21:16 +0000 (GMT) (envelope-from fbsdlists@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F3B443D48 for ; Thu, 9 Mar 2006 22:21:16 +0000 (GMT) (envelope-from fbsdlists@gmail.com) Received: by xproxy.gmail.com with SMTP id h31so405287wxd for ; Thu, 09 Mar 2006 14:21:15 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=anrEu9B9eNMl8We3EBGWzFEVxeRYx7irGzPmUr5J6BN4oNKF/P4gJnwYNjGN5osRJ1oxEdme2T3vvcTeB1HDls0TRd8ct9fdy++Qr7VD4ARVlclO3CzLw5McEmEZZldxNGMahbeiNwQEJEAS2NhPoGJde4p3YYYQ6O/y+OsdH/0= Received: by 10.70.117.5 with SMTP id p5mr2775490wxc; Thu, 09 Mar 2006 14:21:15 -0800 (PST) Received: by 10.64.150.10 with HTTP; Thu, 9 Mar 2006 14:19:45 -0800 (PST) Message-ID: <54db43990603091419n73d44758ne475fc920848e43c@mail.gmail.com> Date: Thu, 9 Mar 2006 17:19:45 -0500 From: "Bob Johnson" To: "James Long" In-Reply-To: <20060309200708.GA15255@ns.museum.rain.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20060309174609.GA14114@ns.museum.rain.com> <20060309200708.GA15255@ns.museum.rain.com> Cc: freebsd-questions@freebsd.org Subject: Re: coming back up after power failure (UPS) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Mar 2006 22:21:17 -0000 On 3/9/06, James Long 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