LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 12-03-2009, 05:23 AM   #1
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,084

Rep: Reputation: 336Reputation: 336Reputation: 336Reputation: 336
Recover Data from unallocated linux partition?!


well
it seems I somehow screwed up my drive (hdb)
when I installed some distro...

I rebooted after installing a few distro's and grub2
and now hdb1 is unallocated!

Over 65GB of valuable data lost!

The partition was ext2 and was only used to hold
storage data

now its unallocated and i dont know why?!
When I shutdown last night I could not mount either
hdb1 or hdb2
Now, hdb2 shows up in pcmanfm but not hdb1?!

So, is it possible to rebuild the partition table
and recover it??
Did grub2 do this or what?
I have no idea how this happened
as I did not dd the partition nor
do anything to it?

I have not formaatted it

Please help
thanks

Last edited by linus72; 12-03-2009 at 05:38 AM.
 
Old 12-03-2009, 05:57 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,446

Rep: Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068
Testdisk - great for fixing deleted partitions.
 
Old 12-03-2009, 06:01 AM   #3
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,084

Original Poster
Rep: Reputation: 336Reputation: 336Reputation: 336Reputation: 336
Really
thank you brother

The data includes all my iso images and all my mutlidistro work

How do i use testdisk on a unallocated partition?
Is there a way to simply "undelete" it?
thanks
 
Old 12-03-2009, 06:20 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,446

Rep: Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068
From your previous posts you should be comfortable with any of the recovery CDs. Testdisk scans looking for signatures on the disk - so long as the data hasn't been overlaid you'll be o.k. It'll offer options as it might find partitions deleted previously.
See here
 
Old 12-03-2009, 06:26 AM   #5
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,084

Original Poster
Rep: Reputation: 336Reputation: 336Reputation: 336Reputation: 336
ok
it found the partition and i guess I'm gonna just let it do its think
the table did look like this

* blah blah 1 0938344somethin
P fat32 etc etc

and I changed it to
P ext3 etc
P fat32 etc
its now doin a "deeper" scan thing...

Hopefully this will work out

Does testdisk "undelete" the partition?
 
Old 12-03-2009, 07:14 AM   #6
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,084

Original Poster
Rep: Reputation: 336Reputation: 336Reputation: 336Reputation: 336
Success!
Ok
I just had to simply re-write the partition table...

In testdisk under the "Analysis" menu
it said to choose an option
between P L P* and D
I chose P for primary as this was only choice
besides *, whatever that means
the partition appeared green or red
until I made it P
I then wrote the partition table to disk
rebooted
and wha-lah!@
I got my partition back

Should I run fsck or something on it??

SOLVED! as far as I know

Note that I used the Testdisk in PartedMagic-4.6

Last edited by linus72; 12-03-2009 at 07:16 AM.
 
Old 12-03-2009, 10:18 AM   #7
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,557
Blog Entries: 28

Rep: Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178Reputation: 1178
Quote:
Originally Posted by linus72 View Post
Should I run fsck or something on it??
No particular reason to do so, any more than you would need to repaint Gordonsville if the signposts to it blew down and you'd just put them up again

One thing about HDD data recovery, though: sometimes the recovery attempts cause further damage so it's safer to make a copy (for example using dd) and try recovering that; if recovery goes wrong you can get back to where you started from and try again.
 
Old 12-03-2009, 10:28 AM   #8
svinoba
LQ Newbie
 
Registered: Nov 2007
Location: Bengaluru, India
Distribution: Debian, Fedora, Slackware
Posts: 29

Rep: Reputation: 17
OMG... should have seen this post just 12 hours back..

I also was fiddlin with my desktop pc and my data partition showed as unallocated... did not have internet connection.. thought its gone and formated it. So dumb. will bookmark this page, though.
 
Old 12-03-2009, 10:41 AM   #9
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,084

Original Poster
Rep: Reputation: 336Reputation: 336Reputation: 336Reputation: 336
Very very true Catkin!

Only problem is I have no where to back it all up to...

well, it seems to be fixed...

Yes; svinoba
I knew that the first instinct to panic and format it was a bad idea
thats how I originally lost XP to Ubuntu
I had accidently installed syslinux to MBR of my HDD
and freaked when i couldn't get it to boot
just a black screen and blinking cursor...?!

anyway, in frustration and ignorance I installed
Ubuntu and never looked back

Have you tried using Testdisk/Photorec svinoba?
 
  


Reply


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to recover ext 4 partition and data vinnie_vinodh Linux - Newbie 1 08-27-2009 04:55 AM
recover data from hd partition... aarca Linux - Hardware 1 08-18-2009 04:34 AM
recover partition + data varun_saa Mandriva 15 05-23-2008 09:39 PM
How do you recover data from lost partition? Exeis Linux - Hardware 9 12-19-2007 05:46 PM
Using Linux to recover data on a damaged Windows partition? Korff Linux - General 5 12-29-2003 12:35 PM


All times are GMT -5. The time now is 12:17 PM.

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 Google+: linuxquestions
Open Source Consulting | Domain Registration