Delete unnecessary kernel after Centos update

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.