UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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...
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
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
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
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.
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.
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 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.
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.)
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.)))
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).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.