hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Web Hosting Talk Tutorials : Hosting Security and Technology Tutorials : Linux Tip: Auto Reboot after Kernel Panic
Reply

Forum Jump

Linux Tip: Auto Reboot after Kernel Panic

Reply Post New Thread In Hosting Security and Technology Tutorials Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 07-15-2005, 05:42 PM
MaB MaB is offline
Web Hosting Master
 
Join Date: Oct 2001
Posts: 1,248

Linux Tip: Auto Reboot after Kernel Panic


I thought I'd share this little known trick that I discovered while reading through parts of the linux kernel...

Linux has the ability to automatically reboot after a kernel panic, it goes as follows

Assuming you use lilo, edit the /etc/lilo.conf file
under your current (and future) boot images, add the line:
append="panic=15"

Then reload lilo by running /sbin/lilo

And next time you have a kernel panic (heaven forbid!) it should reboot after 15 seconds!

Enjoy.

__________________
Avi Brender
Reliable Web Hosting by Elite Hosts, Inc
CPANEL Reseller Hosting - Fantastico - Rvskins - ClientExec




Sponsored Links
  #2  
Old 07-15-2005, 06:15 PM
Bashar Bashar is offline
Retired Moderator
 
Join Date: Jul 2002
Location: Kuwait
Posts: 10,572
Thanks

Moved To Technical & Security Tutorials Forum

  #3  
Old 07-15-2005, 09:08 PM
heymar heymar is offline
Junior Guru Wannabe
 
Join Date: Jun 2005
Posts: 40
Great tip!
Thank's!

Sponsored Links
  #4  
Old 07-16-2005, 02:36 PM
SmartTux SmartTux is offline
Junior Guru
 
Join Date: Dec 2004
Posts: 223
Excellent! Thanks for that..

What about grub??

  #5  
Old 07-16-2005, 02:57 PM
heymar heymar is offline
Junior Guru Wannabe
 
Join Date: Jun 2005
Posts: 40
Quote:
Originally posted by SmartTux
Excellent! Thanks for that..

What about grub??
Sample:
kernel /vmlinuz-2.6.11 root=/dev/md0 ro panic=15

  #6  
Old 07-16-2005, 09:25 PM
MaB MaB is offline
Web Hosting Master
 
Join Date: Oct 2001
Posts: 1,248
PS - you can also do the following:

echo 60 > /proc/sys/kernel/panic

that will have your server reboot 60 seconds after a panic. That must be done after each reboot, so you can add that line in /etc/rc.d/rc.local

This is an alternate way if you don't want to mess with GRUB or lilo.

__________________
Avi Brender
Reliable Web Hosting by Elite Hosts, Inc
CPANEL Reseller Hosting - Fantastico - Rvskins - ClientExec


  #7  
Old 07-17-2005, 11:06 PM
funkytaco funkytaco is offline
Web Hosting Guru
 
Join Date: Mar 2005
Posts: 290
Quote:
Originally posted by heymar
Sample:
kernel /vmlinuz-2.6.11 root=/dev/md0 ro panic=15
Why are you using a read-only flag (ro)?

OT: Congrats on 1000 posts, MaB!

  #8  
Old 08-25-2005, 04:15 PM
Sheps Sheps is offline
Community Guide
 
Join Date: Dec 2002
Location: The Shadows
Posts: 2,901
It needs to mount the drives read-only before it mounts it write... Well, need isn't the correct word, "likes" is probably a better word.

Mounting read-only prevents any programs starting from writing to the disk before it is ready.

__________________
Dan Sheppard ~ Freelance whatever

  #9  
Old 08-26-2005, 08:02 PM
pycoder pycoder is offline
Aspiring Evangelist
 
Join Date: Nov 2002
Location: Los Angeles, CA
Posts: 412
Nice and simple. I like that

Reply

Related posts from TheWhir.com
Title Type Date Posted
Google Compute Engine Expands OS Support, Lowers Prices in General Availability Web Hosting News 2013-12-03 13:08:34
Linux Kernel 3.10 Sees Most Developer Contributions Ever Web Hosting News 2013-09-16 13:17:24
UK Tech Blog Challenges CloudFlare, Web Hosts on Free Speech Blog 2013-08-12 10:32:52
HybridCluster Details Super Dense Auto-Scaling Platform Features Web Hosting News 2013-05-28 16:59:20
The Linux Foundation Partners with Xen for Open Source Cloud Project Web Hosting News 2013-04-15 15:19:00


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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 Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?