HOW-TO restart automatically on Linux Kernel Panic if hanging on boot
Other faq items
HOW-TO setup Plesk with Samba Share and OpenVPN on CentOS 15 April 2010
HOW-TO - Not get Plesk Certificate Error or get rid off "This Connection is Untrusted" message. 23 March 2010
HOW-TO configure PLESK with NGinx (proxy reverse) 15 March 2010
HOW-TO install ffmpeg, Mplayer, mencoder,FLVtool2 and Yamdi on Plesk Linux based server 25 September 2009
Web Site hacked, iframe inserted, where to start? 10 August 2009
Spam blacklist unlisting from sorbs.net 31 July 2009
How to find out PLESK admin password? 12 July 2009
Plesk 9.2.x - Postfix SMTP authentication error 16 May 2009
Automated Remote FTP Backup shell script 26 October 2008
I’ve experienced that when wanting to restart the system (Linux) this has blocked when booting, having a Kernel Panic.
The solutions were rather bizarre, I had to call the datacenter or to appeal to ticketing system, because none of the provider’s restarts helped (from interface – Ctrl+Alt+Del or Hardware Reboot).
I’ve recently found a solution to solve the problem. The provider offers the solution to restart the server in Rescue Mode, that means that it boots my system with another linux, having my partition separately that I can set up and solve some of the problems, like Kernel Panic.
In this case (Kernel Panic) at restart in Rescue Mode, I set up my drive and edit grub.conf than set the old kernel. Usually Kernel Panic happens at a kernel update.
But how do I activate the automatic reboot of kernel panic? This was the initial question, because I do not want all the time to call the datacenter. I edit grub.conf and put in the kernel line a parameter.
kernel /vmlinuz-188.8.131.52-1.art.x86_64 ro root=/dev/md2 vga=0x317 selinux=0 panic=5
You can see in the line above that selinux is deactivated (an another trick) and in case of panic it restarts in 5 seconds.
Now, if you have kernel panic and it restarts, you should have a restart loop rather than restricted access to the whole system. This way you activate rescue mode and you also can troubleshoot.