Delete unnecessary kernel after Centos update
Today, my friend opened a virtual machine on his server to play with me. I told him to install Centos 7.0. Yum update-y, which is the habit of getting it, is a tragedy .. I don't know if I was restarted by a friend during the update process. As a result, my updates are incomplete. An additional option is displayed on the boot screen after the instance is restarted.
By default, the virtual machine is the first option. As a result, the machine cannot be turned on. After a friend restarts the instance, the system enters the 2nd option and starts the instance successfully. Later, Baidu found a solution, that is, to delete the 1st options (if not deleted, manually select the 2nd options for each restart in the future. This is the server, it's impossible for someone to watch it all day)
The method is as follows:
1. First, list the kernels in use in the system:
Uname-
2. query all the kernels in the system
Rpm-qa | grep kernel
3. Delete the kernel you want to delete (for example, in my system, I want to delete the kernel-3.10.0-229.4.2.el7.x86_64 kernel, need to delete all the words containing the kernel-3.10.0-229.4.2.el7.x86_64)
Yum remove kernel-3.10.0-229.4.2.el7.x86_64Yum remove kernel-tools-libs-3.10.0-229.4.2.el7.x86_64
Restart the computer after deletion.Reboot
If the instance is successfully restarted, the deletion is successful. Ask a friend to check the restart options and restore them to their original state.