LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 07-29-2007, 01:28 AM   #16
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 131Reputation: 131

Yes, that's exactly what I meant. But as implied in my previous post, recreating partitions is only useful when their size or position was changed; if that's not the case and they were only reformatted, then the fdisk trick won't help much at all, you'll simply end up with what you have now.

btw, one odd thing I noticed about testdisk is that its start and end positions are one off; I believe I had to add 1 to both to get it right.
 
Old 07-29-2007, 01:30 AM   #17
Neo-Leper
Member
 
Registered: Nov 2006
Posts: 141

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jay73
Yes, that's exactly what I meant. But as implied in my previous post, recreating partitions is only useful when their size or position was changed; if that's not the case and they were only reformatted, then the fdisk trick won't help much at all, you'll simply end up with what you have now.

btw, one odd thing I noticed about testdisk is that its start and end positions are one off; I believe I had to add 1 to both to get it right.


One question. You said I would just end up with what I have now? So if I stop foremost and do this and it doesn't work, then I should be able to start foremost again and get the data?

Or right after I post this foremost will complete, which it did. I only have a fraction of what is on there.

Last edited by Neo-Leper; 07-29-2007 at 01:32 AM.
 
Old 07-29-2007, 02:45 AM   #18
Neo-Leper
Member
 
Registered: Nov 2006
Posts: 141

Original Poster
Rep: Reputation: 15
Fdisk didn't work. It may not work because of what you mentioned or I may not have done it correctly.

Foremost didn't get a lot of data, but it did get several GB. I am running PhotoRec, which has 5 1/2 hours left (already ran for 35 minutes.) It seems to be finding a lot of stuff. Luckily what it is doing is creating folders that are 500 files (size of each folder varies, it only goes by the file number.) So to make sure I have room, I am moving each folder when it gets completed and photorec moves on to the next one. Fortunately I have a lot of room, about 60-70 GB, with both my home and var partitions. But I have to stay up and make sure I get at least half of whats recovered on var (In size.) I have about 40 GB, maybe a little more then that, of data.

Then I am going to wait and see if anyone else has any ideas on what I might be able to do. I won't use SDA at all.
 
Old 07-29-2007, 03:03 AM   #19
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 131Reputation: 131
I've never used foremost but I have used photorec and I must say that I was fairly impressed. It failed to recompose some of my movies but otherwise it did a great job. It also lets you specify file types by extension so that it can work a bit more selectively if that's what you want. On the other hand, it doesn't show any contents; all you get to see is a counter ticking by while it's doing its best to fish it all up again.

As for fdisk giving you what you already have, yes, that's correct. But you need to make sure that the limits are exactly as they were - and you need to avoid reformatting. But again, if the partition limits weren't moved, it won't do anything at all. If you ever kill your partition table, that's when you'd have most to expect from it. Possibly also right after a partition was deleted. Neither of these actions tampers with the meta-data so everything is still there: both the data and the meta-data; the only thing that has changed is that your MBR has forgotten where to search for them. Recovery is a simple as restoring the (missing entries from) the partition table by entering them in fdisk. This is quite different from a reformat, which will erase at least the meta-data. You may use fdisk to shift the limits all you want, it won't restore the meta-data - because it was never meant to do that kind of thing.

Edit: I was typing this up just as you made your latest post so sorry if some of this information has lost its interest. Yes, photorec does an extremely thorough job and it does take plenty of space to store the back-ups. However, it will never dig up more than the actual contents of the partition in question. For example, if a 50GB partition was only 10% full, the back-ups will be 5GB rather than 50. Well actually, a bit more, because it tends to blow up certain files. For example, pictures or movies may get encoded to a completely different format. For example,a limited numbers of my pictures came out as bitmaps of 2MB while the original was more like 100Kb...

Last edited by jay73; 07-29-2007 at 03:11 AM.
 
Old 07-29-2007, 03:22 AM   #20
Neo-Leper
Member
 
