If your hard drive has been damaged, don't worry; you can quickly recover your data. You can use various software and tools to recover files on Ubuntu Linux.

This article will explain how to recover data from damaged external hard drive in Ubuntu. We will present different methods along with the steps.

recover hard drive ubuntu linux

Part 1. Recover Deletetd Files from Damaged Hard Drive in Ubuntu with Advanced Method

iMyFone D-Back is a data recovery tool. For Linux data recovery, it is the easiest method. The tool is easy to use, and you can quickly recover your data from the crashed drive in Linux by following a few simple steps. Moreover, it does not take too much time.

This program works on HDDs, flash drives, digital cameras, and other storage devices. Even if you have an external HDD with Ubuntu, you can recover it using the software. For Linux data recovery, we need to connect the drive to another computer and recover the data like an external drive.

In addition, this program will help you recover files from a hfs hdd in ubuntu.

Steps to Recover deleted files from ubuntu linux:

Step 1. Download the software from iMyFone's official website. Check the operating system version before downloading. Install the software on your computer. Connect the hard drive to your computer and launch the software.

Step 2. Now, you need to click on the hard drive. It will be shown on the main screen. The software will start the recovery process.

select location external device

Step 3. First, the software does a quick scan. It recovers most of the files in a short time. Then, it runs the deep scan. It recovers more files from the hard drive.

scan external device

Step 4. Once your files are recovered, you will see the preview. You will see the arranged files according to their type and format on the left. Select the files you want to recover and click on the Recover button.

preview files from external devices

Part 2. Other Possible Ways to Recover Data from Crashed Hard Disk in Ubuntu

There are different ways to recover deleted data from a crashed hard drive on Linux. But keep in mind that these methods are not free. They are not for beginners. You might make mistakes during the process, which will make the condition worse.

1DDRescue

DDRescue is a data recovery tool that can recover data from hard drives and other storage devices. It helps you copy your data from the crashed drive to another drive. It tries to recover all your files that can be recovered. It is an excellent choice for Linux disk recovery.

Steps to Recover Data Using DDRescue:

Step 1. First, you need to create a live USB with system rescued. Systemrescued is a rescue kit for Linux. It is a bootable medium that helps in rescuing data from a crashed drive. DDRescue is also on the drive to recover your data.

Step 2. Insert the live USB on your computer and restart it. It would be best if you chose the live USB for boot. For that, press F11, F12, or any other key shown at the start. Choose the live USB. It will boot with the help of systemrescued.

Step 3. It is time to locate the source drive from which the data will be recovered. Type the following command.

# fdisk -l | grep dev

The command will show you all the drives connected to the computer. It will also include the live USB. Look for your drive. On Linux, the drives are shown as dev/sda and dev/sdb. Once you identify the source drive, keep its name in mind or write it on paper.

Step 4. Insert the external drive you want to recover your data. Make sure the drive is empty because the data on the drive will be overwritten. Type the command again.

# fdisk -l | grep dev

This time, the external drive will also be shown on the list, so you can quickly identify it. Write its name as well.

Step 5. Now, you need to write the following command.

ddrescue -f -n -a 5120000 /dev/sda /dev/sdb logfile.log

Remember to change dev/sda with your source drive and dev/sdb with the external drive. For this step, we wrote the drive names on paper.

Step 6. Type the following command:

ddrescue -f -d -r 3 /dev/sda /dev/sdb logfile.log

Again, change dev/sda with your source drive and dev/sdb with the external drive.

Now, you need to wait for the Linux data recovery process to complete. After that, you can check the external drive for the recovered data.

Note
The process might take hours and days.

2 TestDisk

TestDisk is an open-source data recovery software. It can help you recover the deleted and lost files from your drives. It is available for free, and you can recover as many files as you like.

Steps to Use TestDisk:

Step 1. First, you need to install TestDisk on Ubuntu. Use the following two commands first.

$ sudo apt update

$ sudo apt install testdisk

Step 2. Connect your external drive to the computer. Now, you need to create the testdisk.log. Use the following command: # testdisk

You will see a few options and select Create.

Step 3. You will see a list of drives. Select the external drive. Now, go to Proceed.

Step 4. You will see the partition table type—press Enter. On the next screen, you will have the recovery options. Choose Advanced.

Step 5. Select the external drive for the recovery. You will see the system directories of all partitions on the drive. You can navigate to the directory where your files and data are saved. The deleted files will be highlighted.

Step 6. Go to the file that you want to recover and press C on the keyboard. TestDisk will show you the destination options to save the file. Press C to select the destination. Your file will be copied to the desired location.

Note
The methods in this part do not always work, so if you are worried about data security and want to recover the data directly, you can go straight to the way we best recommend in Part 1. It can recover data in a 100% secure and direct manner.

Part 3. FAQs

3.1 How to recover data from a corrupted drive in Linux?

You can use TestDisk to recover corrupted drives in Linux. We have mentioned the steps in Part 2. Follow the steps and recover your data.

3.2 How can I recover permanently deleted files in Linux?

Permanently deleted files can be recovered using iMyFone D-Back. Your deleted files are highlighted in the directories, and you can quickly recover them. Follow the steps discussed in Part 1.

3.3 How to recover deleted data from crashed Ubuntu?

The data can be recovered using DDRescue. It helps you copy the data from the crashed drive to another drive. It is a simple method, and we have already discussed its steps.

Conclusion

You can quickly recover deletd files from damaged external hard drive in Ubuntu. Linux data recovery is possible if you know the right tool. We have discussed various methods, but the methods on Linux take too much time and are pretty tricky for beginners. Therefore, we best recommend iMyFone D-Back. It can help you recover your files without any hassle.