Activating and using rescue mode
Find out how to activate and use rescue mode on a dedicated server
Find out how to activate and use rescue mode on a dedicated server
Last updated 7th February 2023
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:
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.
Please note that if you have set a default SSH key in your Control Panel for dedicated products, you will not receive a root password when rebooting a server in rescue mode. In this case, you must first disable the key before proceeding with the server reboot. To do so, please consult this section of the relevant guide.
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 to enable rescue mode from Dedicated Servers.
Look for "Boot" in the General information box and click on ...
, then on Edit
.
In the next page, select Boot in rescue mode. If your server has a Linux-based OS, select rescue-customer
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.
Some OVHcloud customer accounts may be affected by an error regarding the language of rescue emails: they are sent in French instead of the chosen account language. Although the cause of the error has been corrected since September 20, 2022, the email address needs to be updated once to resolve the issue. To do this, enter your customer account's email address in this step before you enable rescue mode.
Click on Next
to proceed to the next step and on Confirm
to validate the change.
Once the change is completed, click on ...
next to "Status" in the box labelled Service status. Select Restart
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.
Remember to change the netboot back to Boot from the hard disk
before restarting after finishing your rescue mode tasks.
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-customer:~# 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-customer:~# 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.
You can mount a VMware datastore in a similar way as described in the previous segment. Firstly, install the necessary package:
rescue-customer:~# apt-get update && apt-get install vmfs-tools
Then list your partitions in order to retrieve the name of the datastore partition:
rescue-customer:~# fdisk -l
Now mount the partition with the following command, replacing sdbX
with the value identified in the previous step:
rescue-customer:~# vmfs-fuse /dev/sdbX /mnt
If you have VMFS 6
datastores, you need to manually install the vmfs6-tools
in the rescue mode environment:
rescue-customer:~# apt-get update && apt-get upgrade
# apt-get install git uuid-dev libfuse-dev pkg-config gcc
# git clone https://salsa.debian.org/debian/vmfs6-tools.git
# cd vmfs6-tools
# make
# make install
Access the sbin
folder, to create the mount folder:
rescue-customer:~# cd /usr/local/sbin/
# mkdir /mnt/datastore
Then list your partitions in order to retrieve the name of the datastore partition:
rescue-customer:~# fdisk -l
Now mount the partition with the following command, replacing sdbX
with the value identified in the previous step:
rescue-customer:~# vmfs6-fuse /dev/sdbX /mnt/datastore/
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.
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.
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. |
Changing the admin password on a Windows dedicated server
Join our community of users on https://community.ovh.com/en/.
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.
Access your community space. Ask questions, search for information, post content, and interact with other OVHcloud Community members.
Discuss with the OVHcloud community