Registered: Nov 2006
Posts: 141

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jay73
I've never used foremost but I have used photorec and I must say that I was fairly impressed. It failed to recompose some of my movies but otherwise it did a great job. It also lets you specify file types by extension so that it can work a bit more selectively if that's what you want. On the other hand, it doesn't show any contents; all you get to see is a counter ticking by while it's doing its best to fish it all up again.

As for fdisk giving you what you already have, yes, that's correct. But you need to make sure that the limits are exactly as they were - and you need to avoid reformatting. But again, if the partition limits weren't moved, it won't do anything at all. If you ever kill your partition table, that's when you'd have most to expect from it. Possibly also right after a partition was deleted. Neither of these actions tampers with the meta-data so everything is still there: both the data and the meta-data; the only thing that has changed is that your MBR has forgotten where to search for them. Recovery is a simple as restoring the (missing entries from) the partition table by entering them in fdisk. This is quite different from a reformat, which will erase at least the meta-data. You may use fdisk to shift the limits all you want, it won't restore the meta-data - because it was never meant to do that kind of thing.

Edit: I was typing this up just as you made your latest post so sorry if some of this information has lost its interest. Yes, photorec does an extremely thorough job and it does take plenty of space to store the back-ups. However, it will never dig up more than the actual contents of the partition in question. For example, if a 50GB partition was only 10% full, the back-ups will be 5GB rather than 50. Well actually, a bit more, because it tends to blow up certain files. For example, pictures or movies may get encoded to a completely different format. For example,a limited numbers of my pictures came out as bitmaps of 2MB while the original was more like 100Kb...

Thanks. I am not going to give up with fdisk or trying to get SDA right yet. FIrst all I want to do is try and save as much as I can, just incase. I have a lot of MP3's, most of them I ripped from my cd's and some of them I bought from emusic (which I can redownload again if I sign up with them.) The most important are the personal pictures and various documents. If thats all I can save out of all this I will be happy.... though I would rather save all of it, lol. PhotoRec is doing a great job so far. Between PhotoRec and some of the files I got from Foremost, I may be doing good. But then comes the sorting and renaming, that should be complete sometime in late 2008.... lol
 
Old 07-29-2007, 03:32 AM   #21
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 131Reputation: 131
Don't tell me about it. It's been like two months since I accidentally formatted a 200GB data partition and I'm still working on it. The funny thing is that I'm now so sick and tired of the endless searching and naming and sorting that I frequently find myself deleting them by the dozens, just to see some progress - after all the trouble I went to recovering them
 
Old 07-29-2007, 03:45 AM   #22
Neo-Leper
Member
 
Registered: Nov 2006
Posts: 141

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jay73
Don't tell me about it. It's been like two months since I accidentally formatted a 200GB data partition and I'm still working on it. The funny thing is that I'm now so sick and tired of the endless searching and naming and sorting that I frequently find myself deleting them by the dozens, just to see some progress - after all the trouble I went to recovering them

LOL. I can see me doing that to.
 
Old 07-29-2007, 01:29 PM   #23
Neo-Leper
Member
 
Registered: Nov 2006
Posts: 141

Original Poster
Rep: Reputation: 15
Update. 12 hours later and I am almost done with pass 5. 5500 files found with PhotoRec so far.

Also if anyone has any ideas on what else I an try to restore sda please let me know. Once I get all of this done I want to try and do that again.

Edit: I just found this link I wanted to add here if anyone ever runs across this post in the future. It explains PhotoRec, gives you an idea of how to start sorting all the files it finds, etc.

http://www.linux.com/articles/56588


Edit Edit: Does anyone know how many passes PhotoRec makes? For space I have had to move some folders to other partitions, I hope this doesn't confuse PhotoRec and it starts recovering the same files over and over again.

Last edited by Neo-Leper; 07-29-2007 at 01:56 PM.
 
Old 07-29-2007, 02:52 PM   #24
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 131Reputation: 131
I tend to bring it to a halt after the very first pass. It seems to me that is will run infinitely if you don't intervene. The first pass usually recovers more than enough. If you find that some vital files were left behind, you can always give it a new spin.
 
