Updated on 2022-07-13 GMT+08:00
How Do I Change the Kernel Version of CentOS 7 BMSs?
Scenarios
Some special software runs properly only on specified Linux kernel versions. This section describes how to change the kernel version.
Solution
- Log in to the BMS OS.
- Run the following command to check the current kernel version:
[root@xxxxxx~]# uname -r 3.10.0-327.22.2.el7.x86_64
- Run the following command to check the number of kernels in the OS:
cat /boot/grub2/grub.cfg | grep menuentry
[root@xxxxxx~]# cat /boot/grub2/grub.cfg | grep menuentry if [ x"${feature_menuentry_id}" = xy ]; then menuentry_id_option="--id" menuentry_id_option="" export menuentry_id_option menuentry ´CentOS Linux (3.10.0-327.22.2.el7.x86_64) 7 (Core)´ --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option ´gnulinux-3.10.0-327.el7.x86_64-advanced-80b9b662-0a1d-4e84-b07b-c1bf19e72d97´ { menuentry ´CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)´ --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option ´gnulinux-3.10.0-327.el7.x86_64-advanced-80b9b662-0a1d-4e84-b07b-c1bf19e72d97´ { menuentry ´CentOS Linux (0-rescue-7d26c16f128042a684ea474c9e2c240f) 7 (Core)´ --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option ´gnulinux-0-rescue-7d26c16f128042a684ea474c9e2c240f-advanced-80b9b662-0a1d-4e84-b07b-c1bf19e72d97´ {
- Run the following command to set the kernel that is started by default, for example, CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core):
grub2-set-default "CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)"
- Run the following command to check the kernel that is started by default:
[root@xxxxxx~]# grub2-editenv list saved_entry=CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)
- Restart the BMS, enter its OS, and run the command in step 2 to check whether the kernel has been changed.
[root@xxxxxx~]# uname -r 3.10.0-327.el7.x86_64
Parent topic: OS FAQ
OS FAQ FAQs
- Can I Install or Upgrade BMS OSs by Myself?
- Can the BMS OS Be Replaced?
- Is a GUI Provided for BMS OSs?
- Is an Upload Tool Delivered with BMS OSs?
- Does the Public Image Used to Create a BMS Have a Swap Partition?
- How Do I Configure the Static Host Name of a BMS?
- How Do I Set the Password Validity Period?
- How Do I Set SSH Configuration Items?
- How Can I Handle the Eight-Hour Difference Between the Windows BMS and Local Time
- How Do I Change the SID of a Windows Server 2012 BMS?
- How Do I Change the Kernel Version of CentOS 7 BMSs?
- How Do I Reserve Log Space If the Root Partition Automatically Expands Disks?
- How Do I Roll Back the Kernel Version If I Mistakenly Upgrade the Kernel?
- How Do I Increase the Swap Partition Size?
- How Do I Increase the Size of the Root Partition of a BMS Which Is Quickly Provisioned?
- Common Linux Commands
- How Do I Update the Disk Metadata After the LVM Volume Is Remounted?
- How Do I Handle a Network Failure After Services Are Switched from a Windows BMS Booted from an EVS Disk to an HA BMS?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbotmore