Latest LQ Deal: Linux Power User Bundle
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 06-28-2010, 05:18 PM   #1
LQ Newbie
Registered: Jun 2010
Posts: 1

Rep: Reputation: 0
Disk recovery using testdisk


This is my first post on this forum, and I just started using Linux (ubuntu) yesterday.

So this is my problem: I was installing ubuntu and somehow formatted the D partition on my hdd. I have installed testdisk and have been running quick search and deep search. Testdisk found my partition as a NTFS (I used windows vista). When I press P to list files, testdisk gives me the following message: Cant open filesystem. Filesystem seems damaged.

Is it possible to recover any data from the partition or is it lost?
Any help will be greatly appreciated, as alot of my documents for school is lost (I will be better at backup).
Old 06-28-2010, 05:54 PM   #2
Senior Member
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 347Reputation: 347Reputation: 347Reputation: 347
testdisk is usually fairly good about finding things, but with the NTFS directory information lost by formatting the partition, I'd suggest you try foremost which looks for file signatures and can sometimes pick out file fragments for you to stitch back together. (This is neither fast nor easy.) The problem with Windows files is that they are quite often fragmented on your disk unless you defragmented quite often. (Most Linux file systems avoid fragmenting files unless your disk is critically full.)

There's also ntfsundelete, but I believe that that program is only usable if the NTFS is intact.

Suggestion: If you have the disk space, make an image of the problem partition (using, for example, dd_rescue) and then work with the image instead of the actual partition. (I.e., backup the damaged partition before mucking with its contents. One hopes you've now learned the value of a backup.)

Once you've got the partition backed up, you could try a Windows quick format on it (which should make it a NTSF partition with an empty directory) and then see if ntfsundelete can find anything there. (I think - but haven't checked - that ntfdundelete is part of the ntfs-tools package.)
Old 06-28-2010, 07:21 PM   #3
Registered: Jan 2005
Location: Summer Midwest USA, Central Illinois, Winter Central Florida
Distribution: SlackwareŽ
Posts: 13,092
Blog Entries: 28

Rep: Reputation: 2313Reputation: 2313Reputation: 2313Reputation: 2313Reputation: 2313Reputation: 2313Reputation: 2313Reputation: 2313Reputation: 2313Reputation: 2313Reputation: 2313

Welcome to LQ!

You installed 'testdisk' where?

If you touched the formatted drive with any writes then possible or potential loss of data that won't be recoverable nor accessible.

You usually boot a LiveCD with 'testdisk' then attempt to recover data/files. Always work from a backup or image of the drive in question.



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
Data recovery - photorec vs. testdisk vs. ddrescue? JStevenson Linux - Newbie 7 09-01-2009 03:27 PM
Hard Disk Recovery ShaneM Linux - Hardware 6 10-23-2006 03:38 PM
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
Linux disk recovery! UltraSoul Linux - Software 6 09-13-2006 10:48 PM
Disk recovery? Hikaru79 Linux - General 10 03-07-2006 10:13 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:05 AM.

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