Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-02-2012, 10:44 AM   #1
LQ Newbie
Registered: Jul 2011
Posts: 1

Rep: Reputation: Disabled
Hard disk Recovery data

Hi All,

I formatted my hard disk by mistake .

So How to recovery my data please help me.

Thanks & Regards

Old 02-02-2012, 11:10 AM   #2
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,398
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
From your backups, of course. Otherwise, you will need to hire data-recovery experts.
--- rod.
Old 02-02-2012, 11:12 AM   #3
LQ Newbie
Registered: Feb 2012
Posts: 3

Rep: Reputation: Disabled
Originally Posted by aneel434 View Post
Hi All,

I formatted my hard disk by mistake .

So How to recovery my data please help me.

Thanks & Regards

The System Rescue Cd may help. Good luck!
Old 02-02-2012, 11:16 AM   #4
LQ Guru
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 272Reputation: 272Reputation: 272
There's a couple of things you can do. First off is if possible, make a bit by bit copy of the drive using dd onto another drive. Then perform all your operations on that image.

Next, there's two types of formatting - quick and low level. If you just formatted the disk accidentally with your OS, chances are it just deleted the partition table that tells the OS where all the files are. For this, you can try using a tool called testdisk (from a Live CD) to recover the partition table. This has worked many times for me.

Now if you did a low level format or secure format using something like shred or DBAN, you're hosed since those tools overwrite the entire hard drive with random strings of 1's and 0's, destroying the data on each hard disk sector.

If testdisk fails, you can usually recover lots of the files by running a tool called photorec (which is part of the testdisk suite). It will search the hard disk for common file type headers and then copy all those files off to the location you choose. However, the downside is that you lose all your filenames and have to look through each document manually to figure out what it was. They'll have names like "001203981031.mp3" or "132179812309.doc". And some of it will be garbage. Some will be internet cache history, etc.

Testdisk and photorec are also available for Windows if you're more comfortable in that environment.
Old 02-02-2012, 12:49 PM   #5
Registered: Mar 2008
Location: New York
Distribution: CentOS, Debian & Fedora
Posts: 707

Rep: Reputation: 53

I use Testdisk and Photorec. A few months ago, I was reinstalling Windows and I accidentally formatted my external hard drive data which had all my data. I ran Testdisk to repair the partition table but it did not work. Then, I ran photorec and it recovered all my files. As pljvaldez said, the file names will be numbers with the extensions. I ran a quick script to separate all files by extensions, then organize by size and I deleted files that were too small (Mostly cache and temporary files)I was able to recover at least 80% of my data. Not too bad. I think 80% of something is better than 100% of nothing. Good luck!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy of IBM Server hard disk data to Another USB External Hard disk mazharcdn Linux - Server 2 09-02-2009 12:41 AM
Defective External USB Hard Disk - Data Recovery michael.schmid Linux - Hardware 14 04-14-2009 11:35 PM
Hard Disk Failure: How do I move data to a new hard disk drive? spyros Linux - Software 2 10-31-2008 03:01 PM
Data recovery from a crashed hard disk vharishankar General 8 11-01-2006 04:45 AM
LXer: Linux Data Recovery on Windows - Is possible through Disk Doctors Linux Recovery Software LXer Syndicated Linux News 0 10-22-2006 12:21 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:28 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration