How to Recover Data from Corrupt Harddrive in Linux

Tutorial on how to successfully recover data from a Severely Corrupted hard drive in Ubuntu Linux using Testdisk and Photorec.

A “professional” repair shop attempted recovery of data from this Windows Laptop drive, but failed. Using Testdisk in Linux I recovered about 70% of the drive. (Could have been more, but it was crippling my system and running horrifically slow)

sudo apt-get install smartmontools
sudo apt-get install –no-install-recommends smartmontools

Find out drive number with GUI tools, Gparted, or “fdisk -l”
sudo smartctl -a /dev/sdx
sudo testdisk /dev/sdx
Take a backup image if you have enough disk space spare on your system
sudo photorec image.dd (or /dev/sdx)

find . -type f ( -iname “*.jpg” -o -iname “*.jpeg” -o -iname “*.png” ) -exec cp ‘{}’ /destination/ ;



Related Posts

Tấn công DDoS

September 4, 2020

September 4, 2020

AppSec, DDoS, cơ bản nguyên tắc Phát tấn công từ khi phân tán dịch vụ (DDoS) Tấn công từ phân...


April 4, 2020

April 4, 2020 23


طريقة فك البوتلودر لهواتف شاومي

May 23, 2020

May 23, 2020 11

الهاتف المستخدم فالشرح note 8 pro الروابط بالتدوينه : اسف عالجودة 😊 bootloader unlock bootloader ماهو bootloader unlock code bootloader...

2018 iPhone 9 X Plus – Thông tin rò rỉ

February 10, 2020

February 10, 2020

Bạn muốn các sản phẩm của Apple hãy click ngay: ➤ Mua Iphone tại FPTshop: ➤ Mua Iphone tại vuivui:...

How to fix windows folder in Bluestacks 4

February 19, 2020

February 19, 2020 32

Consider buying me a coffee : Visit my Website : Subscribe to My Channel I have just found a...

Cận cảnh 4 "Xiaomi Killer" của VSmart: Liệu có thành công?

February 25, 2020

February 25, 2020 11

Tham khảo 4 mẫu Vsmart HOT nhất tại CellphoneS: » » » » #XStudios – tổ hợp thông tin, giải...

Hướng dẫn săn iPhone X giá 0 đồng, đặt hàng từ hôm nay

January 31, 2020

January 31, 2020 25

– Link săn, nhóm và mã giảm giá: —————— Mua iPhone X , iPhone X 0 đồng , iPhone X...

MINDBLOWING New Features in Adobe's After Effects & Premiere Pro CC 2019 Spring/April Update!

May 2, 2020

May 2, 2020 44

❗ Get a FREE TRIAL of Adobe Premiere & After Effects: Adobe just announced their latest updates for Premiere Pro...

Cara Flash / root STB Indih**e mudah tanpa bongkar

March 5, 2020

March 5, 2020 23

percobaan kali ini adalah flashing STB android indihome B760H, dengan SP Tools mudah dan simpel tanpa harus bongkar kesing, cukup...

Hướng dẫn cách thêm style vào Proshow Producer chỉ trong 1 nốt nhạc

March 7, 2020

March 7, 2020 8

Hướng dẫn cách thêm style vào Proshow Producer, cách add style và transitions vào Proshow Proudcer qua 3 cách thông...

Hướng dẫn tải và cài đặt phần mềm đọc file PDF: Adobe Reader & Foxit Reader

March 23, 2020

March 23, 2020 10

Link download Adobe Reader: Link download Foxit Reader: Máy tính bạn không đọc được file PDF. Các file PDF hiện...

Como Bloquear Todos Os Anúncios Dos Aplicativos Android Com o Xposed

April 27, 2020

April 27, 2020 15

Como Bloquear Todos Os Anúncios Dos Aplicativos Android Com o Xposed Link do Vídeo “O que e Xposed e como...

How to Download & Install Adobe Flash Player in Android Phone & Tablet

March 25, 2020

March 25, 2020 28

Adobe Flash Player is not available in google play store, but still you can download and install flash player for...

Cómo usar MI FLASH en dispositivos Xiaomi y Redmi | Instalar ROM oficial

February 10, 2020

February 10, 2020 35

¡Bienvenidos a TechDroy! ▶️ Suscríbete: 🌐 Visita nuestra web: Hoy te enseñamos a cómo usar la herramienta oficial de Xiaomi...


February 24, 2020

February 24, 2020 17

Thực sự Google Pixel 2 đã làm mình rất bất ngờ về khả năng chơi game. Sự tối ưu hóa...

  • I have one driver that i was using to make a bartop with arcade games in it to backup some data, but i forgot about it and one day turned the system on and it got bad blocks, and since i didn't want to mess with it and didn't have installed anything anyway i started formating it, but just as i pressed the format disk i remembered it and turned the system off, but of course the damage was made, so the question is: will it help me restore this hd or my data?

  • Hi,Here is a problem:
    I have a 200GB internal pc hdd that was partitioned to have winxp and
    ubuntu 10 running on it. My windows xp needed to be redone fresh so I
    booted to an Ubuntu 16.04 LiveUSB to erase the partition using GParted. I
    then decided I wanted to resize my existing Ubuntu partition. I think I
    was going from about 100 to the full size of my hard drive. I started
    to see the task and waited about 5 min. I realized that the process was
    going to take a very very long time and so i used the" back button to
    start" to cancel the operation.but i don't validated the "apply botton"
    Now my problems begin. the pc not booting at all. Any hint about? Thanks in advance

  • iv ran out of hdd space on a linux mint virtual machine now it wont boot and cant get it into recovery mode what should i do ???

  • On my drive 32 hours does not even begin to make progress on the drive. It gets stuck with many bad clusters at the beginning. I believe that most of the disk later on is good. Is there any way to do the backup starting at the middle of a partition or maybe start at the end and go backwards?

  • What do I do if Desktop Settings was open along with multiple other programs, and while using another program, it seemed to glitch and set parts of the bar with the icons far apart and off the screen, despite that I hadn't been using Desktop Settings during this?

  • I've broken my android phone. I've lost it and when I found it, it was inside my wash machine. So the mobile is not turning on. If this process do you think is possible to recovery something? 😉

  • I have the SAME HDD! Linux wrote over my partition and rooted it, and all my stuff is gone… Can I still recover my stuff or is it stuck on that Linux partition now?

  • So you can only backup jpg, gif, png files with this app?
    So then how do I restore video files and other stuff?
    This is confusing, and I didn't know what to do in testdisk after searching through the HDD.
    Could you redo this tutorial but with normal / user-friendly apps please? And is there an app that will allow me to backup the HDD to multiple USB sticks because my disk doesn't have enough space?

  • Please tell what do i should
    My hard disk (500 GB) loss during install kali linux
    How can i recover it
    Given me any solution

  • Man,you are a lifesaver….My best friend just died recently in an accident,his family gave me his hdd,but it was non responsive,with your tutorial,i was able to recover all of his pics…..Thank You!!!

  • my external drive has been corrupted i think i tried test disk on windows and it coundt find any partitions .. what are my options

  • HELP HELP HELP while installing ubuntu i clicked on delete data and now
    my whole harddrive is formatted and all the partitions are removed
    please help me how can i get my data back

  • just stumbled upon your channel and quid you're awesome! I don't understand how you don't have a bigger fan base. I will be showing my friends your channel! you make everything much more understandable. cheers man!

  • hello can i mount the image.dd in some directory like in another external hard drive?thre reason behind is because i'm trying to recover data from 2TB corrupted external hard drive

  • Oh… how I remember DOS many years ago, very simple just to load a prog.. then later trying to bring in a bot from a friends computer to an IRC channel 10 years ago gave me the sweats.. now this just scares me because I don't understand it.. all those instructions mean something in plain language.. it would be good if someone would define them.. If you know what they mean, you can understand better and remember them and what they do.. an old granny just saying 😉

  • Hello, great tutorial!. thanks. Please, could you help me ?
    I already try recover from a Windows machine, but no sucess
    I got these error message executing command below:
    sudo ntfsfix /dev/sde
    Mounting volume… ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 65535: Invalid argument
    Record 0 has no FILE magic (0x0)
    Failed to load $MFT: Input/output error
    Attempting to correct errors… ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 65535: Invalid argument
    Record 0 has no FILE magic (0x0)
    Failed to load $MFT: Input/output error
    Failed to startup volume: Input/output error
    Checking for self-located MFT segment… ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 65535: Invalid argument
    ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 65535: Invalid argument
    Record 0 has no FILE magic (0x0)
    Failed to load $MFT: Input/output error
    Volume is corrupt. You should run chkdsk.

  • Nice tutorial Quidsup … best i have seen……….. I use these recovery tools quite often . But GeeZus it irritates me how you lose ALL file names.

    I recently recovered 93,000 + photo's , 200+ movies  and over 500 short home video's ……………..32 hrs to recover it all ……… over 9 yrs of a family's  life, for a little ol Granny.  It was both a case of Happiness and joy at having gotten the photo's back ……………. And stress and anguish coz the poor ol dear didn't know what to do next. How do you put them back into folders and photo albums. ALL the info that was with them is gone. She mentioned that it would take her years to get it all sorted
    And some types of movies get broken down into their VOB sections ………… try putting them back together !!!     especially when there are no file names

    surely someone out there can improve this wonderful software further

  • I had to do an emergency backup of an SD card containing a RPi image, using a Windows machine as the card was required for something ASAP. Turns out the image was corrupted and I lost some very important data. I can't mount the file at all on any of my linux machines.

    Could I use this tool to obtain data from an .img file?

  • hey there,
    i use testdisk when pushed it's quite useful.
    as for the file naming well that is another matter.
    i did toy with the idea of writing a script to pull the info from the doc and rename them – using…. another utiliy (fileprop?)… wonder if you'd thought of that.

    in the meantime – another good vid – thanks.

  • If you want to move all files with jpg OR jpeg OR png extension, then the command find should be:

    find . -type f ( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" ) -exec mv '{}' ../dest/ ;

    Thanks for your interesting videos. 🙂

  • Good video 🙂 , but for some users could be more effective and comfortable to use PhotoRec Sorter 😉

Leave a Reply

Your email address will not be published. Required fields are marked *