LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-06-2006, 07:54 PM   #1
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 43
reboot after power failure?


Ok,


I did a search both here and google and couldnt find an answer that made sense...


How can I make my linux box reboot when the powerfails? I live in an area where the power often blinks out for a second, causing my computers to turn off.. I am looking for a way to have them automatically reboot when the power comes back on. They are not on UPS.


I found this in /etc/inittab but I'm not sure exactly what to change or if it would even work if I did change it.



# What to do when the power fails/returns.
pf:owerwait:/etc/init.d/powerfail start
pn:owerfailnow:/etc/init.d/powerfail now
po:owerokwait:/etc/init.d/powerfail stop


Thanks!
 
Old 04-06-2006, 09:12 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,969

Rep: Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752
AFAIK the powerfail etc commands are base on status signals from a UPS.
BTW Power sags and dropouts can be bad for computers and I suggest getting a UPS.
I do not know if this is possible with a regular PC.
 
Old 04-06-2006, 09:51 PM   #3
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
On most computers, you can select their "power on" status. However, this has absolutely nothing to do with Linux and everything to do with your BIOS. Consult your BIOS documentation for details.
 
Old 04-07-2006, 08:54 PM   #4
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Original Poster
Rep: Reputation: 43
ok, thanks for the responses.
 
Old 04-07-2006, 09:20 PM   #5
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,020

Rep: Reputation: 309Reputation: 309Reputation: 309Reputation: 309
Quote:
Originally Posted by ncsuapex
I live in an area where the power often blinks out for a second, causing my computers to turn off.
I would suggest that if this describes your power situation, the last thing you want to do is have them automatically reboot. Yanking the power out from under a running Linux is not the best thing in the world (not for any OS), but having the OS automatically bounce up and down like a crazed basketball during your frequent power outages is not the best way to deal with the situation. I can imagine your poor computer crashing, automatically coming back up, start cleaning up the carnage with an fsck, and then crashing again in the middle of that operation due to another power failure. Gives me the willeys just thinking about it.

If you need your computers to be available, buy a UPS. They really don't cost that much. You can get by with one of lower reserve capabilities by not plugging your monitor into a battery outlet (plug it into one of the UPS's surge-only outlets.) If you really want to ping-pong the poor thing, BIOS is where you can set this up, as others have said.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
need my mac G4 to reboot after power failure bioalchemist Linux - General 1 12-27-2005 05:46 PM
Power Failure On AC power ONLY Gateway 5300 marti35 Linux - Laptop and Netbook 1 05-22-2005 10:14 AM
rc.local and power failure omnia Red Hat 2 01-04-2005 10:40 AM
power failure = no root tobysaville Linux - General 1 06-22-2004 06:39 AM
Crash after power failure deesto *BSD 8 07-29-2003 01:11 PM


All times are GMT -5. The time now is 09:13 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration