Activation and use of Rescue System on the dedicated server

Last modified: Thursday November 30th, 2023

This article describes how to activate and use the Rescue System.

Introduction

The Rescue System is a Debian based Linux live environment that allows you administrative access to your server, even if the installed system does not boot anymore. The environment starts using network boot (PXE) and runs in the memory of the server, without touching the drives or your data on them. This makes it possible for you to carry out repairs to the installed system, access the data on the drives, create backups, check the hardware of the server, and to install operating systems. Plus, you can install any other software you need using the Rescue System.

Or you can use a KVM Console together with a bootable ISO image of your choice.

Starting the Rescue System

Activating the Rescue System

To start a server in the Rescue System, first, you need to activate it via the administration interface in the client’s area. To do this, click on the Services, select the correct server, and then click the button Rescue. Then pick the correct typeand architecture and activate it.

Now use the password that was given to you when you activated the Rescue System to log in as “root” via SSH. Or, if you have already uploaded an SSH key to the client’s area, you can select the key, and log into the Rescue System without a password.

Restarting the server

To load the Rescue System, you need to restart the server.

Important note: The activation of the Rescue System is only valid for one boot. If you want to boot your server to the Rescue System again, you will have to activate it in the client’s area again. If you do not reboot your server within 60 minutes after the activation, the scheduled boot of the Rescue System will automatically become inactive. If you restart the server later, the system will boot from the internal drive(s).

Mounting the drive(s) in the Rescue System

First, you should determine the partition identifiers of your system by running the command lsblk.

If the output looks like the output below, and there are RAID entries in the TYPE column, you have a software RAID running:

root@rescue ~ # lsblk
NAME    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
loop0     7:0    0     4G  1 loop
sda       8:0    0 447.1G  0 disk
├─sda1    8:1    0     4G  0 part
│ └─md0   9:0    0     4G  0 raid1
├─sda2    8:2    0   512M  0 part
│ └─md1   9:1    0 511.4M  0 raid1
└─sda3    8:3    0 442.6G  0 part
  └─md2   9:2    0 442.5G  0 raid1
sdb       8:16   0 447.1G  0 disk
├─sdb1    8:17   0     4G  0 part
│ └─md0   9:0    0     4G  0 raid1
├─sdb2    8:18   0   512M  0 part
│ └─md1   9:1    0 511.4M  0 raid1
└─sdb3    8:19   0 442.6G  0 part
  └─md2   9:2    0 442.5G  0 raid1

But if the output looks like the one below, there is no software RAID configured on it:

root@rescue ~ # lsblk
NAME    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
loop0     7:0    0     4G  1 loop
sda       8:0    0 447.1G  0 disk
├─sda1    8:1    0     4G  0 part
├─sda2    8:2    0   512M  0 part
└─sda3    8:3    0 442.6G  0 part
sdb       8:16   0 447.1G  0 disk
└─sdb1    8:17   0   446G  0 part

Now you can mount the correct partition within an empty folder, for example, using /mnt.

  • If you have a software RAID, /dev/md2 is usually the system partition. (Enter cat /proc/mdstat to display all RAID partitions):
    mount /dev/md2 /mnt
  • Without a software RAID, usually the last or second-to-last partition contains the system:
    mount /dev/sda3 /mnt

Mounting LVM volumes

First, use the following command to see all the LVM volumes.

ls /dev/mapper/*

Output example:

/dev/mapper/vg0-home /dev/mapper/vg0-root /dev/mapper/vg0-swap

You can then mount the LVM volumes.

mount /dev/mapper/vg0-root /mnt

Resetting the root password

To reset the root password of an installed Linux or BSD system, you need to mount the system partition as explained in the previous section of this article: “Mounting the Drive(s) in the Rescue System”. Then use chroot to switch into the root environment of the mounted system.

chroot-prepare /mnt
chroot /mnt

You can now change the password of the user “root”.

passwd

Finally, exit the root environment.

exit

Installing an operating system

We provide a convenient menu-based script  Installimage for installing an operating system and for customizing settings like drives you want to use, RAID levels, hostname, partitions and LVM. You can find more information on the Installimage page.

Was this article helpful?
Views: 315

10 Years Beehosting!
Celebrate with 70% OFF + FREE Site Transfer.

Facebook Instagram linkedin

Beehosting.pro website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Menu