My customer accountContact SalesWebmailOVHcloud Blog

Welcome to OVHcloud.

Log in to order, manage your products and services, and track your orders

Log in

Activating and using rescue mode

Find out how to activate and use rescue mode on a dedicated server

Last updated 19th March 2021

Objective

Rescue mode is a tool on your server that allows you to boot into a temporary operating system for the purpose of diagnosing and resolving issues.

Usual tasks the rescue mode is appropriate for include:

  • Resetting your root password
  • Diagnosing network problems
  • Repairing a broken operating system
  • Fixing a software firewall misconfiguration
  • Testing disk performance
  • Testing CPU and RAM

Backing up your data should be the first step in rescue mode if you do not already have recent backups available.

This guide will show you how to activate and use your server's rescue mode.

Requirements

Instructions

You can activate rescue mode only from your OVHcloud Control Panel. Go to the Bare Metal Cloud section and then select the server on which you wish to enable rescue mode from Dedicated Servers in the left-hand sidebar.

Look for "Boot" in the General informations box and click on ..., then on Modify.

Modify boot mode

In the popup window, tick Boot in rescue mode. If your server has a Linux-based OS, select "rescue64-pro" from the menu. If your server runs on Windows, you can also choose "WinRescue" (see the guide section below). Specify an alternative email address below if you do not want the login credentials sent to your customer account's primary address.

Click on Next and Confirm.

Mode rescue-pro

Once the change is completed, click on ... next to "Status" in the box labelled Service status. Select Reboot and the server will restart into rescue mode.
This might take a few minutes; you can check the status on the Tasks tab. An email will be sent which contains some information and the login password for the rescue mode's "root" user.

Reboot the server

Remember to change the netboot back to Boot from the hard disk before restarting after finishing your rescue mode tasks.

Linux

Using rescue mode (SSH)

If you are using an SSH key (also active in the OVHcloud Control Panel), you will not be sent a password. Once the server is in rescue mode, you can connect directly via your SSH key.

Once your server has rebooted, you will receive an email with your rescue mode access credentials. This email is also available in your OVHcloud Control Panel as soon as it is sent: Click on the name associated with your NIC handle (Customer ID) in the menu bar in the top right-hand corner, then select Service emails.

You will then need to access your server via the command line or an SSH tool, using the root password generated for the rescue mode.

For example:

ssh root@your_server_IP
root@your_server_password:

Your SSH client will likely block the connection at first due to a mismatch of the ECDSA fingerprint. This is normal because the rescue mode uses its own temporary SSH server.

One way around this is commenting the fingerprint of your regular system by adding a # in front of its line in the known_hosts file. Revert that change before returning to normal boot.

For most changes you make to your server via SSH while in rescue mode, you will need to mount a partition. This mode has its own temporary file system, so any file system changes you make in rescue mode will be lost once you reboot the server in normal mode.

You can mount partitions using the mount command in SSH. Firstly, list your partitions in order to retrieve the name of the partition you need to mount. You can refer to the following code examples:

rescue:~# fdisk -l

Disk /dev/hda 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1305 10482381 83 Linux
/dev/hda2 1306 4800 28073587+ 83 Linux
/dev/hda3 4801 4865 522112+ 82 Linux swap / Solaris

Disk /dev/sda 8254 MB, 8254390272 bytes
16 heads, 32 sectors/track, 31488 cylinders
Units = cylinders of 512 * 512 = 262144 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 31488 8060912 c W95 FAT32 (LBA)

Once you have found the name of the partition you want to mount, use the command below:

rescue:~# mount /dev/hda1 /mnt/

Your partition will now be mounted. You can then carry out operations on the file system.

If your server uses a softRAID configuration, you will need to mount your RAID volume (usually /dev/mdX).

To exit rescue mode, change the boot mode back to Boot from the hard disk in the OVHcloud Control Panel and restart the server from the command line.

Mounting a datastore

You can mount a VMware datastore in a similar way as described in the previous segment. Firstly, install the necessary package:

rescue:~# apt-get update && apt-get install vmfs-tools

Then list your partitions in order to retrieve the name of the datastore partition:

rescue:~# fdisk -l

Now mount the partition with the following command, replacing sdbX with the value identified in the previous step:

rescue:~# vmfs-fuse /dev/sdbX /mnt

To exit rescue mode, change the boot mode back to Boot from the hard disk in the OVHcloud Control Panel and restart the server from the command line.

Using the rescue mode web interface ("rescue64-pro" only)

Once your server has rebooted, you can access the web interface by entering your_server_IP:81 into your browsers address bar. With https, use port 444 instead. For example:

https://169.254.10.20:444

If you have already secured your data, you can use the rescue mode web interface to test the following components.

  • Disk test: Checks their integrity using SMART.
  • Processors: Checks that the CPU is functioning normally. (This may take a while.)
  • Partitions: Checks the states of readers.
  • Memory: Checks the RAM installed on the server. (This may take a while.)
  • Network: Checks the connection to an OVHcloud-internal reference system as well as the connection to your browser.

Web interface for rescue mode

Windows

Using WinRescue tools

Once your server has rebooted, you will receive an email with your rescue mode access credentials. This email is also available in your OVHcloud Control Panel as soon as it is sent: Click on the name associated with your NIC handle (Customer ID) in the menu bar in the top right-hand corner, then select Service emails.

To use the Windows rescue mode GUI, you will need to download and install a VNC console or use the IPMI module in the OVHcloud Control Panel.

Winrescue Windows

The following tools are already installed in this mode:

Tool Description
Mozilla ULight A web browser.
Memory Diagnostics Tool A Windows tool to test the RAM.
Explorer_Q-Dir An alternative file explorer.
GSmartControl A tool to check HDDs and SSDs.
PhotoRec A tool to recover possibly lost files from a disk.
SilverSHielD A SSH2 and SFTP server.
System Recovery The built-in Windows system restore and troubleshooting tool.
TestDisk A powerful data recovery application. You can use it to recover and modify corrupted partitions, find lost partitions, repair a boot sector and even rebuild a defective MBR.
FileZilla An open-source FTP client. It supports SSH and SSL protocols, and has a clear and intuitive drag-and-drop interface. You can use it to transfer your data to an FTP server, like the FTP backup service included with most OVHcloud server models.
7-Zip A utility for compressing and archiving files, which reads the following formats: ARJ, CAB, CHM, CPIO, CramFS, DEB, DMG, FAT, HFS, ISO, LZH, LZMA, MBR, MSI, NSIS, NTFS, RAR, RPM, SquashFS, UDF, VHD, WIM, XAR and Z. You can also use it to create your own archives in the following formats: BZIP2, GZIP, TAR, WIM, XZ, Z and ZIP.

Go further

Changing the admin password on a Windows dedicated server

Join our community of users on https://community.ovh.com/en/.


Did you find this guide useful?

Please feel free to give any suggestions in order to improve this documentation.

Whether your feedback is about images, content, or structure, please share it, so that we can improve it together.

Your support requests will not be processed via this form. To do this, please use the "Create a ticket" form.

Thank you. Your feedback has been received.


These guides might also interest you...

OVHcloud Community

Access your community space. Ask questions, search for information, post content, and interact with other OVHcloud Community members.

Discuss with the OVHcloud community