Вы находитесь на странице: 1из 12

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/ \;

Wallpaper: http://quidsup.net?i=NeonPacman

Catégorie
Science et technologie

==============================================================================
=

50 commentaires

Linux4UnMe
il y a 3 ans
It's pretty sad when supposed "professionals" at a repair shop fail at drive recovery and some
guy comes along using Linux / open source tools and easily solves the issue :D
20
Ograws
Ograws
il y a 2 ans
+Linux4UnMe If only I had have known about this before I could have fixed a client's hard drive
which got corrupted :P
1
Darren Moore
Darren Moore
il y a 3 ans
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 ..............you try putting
them back together !!! especially when there are no file names

surely someone out there can improve this wonderful software further
4
quidsup
quidsup
il y a 3 ans
@Darren Moore Its due to the loss of the File Allocation Table. The data recovery tools can see a
file but without the FAT table they have no idea what it's called.
It was like that 20+ years ago doing file recovery in DOS.
Cheers
1
Loathian Penguin
Loathian Penguin
il y a 3 ans
@Darren Moore Been there before and ended up using batch renaming programmes such as
pyrenamer or metamorphose2. I just renamed all the photos by date taken based on exif data
and sorted em chronologically. Should help the wee gran get her photos into folders without too
much cutting and pasting ;-)

@quidsup life saving vid mate, brilliant!


1
sven
sven
il y a 6 mois (modifié)
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?
3
EnderCrypt
EnderCrypt
il y a 4 mois
its not really 'backup' its restoring, and if you look at 5:09, you can see that at the top theres an
option called "Custom Own custom signature", now.. i havent used this software (yet).. but im
gonna take a guess and say with 97% certainty, that you can choose your own file extensions
using that option, and even more advanced things

now, regarding backing up the harddrive to multiple usb sticks, theres a few possible solutions,
one would be to just splice the file into many smaller files, you could do this manually using
some software or by doing something like.. rar file splicing (common feature in rar applications,
like for example winrar)
Kathphlox
Kathphlox
il y a 2 ans
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 ;)
2
Zohair Khan
Zohair Khan
il y a 1 an
I am surprised to know about your interest in such thing.
Ricardo Portela da Silva
Ricardo Portela da Silva
il y a 3 ans
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
FAILED
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
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
OK
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.
1
Dale McCarthy
Dale McCarthy
il y a 1 an
No partitions found when i run testdisk?any help please. also getting a lot of input/output errors
in dd_rescue
2
osityan
osityan
il y a 3 ans
If you need the files just get a quote from data recovery guy.com, they're pretty cheap or some
other data recovery company
1
Dr Revolution
Dr Revolution
il y a 1 an
my external drive has been corrupted i think i tried test disk on windows and it coundt find any
partitions .. what are my options
1
Ryan S
Ryan S
il y a 3 ans (modifié)
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?
1
Aditya Yavagal
Aditya Yavagal
il y a 1 an
hey quidsup can u help me I hv a serious prblm with my laptop hard disk
1
Johnny Webb
Johnny Webb
il y a 6 mois
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?
1
EnderCrypt
EnderCrypt
il y a 4 mois
possibly, the more 'empty space' there is on the harddrive, the more you MIGHT be able to
recover

wherever linux has put files on the drive, you wont really be able to recover things from
All*Robin
All*Robin
il y a 1 an
On the 2nd run, when I've retrieved the crucial data, I would just try to dd the whole drive to
another.
1
LinuxTutorials
LinuxTutorials
il y a 3 ans
As usual, Excelent!
3
reedy
reedy
il y a 3 ans
one of your best quids -- one of your best
4
Alvin Lee
Alvin Lee
il y a 3 ans
OMG. I really should get back to using Linux.
2
Ghulam Murtaza
Ghulam Murtaza
il y a 9 mois
Hy
Casper S?
Casper S?
il y a 8 mois
This works fine on macOS too. All Unix platforms with the supported tools - hell with the
Windows subsystem for Linux you might even get it working on Windows
1
Leandro Aude
Leandro Aude
il y a 10 mois
Brit, right?
1
Mario Sergio
Mario Sergio
il y a 1 semaine
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? ;)
dharrunsingh dharrunsingh
dharrunsingh dharrunsingh
il y a 5 mois
What the heck I don't know, smartctl is not working for me
slidingdownthehill
slidingdownthehill
il y a 3 ans
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.


