kernel automatically restart if there is a panic
I've never actually seen a kernel panic, but I do understand that some sort of message is printed on the screen. What I am wondering is if there is a way to have the function that displays the 'kernel panic' message, call the kernel/BIOS function that does a hard reboot of the computer?
The kernel has a function that tells the BIOS to restart, so that function should still be callable from the kernel panic function, right. Is there an existing patch for doing this? |
Do you think that would be a good idea? How would you intervene to boot from a rescue floppy, or change the command line that lilo or grub feeds to the kernel if you could not stop the cycle?
Cheers-- Charles |
Once I stupidly set my initdefault to 6, which means that the first thing that the kernel does after booting is reboot. I watched my machine boot up, shutdown, boot up, shutdown... in a complete panic for several minutes before I powered off and then booted a rescue CD to begin diagnosing the problem.
I think that a kernel panic reboot would create the same sort of loop. |
A loop would be caused if the kernel panics when it boots up.
I'd be interested in using such a kernel to run servers that I would like to automatically restart if there is a kernel panic once they are running, in order to increase reliability, so that they can be run for a very long time without maintenance from a technician. I doubt these systems would have a kernel panic while they are booting up, but the solution to that problem would be to a have a special system call that must be called in order to enable this special patch (not restart, but enable restarting in the event of a kernel panic), with this new syscall only being called once the system is up and running and therefore doesn't have memory problems or other issues that can cause a kernel panic while the kernel is loading. |
All times are GMT -5. The time now is 05:08 AM. |