- What is kernel panic?
When the kernel can’t load properly or “freaks out” and fails to boot properly or crashes(see edit credit at the bottom).
- Why it occurs?
Hosed updates, failing hardware, unsupported hardware, failed or missing drive or partition (see edit credit at the bottom)
- How can I understand kernel panic occurred?
Watch boot prompts(turn off quiet kernel parameter) OR your machine fails to boot
- What effect it has on system?
Failure to boot or system crash
- Does it only occur in Linux?
No, all unix-like operating systems can have kernel panics. It’s the equivalent of a Windows Blue Screen of Death
- How can I prevent it?
It normally doesn’t happen. Test updates and troubleshoot the problem. Use stable instead of development branches.
If you want the server to get rebooted automatically after kernel hit by a pain error message, try adding panic=N to /etc/sysctl.conf file.
It specify kernel behavior on panic. By default, the kernel will not reboot after a panic, but this option will cause a kernel reboot after N seconds. For example following boot parameter will force to reboot Linux after 10 seconds.