Markus
Markus
il y a 3 ans
Backup is your best friend.
Either backup in the old, slow way... or just buy a new disk, dd the old to the new one and start
using the new one. HDD:s are cheap nowadays, so I would definitely recommend that.
Geoweb35
Geoweb35
il y a 2 ans
Helo, r-studio recuva and encase 4.2 is better for recovery filea/ jpg? or is the same like
photorec?
gosliglitzho
gosliglitzho
il y a 2 ans
Excellent video pal. cheers.
herr ste
herr ste
il y a 3 ans
Great video ivan, very helpful, you de man.
Helder Correia
Helder Correia
il y a 2 ans
thank you so much, you are the best! ;)
Redmund Nacario
Redmund Nacario
il y a 2 ans
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
Joshua Sprucie
Joshua Sprucie
il y a 2 ans
You could try and mount the file as a separate hard drive by giving it a folder in /mnt but I don't
really know the command. Google is usually a good friend :)
James Smith
James Smith
il y a 3 ans
Ddrescue
pentium2guy
pentium2guy
il y a 10 mois
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!!!
Angel Ivan Gamboa
Angel Ivan Gamboa
il y a 2 ans
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!
quidsup
quidsup
il y a 2 ans
Thanks
Христо Генчев
Христо Генчев
il y a 2 ans
what about music and video?
Rafael Tauil
Rafael Tauil
il y a 1 an
Thank you so much! You helped me to recover a marriage footage!
Ninja Potato
Ninja Potato
il y a 2 ans
How much time is this method going to take if I've got a nearly dead my passport 1 tb?
À suivre
Lecture automatique
21:31
The mind behind Linux | Linus Torvalds
TED
1,3 M vues
Créez un site web avec Webnode
Webnode - français
149K views
Annonce
36:05
Data Recovery: Hard Drive Platter Swap in Our Lab!
Louis Rossmann
340 k vues
43:06
Bioritmul si secretele lui
Granitele Cunoasterii
Recommandée pour vous
16:04
Top 10 Linux Job Interview Questions
tutoriaLinux
684 k vues
17:04
Data Recovery Tutorial - Getting started with DDRescue and TestDisk
Level1Linux
62 k vues
2:43
Why Linus Torvalds doesn't use Ubuntu or Debian
TFiR
1,7 M vues
6:48
BUYING A Hard drive From the DARK WEB
PCPlaceNZ
Recommandée pour vous
8:27
Why UEFI?
Ask Leo!
107 k vues
2:42:44
PUTERILE SECRETE 2018 03 30
6tv
Recommandée pour vous
34:31
Data Recovery On A 1TB Western Digital Hard Drive
ACS Data Recovery
1,1 M vues
9:06
10Gb Home Network (P1) - Introduction
iTechStorm
224 k vues
8:19
3 years of Computer Science in 8 minutes
Devon Crawford
1,8 M vues
14:11
REAL Tech Repair - Linus Swaps Hard Drive Actuator!
Linus Tech Tips
763 k vues
14:52
The Lazy Script - Kali Linux 2017.1 - Make Hacking Simple!
HackerSploit
636 k vues
3:50
Recover mbr - How to recover partition table using Test Disk ( GParted live disc )
GeexHQ
109 k vues
3:24
How to recover data from a dead hard drive (for beginners)
Engineer Knows Best!
1,9 M vues
28:45
Active Directory Tutorial for Beginners
Instructor Paul
92 k vues
19:02
Why Is Manjaro So Popular?
InfinitelyGalactic
42 k vues
14:34
Network Troubleshooting using PING, TRACERT, IPCONFIG, NSLOOKUP COMMANDS
sakitech
1,9 M vues
12:19
$2,000,000 Clean Room! - DriveSavers Data Recovery Tour
Linus Tech Tips
1,6 M vues
14:35
How to install kali linux in virtual box
HaCkeRS Point
12 k vues
25:09
Learning the Linux File System
Joe Collins
577 k vues
12:50
ReactOS: Free Windows Alternative
ExplainingComputers
514 k vues
7:31
Best Linux Distros: Choosing the Right Linux Version for You
FREE Your Mind
282 k vues
4:36
Recover a data disk with ddrescue (FIXED SOUND)
Legoluke654
8,1 k vues
41:02
Top 5 Mistakes New Linux Users Make
Joe Collins
397 k vues
7:50
FIX -CHKDSK Not Available For Raw Drive Without Losing Your Data
minitoolsolution
52 k vues
10:09
5 Reasons Why I Use openSUSE Leap 15 Linux 2018
Egee
33 k vues
23:22
Don't Waste $1000 on Data Recovery
Linus Tech Tips
1,3 M vues
18:23
Data Recovery with TestDisk
oswyguy
16 k vues
10:28
How to recover data from a hard drive (stuck heads: buzzing, clicking, etc)
DIY Perks
6 M vues
19:41
How Repair Corrupted Windows 10 System Files
Haig Dickson
473 k vues
16:27
Recovering Deleted Files With Kali Linux
Millers Tutorials
74 k vues
5:37
How to recover data from usb and external hard drive
muhammadlilg
2,2 M vues
7:48
Recovering corrupted external hard disk
taulahdia
77 k vues
21:36
[ENG, SUB] TestDisk and Photorec Basic Tutorial
Il blog di Antonio Daniele
61 k vues
6:54
Test Disk - How to Recover Files from a Faulty Hard-Drive
Brad Brockmeier
79 k vues
6:14
Data Recovery on a Formatted Drive with TestDisk by Britec
Britec09
931 k vues
10:33
Data recovery using kali linux [Recover formatted data]
Linux Techie
11 k vues
19:27
Doing Kylie Jenner's Halloween Makeup
James Charles
7 M vues
Nouveau