Rescue Mode allows you to check the health of your Dedicated Server's hardware and connect to it via SSH to perform different troubleshooting tasks; a few of which are:
- Launch an
- Access the file system
- Fix misconfigurations
- Backup data
- Check hardware devices
This article will walk you through the basics of Rescue Mode.
- Getting Started with SSH
- General Knowledge of Terminal
Booting in Rescue Mode
Log in to the OVHcloud Manager and select the server in question under "Dedicated servers" on the left-hand sidebar. On the "Server status" page, click Modify next to "Boot". From the pop-up menu, select the Boot in rescue mode option and then select rescue64-pro from the "Rescue available" drop-down menu.
After changing the boot setting, click the Actions button in the top-right corner and select Restart. The server is now in Rescue Mode.
Next, you will receive an email that contains new credentials to access the server via SSH. The email will also contain a link to a web interface from which you can perform various hardware tests. For more information about this, please check out the Performing a Hardware Check section of this article.
Note: If you do not see the email within five minutes of rebooting your server, please check your Spam folder.
When you are finished working in Rescue Mode, return to the OVHcloud Manager in your browser, change the "Boot" option back to "Boot from the hard disk" and then restart your server.
Mounting the Partition
To SSH into your server use the login credentials that were received via email. For more information regarding SSH, please check out our Getting Started with SSH article.
Once connected, locate the storage device for your Dedicated server, then mount it to the Rescue Mode environment.
Examples of the standard naming convention for different storage are:
/dev/sdXfor SCSI and SATA devices
/dev/nvmeXnXfor NVMe devices
/dev/mdXfor RAID devices
Note: Please keep in mind that by default the storage for the Dedicated server is configured to use RAID 1 (mirroring), so the device address will be: /dev/mdX.
Additionally, if during the installation of the operating system you opted out of using RAID, then the device address (e.g. /dev/sdX) and the partition will need to be mounted.
To view the storage devices that your server has, use the
parted utility. Below is an example of the command and it's output:
$ parted -l Model: ATA HGST HUS724020AL (scsi) Disk /dev/sda: 2000GB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 1049kB 537MB 536MB fat32 primary boot, esp 2 537MB 1073MB 536MB ext4 primary raid 3 1073MB 2000GB 1999GB ext4 primary raid 4 2000GB 2000GB 536MB linux-swap(v1) primary Model: ATA HGST HUS724020AL (scsi) Disk /dev/sdb: 2000GB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 1049kB 537MB 536MB fat32 primary boot, esp 2 537MB 1073MB 536MB ext4 primary raid 3 1073MB 2000GB 1999GB ext4 primary raid 4 2000GB 2000GB 536MB linux-swap(v1) primary Model: Linux Software RAID Array (md) Disk /dev/md2: 536MB Sector size (logical/physical): 512B/512B Partition Table: loop Disk Flags: Number Start End Size File system Flags 1 0.00B 536MB 536MB ext4 Model: Linux Software RAID Array (md) Disk /dev/md3: 1999GB Sector size (logical/physical): 512B/512B Partition Table: loop Disk Flags: Number Start End Size File system Flags 1 0.00B 1999GB 1999GB ext4
As per the output, the server is equipped with two SCSI disks (/dev/sda & /dev/sdb) in a software RAID configuration (/dev/md3).
After identifying the storage device, create a root directory within the
/mnt directory, then use the
mount command to add it to the Rescue Mode environment:
# mkdir /mnt/root
# mount /dev/mdX /mnt/root
Lastly, navigate to the newly mounted device:
# cd /mnt/root
Although you can edit the files in the
/mnt/root directory, certain commands require root privileges on the system that is installed on the disk. Thus, change the apparent root directory to the directory in which we stored our files using the following command:
# chroot /mnt/root
Performing a Hardware Check
Once the server goes into Rescue Mode you will receive an email with a link to the hardware web interface and login credentials. Here is an overview of this interface:
- Hard Drives: Checking the disks installed on your server
- Processors: CPU verification. It is possible that the server restarts or stops responding. If this occurs, contact us as soon as possible.
- Partitions State: Verifying partition integrity
- File System Partitions: Checking the file system. Often inconsistencies indicate a corrupt file system. Note that reinstall the operating system usually corrects the problem.
- Explore Partitions: Exploring files. This tool does not allow the modification of the files. The main utility is to consult the logs without having to go through SSH.
- Memory: Checking the RAM. Please note that this test will monopolize the CPU. If this test freezes or reboots the server it is possible that your CPU is defective. If the RAM is defective, the report at the end of the test will contain errors.
This interface can't specifically detect the cause of the problem. However, it can give you an indication of whether or not there is a problem. If one or more hardware tests fail or show errors, contact support right away. For more information on opening a support ticket, please check out our How to Contact OVH US Support article.
Warning: Do not interact with the server through the web interface (detailed below) and SSH at the same time. For example, never check the disks on the web interface while mounting the partitions via SSH. This may result in the loss of data.
Rescue Mode is an important tool that can be used to perform maintenance on your own schedule or to reverse critical errors made during normal server administration. Having read this article, you should have a basic familiarity with how to get started using Rescue Mode with a Dedicated server.