Activating and using rescue mode on a VPS

Find out how to activate and use rescue mode on a VPS

Last updated 2nd May 2022

Objective

Rescue mode is a tool provided by OVHcloud to boot your VPS into a temporary operating system. You can utilise it to diagnose and possibly resolve various issues on your primary OS.

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

Performing checks in rescue mode helps to determine whether an issue is software-related or the hardware is at fault. We recommend doing this before contacting our support teams.

If you have any services still online, rescue mode will interrupt them as the machine is being rebooted into the auxiliary rescue environment.

This guide explains how to activate and use the rescue mode on your VPS.

Requirements

OVHcloud is providing you with services for which you are responsible, with regard to their configuration and management. You are therefore responsible for ensuring they function correctly.

This guide is designed to assist you in common tasks as much as possible. Nevertheless, we recommend contacting a specialised provider and/or the software publisher for the service if you encounter any difficulties. We will not be able to assist you ourselves. You can find more information in the “Go further” section of this guide.

Instructions

Activating rescue mode

Log in to the OVHcloud Control Panel, go to the Bare Metal Cloud section and select your server from Virtual Private Servers.

With a current VPS range

On the Home tab, click on ... next to "Boot" in the Your VPS box.

rescue mode control panel

Select Reboot in rescue mode from the menu and click Confirm in the popup window.

With older VPS ranges

On the Home tab, click on the shortcut link labelled Reboot in rescue mode.

rescue mode control panel

In the popup window, click on Confirm.

Using rescue mode

After you have initiated the reboot, a progress bar will show how the task is progressing. Note that this can take several minutes.

You will receive an automated email with the SSH credentials for rescue mode access. Please wait for the email to arrive before taking any further action. This email is also available in your OVHcloud Control Panel when 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.

Once you are connected, verify the available disks with this command:

[RESCUE] root@vps-111111d:~ $ lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0  2.5G  0 disk
└─sda1   8:1    0  2.5G  0 part /
sdb      8:16   0   80G  0 disk
└─sdb1   8:17   0   80G  0 part

Next, mount the partition:

[RESCUE] root@vps-111111d:~ $ mount /dev/sdb1 /mnt

Your data will now be accessible from the /mnt folder.

Once you have completed your actions in rescue mode, reboot the VPS again in 'normal' mode from the OVHcloud Control Panel.

rescue mode control panel

Go further

Changing your root password on a VPS

Introduction to SSH

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

In accordance with the 2006/112/CE Directive, modified on 01/01/2015, prices exclude VAT. VAT may vary according to the customer's country of residence.