menu
small_header_rootserver.svg

netcup wiki

Server

Accessing Hard Drive

Learn how to access your hard drive and system data in the rescue system if your server no longer starts up correctly.

1. Booting the Server into the Rescue System

  1. Boot your server into the rescue system.

2. Mounting the Hard Drive

By default, you do not have immediate access to your server's hard drive after starting the rescue system. You have to mount it first.

  1. Use lsblk to find the name of your hard drive and its partitions. After executing the command, you will see a list of all the hard drives and partitions on your system.

  2. Execute the following command to mount a partition:

mount /dev/vda3 /mnt

Replace /dev/vda3 with the partition you want to mount.

  1. Your data will then be located under /mnt.

3. Accessing the System via chroot

Depending on the configuration, you can now switch to your installed system via chroot. This lets you change your root password or reinstall the bootloader.

The following procedure is only an example based on a possible system configuration. The exact procedure varies depending on your configuration and requires advanced knowledge of Linux system administration.

Mounting the Required Partitions

  1. We have already mounted the / partition in a previous step.

  2. If the /boot directory is located on a separate partition, you must also mount it under /mnt/boot:

mount /dev/vda2 /mnt/boot

  1. In the next step, you need to mount some partitions that are required for the chroot environment to function correctly:

mount -t proc proc /mnt/proc

mount -t sysfs sys /mnt/sys

mount -o bind /dev /mnt/dev

Switching to chroot

You can now switch to chroot: chroot /mnt /bin/bash

Now, you can work there. For example, you can change your root password or reinstall the bootloader.

Note that it may be necessary to configure name servers within the chroot environment under /etc/resolv.conf in order to use the network correctly.

Exiting the chroot

  1. Exit the chroot with exit.
  2. Unmount all mounted partitions with umount:

umount /mnt/boot # (if you have mounted /boot)

umount /mnt/{proc,sys,dev}

umount /mnt

Last update: 06/11/2025