By default, ubuntu12.04 does not configure the automatic restart and dump of kernel crashes. When a kernel crash occurs, there is no core dump file to analyze, and it is stuck on the kernel crash interface. In order to find the cause of the kernel crash, you need to configure the automatic restart of the kernel crash. And kernel dump configuration, the configuration steps are as follows:
The first step is to configure the kernel to restart automatically when it crashes
Add kernel.panic to the kernel parameter, 10 means the system will automatically restart after 10 seconds of kernel crash
vi /etc/sysctl.conf
kernel.panic =10
The second step is to verify whether the automatic restart mechanism takes effect, and sysrq needs to be configured
Add kernel.sysrq to the kernel parameters, 1 is effective
vi /etc/sysctl.conf
kernel.sysrq =1
Run the command to make the configured parameters take effect, or restart the system
sysctl -p /etc/sysctl.conf
Check whether the configured parameters are valid
Simulate system kernel crash, press alt+sysrq+c at the same time, or run the following command
echo c >/proc/sysrq
Watch to see the kernel crash, and count down to restart
The third step is to configure kernel dump
The newly installed system needs to be upgraded, otherwise the software cannot be installed through apt-get
apt-get update
Install kernel dump
sudo apt-get install linux-crashdump
Check whether it works
Test, simulate system kernel crash, press alt at the same time+sysrq+c three keys, or run the following command
It was found that the system crashed and got stuck, did not send or save, and did not restart!
After searching for information, sending such a situation may be related to the core dump memory configuration is not enough, so the core dum memory configuration is modified
Modified to 512M size
Regenerate grub.cfg
Test again and succeed.
Recommended Posts