If your machine is in remote location and you want the machine to get restarted automatically when the machine hits kernel panic. Then add this line to the /etc/sysctl.conf. After 10 sec delay m/c will be rebooted.
kernel.panic = 10
Enable sysrq keys
By default it is not enabled on many Linux distributions. Add or modify following line (as soon as new Linux system installed) /etc/systctl.conf:
Save and close the file and reboot system to take effect
How do I use the magic SysRq keys in emergency?
You need to use following key combination in order to reboot/halt/sync file system etc:
The ‘SysRq’ key is also known as the ‘Print Screen’ key. COMMAND-KEY can be any one of the following (all keys need to hit simultaneously) :
* ‘b’ : Will immediately reboot the system without syncing or unmounting your disks.
* ‘o’ : Will shutdown your system off (if configured and supported).
* ’s’: Will attempt to sync all mounted filesystems.
* ‘u’ : Will attempt to remount all mounted filesystems read-only.
* ‘e’ : Send a SIGTERM to all processes, except for init.
* ‘h’: Show help, indeed this the one you need to remember.
So whey you need to tell your Linux computer to reboot or when your X server is crashed or you don’t see anything going across the screen then just press:
ALT+SysRQ+s : (Press and hold down ALT, then SysRQ (Print Screen) key and press ’s’) -Will try to syn all mounted system
ALT+SysRQ+r : (Press and hold down ALT, then SysRQ (Print Screen) key and press ‘r’) -Will reboot the system.
If you wish to shutdown the system instead of reboot then press following key combination: