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! |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
10-24-2007, 07:28 PM
|
#1
|
LQ Newbie
Registered: Oct 2007
Posts: 13
Rep:
|
Windows File Recovery after Gutsby Gibbon Install
I know this is frowned upon, but...Please help! I'm a new Linux user, but immediately fell for the hype. I downloaded and burnt a boot CD for Gutsy Gibbon a few nights ago, with the intention of backing up all Windows files and, after switching to Ubuntu, reinstalling those needed. That was the plan, however, until my little brother came to visit, heard me talking about Ubuntu, and decided he would do me a favor by installing GG while I was at work! I've lost all of my files, and I desperately need them back. Most apps and things of that nature I don't care about, but there were resumes, poems, and most importantly, thousands of pictures of my daughter. I'm afraid these are gone forever. Is there any possible way to recover them? No amount of trouble is too great.
|
|
|
10-24-2007, 07:46 PM
|
#2
|
LQ Guru
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094
|
Here are the steps:
1) Don't boot the disk or install over, just leave it alone. The more you use it, the more you're likely to accidentally write over something you care about.
2) Put it in a different machine or have another hard drive handy and use a live CD to boot linux.
3) Install testdisk and use photorec (photorec is part of the testdisk package -- and it looks like there's a windows version now). It'll recover most document types. You can also use foremost (many distro's have a package for this as well).
I've done this many times now. Just be sure you dump the files to a DIFFERENT hard disk or you might overwrite files you want to recover. That's why I usually take it out and put it in another machine. You may have lost some data when Ubuntu was installed. But almost everything is still on the hard disk. It's just marked as "available" space.
When you're done you will also have a bunch of crap that was recovered (internet *.gif's, autosaved copies of documents, etc) and none of the files will be named correctly, you'll have to sift through by hand.
Let me know if you need any more help. I'll try to check this later this evening. Worst case, if you really fell uncomfortable doing this and you're in the US, I'd be willing to do it for you if you pay for the shipping of the drive to and from me (Washington State).
Edit: One last thing, realize you're going to find a LOT of stuff from internet browing. So if anyone has been using your machine for viewing inappropriate content, you'll probably find out. When I did this for my parents, I was really glad that I went through all the files in private. My parents would have freaked if they knew what my brother had been using the machine for! 
Last edited by pljvaldez; 10-24-2007 at 07:59 PM.
|
|
|
10-24-2007, 08:03 PM
|
#3
|
LQ Newbie
Registered: Oct 2007
Posts: 13
Original Poster
Rep:
|
Ok...
HUGE relief. I can relax at least knowing that the files are still there, which I suspected. Like I said, as long as the pics of my daughter are there, everything else can be reinstalled, etc.
So, if I understand correctly, the easiest way for me to do this would be to install a second hard drive, boot up with the live CD, download testdisk, and use it to recover the files and dump them to the second hard drive? And in the meantime, restart the PC as little as possible? Thanks so much for your help. Other than this "little" fallback, I'm fairly excited to get to know Ubuntu.
|
|
|
10-24-2007, 08:10 PM
|
#4
|
Senior Member
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079
Rep:
|
I wouldn't use the pc until you recover your files, otherwise you could overwrite them
|
|
|
10-24-2007, 08:21 PM
|
#5
|
LQ Guru
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094
|
Quote:
Originally Posted by zoso375
HUGE relief. I can relax at least knowing that the files are still there, which I suspected. Like I said, as long as the pics of my daughter are there, everything else can be reinstalled, etc.
So, if I understand correctly, the easiest way for me to do this would be to install a second hard drive, boot up with the live CD, download testdisk, and use it to recover the files and dump them to the second hard drive? And in the meantime, restart the PC as little as possible? Thanks so much for your help. Other than this "little" fallback, I'm fairly excited to get to know Ubuntu.
|
That's right, except that you want to use photorec (the actual testdisk program is for fixing partition tables, which won't help you here). When you boot the live CD, make sure that you don't mount the drive you want to recover from at all (just use the device name like /dev/hda for the first IDE drive, etc) and mount the drive you want to dump the files to as read-write.
You might have to use a different live CD than the Ubuntu live CD since I'm not sure if testdisk is on the CD. Something like Knoppix, System Rescue CD, or the Ultimate Boot CD probably has testdisk/photorec installed.
Here's a couple links with step by step instructions for using photorec. I just glanced at them, but they look okay to me.
http://www.linux.com/articles/56588
https://help.ubuntu.com/community/DataRecovery
If it's a small drive and you have the spare space, I like to make an image using dd that way I don't have any chance of messing up the actual drive. For example if it was a 1GB SD card for a camera. But I obviously couldn't do it on my 300 GB SATA or I'd need a really big drive...
Last edited by pljvaldez; 10-24-2007 at 08:22 PM.
|
|
|
10-24-2007, 09:08 PM
|
#6
|
LQ Newbie
Registered: Oct 2007
Posts: 13
Original Poster
Rep:
|
So...
I'm guessing there's no way to recover the files without using a separate drive? I just discovered my spare HD is corrupt.
|
|
|
10-24-2007, 10:07 PM
|
#7
|
Member
Registered: Feb 2004
Distribution: Slackware 10.2
Posts: 669
Rep:
|
My i suggest you use a program called driveimageXML to backup your xp drive to another partition on your harddisk or another drive. If something like that happens again you have a complete backup you can restore at anytime.
|
|
|
10-24-2007, 10:28 PM
|
#8
|
LQ Guru
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019
Rep: 
|
Are you sure that it is corrupt? If it's NTFS and you're trying to access it from a liveCD, it may simply mean that there is a problem with the ntfs file system, not necessarily with the hardware. If you don't care about any data, you may want to try overwriting it with a Linux file system first.
If it really is corrupt, then I'm afraid that you won't be doing anything useful today. You would really be shooting yourself in the foot by overwriting your first drive a second time.
Last edited by jay73; 10-24-2007 at 10:36 PM.
|
|
|
10-25-2007, 07:01 AM
|
#9
|
LQ Newbie
Registered: Oct 2007
Posts: 13
Original Poster
Rep:
|
Thanks.
Thanks so much for all the help. Photorec has currently recovered 24000 files, and still running. The hard part will be sifting through and sorting it all out. And I will check out the driveimage app. I'd like to believe I'm getting the hang of Linux, and I definitely look forward to learning more. Any more generic tips for a Linux virgin?
|
|
|
10-25-2007, 08:41 AM
|
#10
|
Member
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676
Rep:
|
As far as a "tip" goes, I am a paranoid type of guy , I would add a bios password and disable the boot from cd option until I need it.
Just me and I know this is a home desktop, but it still could have saved you this headache at least.
good luck, I know how I would feel if I lost the pictures of my kids . :[
|
|
|
10-25-2007, 11:30 AM
|
#11
|
LQ Guru
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019
Rep: 
|
OK, another tip: Ubuntu has its own ntfs resizer. It seems to me that your brother simply overlooked that part or you wouldn't be doing all this work right now.
As for sorting your recovered files, that is a pain, I've been there too. There may be something out there that can come in handy, though, especially for pictures. I think I read some place that one person was able to recover his pictures quite fast by using Jhead. I haven't got a clue how it works but I guess it may be worth having a look at. And by the way, photorec has an option to indicate the type of files your are looking for. I guess it's too late now but you may want to keep that in mind if you ever need it again.
|
|
|
10-25-2007, 12:22 PM
|
#12
|
LQ Guru
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094
|
When I sort through files after recovery, I generally do a couple of things. First I move everything that is less than 10 KB to a separate folder. I know that none of my photos of interest are less than 10 KB. Most stuff that small are gif images and thumbnails from web browsing.
The second thing I do is run a program like fdupes to search for duplicate files and move them to another directory (notice how I'm not actually deleting anything yet). That will get things down to a more manageable number.
Like jay73 said, I typically do one filetype at a time and save them in separate directories. Then I can run fdupes on each directory and then have a small subset of everything important to go through. Then peruse through the crap at a later date before deleting it.
Also, let this be a "hard way" lesson to create backups of all your important stuff...
Last edited by pljvaldez; 10-25-2007 at 12:23 PM.
|
|
|
All times are GMT -5. The time now is 08:50 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|