Old 07-29-2007, 03:08 PM   #25
Neo-Leper
Member
 
Registered: Nov 2006
Posts: 141

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jay73
I tend to bring it to a halt after the very first pass. It seems to me that is will run infinitely if you don't intervene. The first pass usually recovers more than enough. If you find that some vital files were left behind, you can always give it a new spin.

I am noticing that each pass is taking less and less time. I am going to let it go and see what happens but I only have about 20GB left for space, so once it gets to about 13GB then no matter what, I am done. I may run it for pictures only again, those I want to make sure I loose none (or at least a very few.) Its amazing the "junk" PhotoRec is finding. I have text files in several languages, some text files are lines with a few letters over and over again. I am wondering if it is finding stuff underneath, things I shredded before.

I am not looking forward to the next step, the sorting. I am going over how I am going to do this and part of it will be just trashing all the videos and mp3's (except for 1 or 2 videos if they where recovered.) I can always get them back again.
 
Old 07-29-2007, 03:59 PM   #26
Neo-Leper
Member
 
Registered: Nov 2006
Posts: 141

Original Poster
Rep: Reputation: 15
Can someone tell me the commands to mass delete ceratain file extensions, ex. *mid in each folder? No need to shred, just a simple delete. I am finding that the mp3's and midi's are really going to be a pain sorting through, many are not being recovered all that well. Also the websites I take care of I can just re-download through ftp so I will be getting rid of all html extensions as well, which many are junk anyways.

Thanks.


Edit: Also 1 more pass should do it. I was close to 55000 and thought it would get there fast. But what is happening is it slowed down a lot. Once pass 8 is done I will try a 9th pass. If the files pretty much stay at 54344 or a few over that then it looks like it is done. Then it is time for a break (WoW time, lol.)

Last edited by Neo-Leper; 07-29-2007 at 04:01 PM.
 
Old 07-29-2007, 04:20 PM   #27
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 131Reputation: 131
Delete all of them like this: rm *mid
 
Old 07-29-2007, 04:27 PM   #28
Neo-Leper
Member
 
Registered: Nov 2006
Posts: 141

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jay73
Delete all of them like this: rm *mid


Thank you. I knew it was simple, but my mind seems to have taken a vacation, lol.
 
Old 07-30-2007, 05:57 PM   #29
Neo-Leper
Member
 
Registered: Nov 2006
Posts: 141

Original Poster
Rep: Reputation: 15
Well I am done getting what I can from that HD partition. Before I start using that HD again I am going to wait until later tonight (5 or 6 hours,) in the hopes someone will tell me a magical way to fix that partition, lol. Foremost and PhotoRec where life savers. There, for some reason, was still some files lost but over all I saved most of what I really needed or wanted (mostly.). I don't care about the rest.

Thank you everyone for the help.

(((Lesson. Never put off until tomorrow what you should back up today. I know enough to back up, thats common sense. I just kept putting it off and now look at the mess I was/am in, lol.)))

Last edited by Neo-Leper; 07-30-2007 at 06:11 PM.
 
Old 07-30-2007, 06:55 PM   #30
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
That partition is quite easy to fix.

Go to this thread, and follow the instructions for Post 50 and post the output here. Note that you will be extracting the MBR from sda and not from hda.

In fact, reading that thread should show you what you need to do to fix your partition. (Hint: an ext2/ext3 partition is identified by 0x83).

Last edited by jiml8; 07-30-2007 at 06:57 PM.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Recover lost data under Solaris10 intel (Urgent) dsids Solaris / OpenSolaris 4 07-06-2007 07:08 AM
urgent! how to recover files from os x? stairwayoflight Other *NIX 12 06-10-2007 06:55 PM
recover a missing partition pankaj99 Linux - General 5 06-03-2006 07:09 PM
Recover Partition??? HELP!!!! villusion Linux - Hardware 7 10-11-2005 04:34 PM
Recover a lost partition!!!!! Caveman Linux - Newbie 4 09-26-2003 01:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 12:34 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration