Disclaimer: This article may contain information about third-party products. Such information is for reference only. Alibaba Cloud does not make a guarantee in any form of the performance and reliability of the third-party products, and potential impacts of operations on these products.
This topic describes how to configure CentOS instances in single-user mode.
Take note of the following items:
- Before you perform high-risk operations such as modifying the specifications or data of an Alibaba Cloud instance, we recommend that you check the disaster recovery and fault tolerance capabilities of the instance to ensure data security.
- Before you modify the specifications or data of an Alibaba Cloud instance, such as an Elastic Compute Service (ECS) instance or an ApsaraDB RDS instance, we recommend that you create snapshots or enable backups for the instance. For example, you can enable log backups for an ApsaraDB RDS instance.
- If you have granted specific users the permissions on sensitive information, such as usernames and passwords, or submitted sensitive information in the Alibaba Cloud Management Console, we recommend that you modify the sensitive information at the earliest opportunity.
Sometimes you need to enter the CentOS single-user mode to perform some special operations. the alibaba cloud server is based on the cloud platform. to enter the single-user mode, you need to modify the parameters of grub to enter successfully. you can perform the following steps.
Note:
- If you cannot log on to the system to modify the
/etc/grub.conf
configuration file, you can only quickly connect to the instance through VNC when you restart the ECS instance, and then press the e key.- The configurations and descriptions in this topic have been tested in the CentOS 6.9 operating system. Configurations may vary in other types and versions of operating systems. For more information, see the official documentation of the corresponding operating system.
/etc/grub.conf
configuration file and increase the value of the timeout parameter in the configuration file to 60 seconds.
vim /etc/grub.conf
root=UUID=XXX
, enter a single init=/bin/bash
on the right, and click the Enter key. Note: After you enter the single-user mode, you will wait about ten minutes when you restart the console.