Results 1 to 9 of 9
  1. #1
    Join Date
    Oct 2001
    Posts
    1,261

    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

  2. #2
    Join Date
    Jul 2002
    Location
    Kuwait
    Posts
    10,572
    Thanks

    Moved To Technical & Security Tutorials Forum

  3. #3
    Great tip!
    Thank's!

  4. #4
    Join Date
    Dec 2004
    Posts
    223
    Excellent! Thanks for that..

    What about grub??

  5. #5
    Originally posted by SmartTux
    Excellent! Thanks for that..

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

  6. #6
    Join Date
    Oct 2001
    Posts
    1,261
    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. #7
    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. #8
    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. #9
    Join Date
    Nov 2002
    Location
    Los Angeles, CA
    Posts
    412
    Nice and simple. I like that

Related Posts from theWHIR.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •