LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 07-07-2007, 12:11 AM   #1
_vaago
Member
 
Registered: Dec 2006
Location: where the penguins are cold
Distribution: Windows 7/Mint 12/ Knoppix 6.7
Posts: 38

Rep: Reputation: 12
Linux Tool that can recover "Flagged for Deletion" Partition


I've reinstalled Windows three times this week because I keep losing (?) the security patch updates,
and then can't get them to (re)install. So on my third and final shot at it I forgot to turn off my external USB harddrive that contained all my stuff. Long story short I flagged for deletion the partitions.

Is there a way to recover these fat partitions without spending $50.00 on Disk Director 10?

EDIT: I know what the problem with window is. I'm looking for a tool that will undelete the partitions on my USB drive. Yes I am new to Linux and not that versed in computerese. So if you talk in acronyms I'm lost.

Please move this to the right forum.

Last edited by _vaago; 07-07-2007 at 12:26 AM.
 
Old 07-07-2007, 12:24 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 10,437

Rep: Reputation: 621Reputation: 621Reputation: 621Reputation: 621Reputation: 621Reputation: 621
testdisk should work - it's on Knoppix (and most recovery CDs) if you have one laying around.
 
Old 07-07-2007, 12:38 AM   #3
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 128Reputation: 128
testdisk should also be available from your repository (Synaptic package manager).

When it is installed, type this into a terminal:

testdisk

and make it search the disk for the deleted partitions.
 
Old 07-07-2007, 12:42 AM   #4
_vaago
Member
 
Registered: Dec 2006
Location: where the penguins are cold
Distribution: Windows 7/Mint 12/ Knoppix 6.7
Posts: 38

Original Poster
Rep: Reputation: 12
Hey thanks for the quick response.

I do have Knoppix 5.1 on CD.

Ok do I 'su /testdisk' do I have to point it to the USB drive? If so, how do I do that?
I am very green at this.

I do not have a back up of the hard-drive, it is my back up.
 
Old 07-07-2007, 12:53 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 10,437

Rep: Reputation: 621Reputation: 621Reputation: 621Reputation: 621Reputation: 621Reputation: 621
I think it lists all the disks it finds. Pick the right one and analyze it.
There used to be some doco on the (cgsecurity.org) site I think.

It won't update anything till you tell it to.
 
Old 07-07-2007, 03:12 AM   #6
_vaago
Member
 
Registered: Dec 2006
Location: where the penguins are cold
Distribution: Windows 7/Mint 12/ Knoppix 6.7
Posts: 38

Original Poster
Rep: Reputation: 12
Ok, I have the Disks listed, the partitions have been found and this is what I see:

TestDisk 6.7 Recovery Utility, June 2007
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/sdc - 80 GB / 74 GiB - CHS 9729 255 63
Partition Start End Size in sectors
L HPFS - NIFS 3140 1 1 5251 254 63 33929217NTFS, 17 GB / 16 GiB
L FAT32 LBA 5252 1 1 9728 254 63 71922942 [U]




Structure: OK. Us Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
*=Primary bootable P-Primary L=Logical E=Extended D=Deleted
Keys A: add partition, L: load backup, T: change type, P: list files,
Enter: to continue
_________________________________________________________________________
I am assuming that the capitol L under 'Disk /dev/sdc' means logical?
What do I do at this point do I press enter or do I choose one of the 'types'
of partitions?
 
Old 07-07-2007, 09:44 AM   #7
_vaago
Member
 
Registered: Dec 2006
Location: where the penguins are cold
Distribution: Windows 7/Mint 12/ Knoppix 6.7
Posts: 38

Original Poster
Rep: Reputation: 12
Here is a quote from TestDisk Documents:

"TestDisk has features for both novices and experts. For those who know little or nothing about data recovery techniques, TestDisk can be used to collect detailed information about a non-booting drive which can then be sent to a tech for further analysis. Those more familiar with such procedures should find TestDisk a handy tool in performing onsite recovery."

I've run TestDisk it has found the three partitions that I had deleted by pressing "D" during (re)installation of XP.
As soon as I had realized what had just happened I disconnected
the USB hard-drive from the computer; finished installing XP,
downloaded Acronis' DiskDirector 10 (Demo). Of course after running Disk Director and finding the 3 partitions that is as far as Acronis would go without me coughing up (another) $50.
I then posted to TechSupportGuy and here at LinuxQuestions.Org.


I am a novice. I've run TestDisk and this is what I've found
----------------------------------------------------------
Disk /dev/sdc - 80 GB /74 Gib - CHS 9729 255 63
Partition Start End Size in sectors
* FAT32 LBA 0 1 1 3139 254 63 50444037 [SEA_DISK]FAT found
L HPFS - NTFS 3140 1 1 5251 254 63 33929217
L FAT32 LBA 5252 1 1 9728 254 63 71922942 [V]


Structure: Ok. Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
*=Primary bootable P=Primary L=Logical E=Extended D=Deleted
Keys A: add partition, L: load backup, T: change type, P: list files,
Enter: to continue
-------------------------------------------------------------
I've tried to copy this exactly as it is in my terminal.

I do not know what the next step is and I'm afraid to do anything until someone with the knowledge and experience in this sort of thing quietly talks me off this ledge.

syg00 turned me on to this cool Linux tool and I've read the doc's, but at the end of this if I lose the files stored on the Seagate external HDD, then Acronis will have won because I should have bought their recovery tool.
 
Old 07-07-2007, 05:30 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 10,437

Rep: Reputation: 621Reputation: 621Reputation: 621Reputation: 621Reputation: 621Reputation: 621
Have you actually looked at this disk to see if it's alright ???.
Try and mount it, and have a look at those partitions - doesn't look like it's been touched. Simple check would be to plug the disk in and do a "/sbin/fdisk -l" (that's a lower case ell) from a Linux terminal.
If your disk (and partitions) are listed, nothing to do.
 
Old 07-07-2007, 06:09 PM   #9
jay73
Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 128Reputation: 128
You can also recreate the partitions from the command line. You just needs to note down the start and end of the partitions as they are reported by testdisk. Then you type

fdisk [disk]

and choose m

then select the option to make partitions. If you use the limits reported by testdisk, that's all that needs to be done. But : I have noticed that testdisk tends to be one off: you should add 1 to the start and end figures to get it right.
 
Old 07-09-2007, 01:41 AM   #10
_vaago
Member
 
Registered: Dec 2006
Location: where the penguins are cold
Distribution: Windows 7/Mint 12/ Knoppix 6.7
Posts: 38

Original Poster
Rep: Reputation: 12
TestDisk worked great in analyzing the disk and finding the partitions, but I was unable to find the documentation to remake the tables.

I loaded Knoppix Live and found help right up to the mounting of the files. I get this message:

mkdir: cannot create directory '/mnt/sda1': File exists
I get this message on sda1,sda2,sda5, and sda6.

When I try to mount the partitions:

mount /dev/sda1 /mnt/sda1
mount: you must specify the filesystem type

Here is what I have so far:

disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id <System>

/dev/sda1 1 3139 25213986 c W95 FAT32 (LBA)

/dev/sda2 3140 9729 529334175 5 Extended

/dev/sda5 3140 5251 16964608+ 7 HPFS/NTFS

/dev/sda6 5252 9729 35969503+ c W95FAT32(LBA)

(I had this all lined up in columns so it was easy to read but it does not translate that way)

EDIT:
EDIT: What I wasn't seeing was that Knoppix not only had changed the drive to sda, but had also found 1 too many partitions.

TestDisk was seeing everything correctly and rewrote the partition table and now I have my 3,000+ photos back and all of the personal/school/business files that I thought I had lost forever.
>
I'm in the process now of backing up onto two additional externals.
>

Last edited by _vaago; 07-09-2007 at 07:41 PM. Reason: TestDisk 6.7 Data Recovery Successful
 
  


Reply

Tags
partition, recovery


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a Linux "docsisdiag" tool? malkor Linux - Networking 1 12-05-2006 01:13 PM
grub halts on "loading stage 1.5" after installing RECOVER PRO (asus) giuggioliniluca Linux - Software 2 09-06-2006 05:18 PM
Accidental Deletion of "home.desktop" Ian Linux - Newbie 2 03-06-2004 11:36 AM
Recover files after "rm" command on ext2 & fat32 pixelV Linux - Hardware 0 07-14-2003 05:52 AM
How can I recover my RedHat if it BOOTs to a "Kernel Panic" error and stop running? yuzuohong Linux - General 5 12-05-2002 10:39 PM


All times are GMT -5. The time now is 03:18 AM.

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