Disclaimer: this document may contain information about third-party products that are for reference only. Alibaba Cloud does not make any guarantee, express or implied, with respect to the performance and reliability of third-party products, as well as potential impacts of operations on the products.
This article describes how to modify the boot sequence of the Linux kernel.
Alibaba Cloud reminds you that:
- If you have any risky operations on an instance or data, pay attention to the disaster tolerance and fault tolerance capabilities of the instance to ensure data security.
- If you modify the configuration and data of an instance (including but not limited to ECS and RDS), we recommend that you create snapshots or enable RDS log backup.
- If you have granted permissions on the Alibaba Cloud platform or submitted security information such as the logon account and password, we recommend that you modify the information as soon as possible.
Related configurations and descriptions in this article have been tested in CentOS6.X and centos7.0. The operating system configurations of other types and versions may be different. For more information, see the official documentation of the operating system.
/etc/grub.conf
confirm the system kernel. The following figure shows that the system has two kernels. The kernel versions from top to bottom are 2.6.32-573.18.1.el6.x86 _64 and 2.6.32-431.23.3.el6.x86 _64 respectively.
CentOS7 uses grub2 as the bootstrapper and therefore differs from CentOS6. /etc/grub.conf
to adjust startup items.
cat /boot/grub2/grub.cfg |grep menuentry
grub2-set-default “CentOS Linux (3.10.0-123.9.3.el7.x86_64) 7 (Core)"
grub2-editenv list