tencent cloud

Cloud Virtual Machine

Release Notes and Announcements
Release Notes
Public Image Release Notes
Official End of Support Plan for the Operating System
Announcements
Product Introduction
CVM Overview
Strengths
Basic Concepts
Regions and Zones
Tutorial
Service Regions and Service Providers
Billing
Billing Overview
Billing Modes
Billing Items
Billing Mode Conversion Overview
Purchasing Instances
Configuration Adjustment Billing Guide
Overdue Payments
Getting Started
Purchasing a Customized Linux Instance
Purchasing a Customized Windows Instance
User Guide
Operation Guide Overview
Use Limits
Instances
Spot Instances
Reserved Instances
Images
Storage
Backup and Restoration
Network
Security
Passwords/Keys
Monitoring and Alarms
Ops Management
Convenience Features
Migrating a Server
Online Migration
Migration Consultation
Troubleshooting
CVM Login Failures
Windows Instance Login Failures
Linux Instance Login Failures
Other Login Failures
Instance Running Failures
Linux Instance Memory Failures
Network Failures
Use Cases
Suggestions on CVM Model Selection
Environment Building
Website Building
Application Building
Visual GUI Building
Uploading Local Files to CVM
Network Performance Test
Other Practical Tutorials
API Documentation
History
Introduction
API Category
Making API Requests
Region APIs
Instance APIs
Cloud Hosting Cluster APIs
Image APIs
Instance Launch Template APIs
Placement Group APIs
Key APIs
Security Group APIs
Network APIs
Data Types
Error Codes
Security and Compliance
CAM
Network
FAQs
Regions and Zones
Billing
Instances
Storage
Images
Server Migration
Network
Security
Operating Systems
Ops and Monitoring
CAM
NTP Service
Scenarios
Agreements
CVM Service Level Agreements
Red Hat Enterprise Linux Image Service Agreement
Public IP Service Level Agreement
Glossary

Using the Rescue Mode to Repair the System

PDF
Focus Mode
Font Size
Last updated: 2024-01-06 17:38:11

Overview

This document describes how to use the rescue mode in the CVM console. If the server GRUB bootloader files, key system files, or .lib dynamic library files are corrupted or missing when you use the CVM operating system, the operating system may be unable to enter the single user mode and be repaired. In this case, you need to use the CVM rescue mode to repair the system.

Directions

Entering rescue mode

Note:
Before you enter the rescue mode, we strongly recommend you back up the instance to avoid the impact of maloperations. You can create snapshots to back up cloud disks and create custom images to back up local system disks.
1. Log in to the CVM console.
2. On the instance management page, proceed according to the used view mode:
List mode
Tab mode
Select More > OPS and Check > Enter Rescue Mode on the right of the row of the target instance as shown below:


Click the tab of the target instance and select More Actions > OPS and Check > Enter Rescue Mode in the top-right corner as shown below:


3. 
In the Enter Rescue Mode pop-up window, set the instance login password for the rescue mod
e as shown below:
Note:
Currently, the rescue mode supports only Linux instances but not Windows instances. If you enter the rescue mode in a Windows instance, you will enter the Linux rescue mode (on CentOS 7.5 64-bit) by default.
The instance username is root by default in the rescue mode.
You can enter the rescue mode only when the instance is shut down. Forced shutdown may cause data loss or file system corruption. We recommend you shut down the instance as instructed in Shutting Down Instance before entering the rescue mode.



4. Click Enter Rescue Mode. At this point, you can see that the instance is entering the rescue mode. If the instance status is as shown below, the instance has entered the rescue mode successfully. Proceed to the next step to repair the instance as soon as possible.



Using rescue mode to repair system

1. Use the root account and the password set in step 3 to log in to the instance as follows:
If the instance has an EIP, you can log in as instructed in Logging into Linux Instance via SSH Key.
If the instance has no EIPs, you can log in as instructed in Logging into Linux Instances via VNC.
2. After successful login, run the following commands in sequence to mount the root system disk partition: In rescue mode, the device name of the instance system disk is vda, and its root partition is vda1, which is unmounted by default.
mkdir -p /mnt/vm1
mount /dev/vda1 /mnt/vm1
After successful mounting, you can manipulate the data in the root partition. You can also use the mount -o bind command to mount some sub-directories in the original file system and use the chroot command to run commands in the specified root directory. Below are the specific commands:
mount -o bind /dev /mnt/vm1/dev
mount -o bind /dev/pts /mnt/vm1/dev/pts
mount -o bind /proc /mnt/vm1/proc
mount -o bind /run /mnt/vm1/run
mount -o bind /sys /mnt/vm1/sys
chroot /mnt/vm1 /bin/bash

Exiting rescue mode

1. After repairing the instance, exit the rescue mode in the following steps according to the used view mode:
List mode
Tab mode
Select More > OPS and Check > Exit Rescue Mode on the right of the row of the target instance as shown below:


Click the tab of the target instance and select More Actions > OPS and Check > Exit Rescue Mode in the top-right corner as shown below:


2. After the instance exits the rescue mode, it is still shut down. Start it up as instructed in Starting Up Instances to resume instance operations.


Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback