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
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.
- Use
lsblkto 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. Execute the following command to mount a partition:
mount /dev/vda3 /mnt
Replace/dev/vda3with the partition you want to mount.
- 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
- We have already mounted the
/partition in a previous step. If the
/bootdirectory is located on a separate partition, you must also mount it under/mnt/boot:mount /dev/vda2 /mnt/boot
- 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/procmount -t sysfs sys /mnt/sysmount -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
- Exit the chroot with
exit. Unmount all mounted partitions with
umount:
umount /mnt/boot #(if you have mounted/boot)umount /mnt/{proc,sys,dev}umount /mnt
Last update: 2 March 2026
Was this article helpful?