How to mount a Linux hard drive to save data if it won’t boot

Tiempo de lectura: 2 minutos
Hello, today we’re going to learn how we can mount a Linux server that has crashed and we need to save the data from its disk.

First, we need to connect our hard drive to a properly functioning PC with Linux installed.

The Linux server has different partitions, so we need to find the one we’re interested in.

To do this, we open the console and type:

df -a

And we’ll see the list of disks we have, look for ours:

In my case it’s /dev/xvdb

Now we have to see which partitions we want to save and mount to access the files.

We type:

sudo fdisk -l /dev/xvdb

In my case I indicate my mount point, you will have to indicate yours.

Now the different partitions will appear:

In my case I need the Linux one, so it’s /dev/xvdb1

Now we create a folder to perform the system mount:

mkdir /mnt/xvdb1

And we mount the disk there:

sudo mount /dev/xvdb1 /mnt/xvdb1

And that’s it, we’ll have our disk mounted in that directory.

We can access the files:

cd /mnt/xvdb1

*We can also access this folder using FTP and our SSH user.

Leave a Comment