LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 10-24-2007, 06:28 PM   #1
zoso375
LQ Newbie
 
Registered: Oct 2007
Posts: 13

Rep: Reputation: 0
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.
 
Old 10-24-2007, 06:46 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
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 06:59 PM.
 
Old 10-24-2007, 07:03 PM   #3
zoso375
LQ Newbie
 
Registered: Oct 2007
Posts: 13

Original Poster
Rep: Reputation: 0
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.
 
Old 10-24-2007, 07:10 PM   #4
AceofSpades19
Senior Member
 
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079

Rep: Reputation: 58
I wouldn't use the pc until you recover your files, otherwise you could overwrite them
 
Old 10-24-2007, 07:21 PM   #5
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
Quote:
Originally Posted by zoso375 View Post
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 07:22 PM.
 
Old 10-24-2007, 08:08 PM   #6
zoso375
LQ Newbie
 
Registered: Oct 2007
Posts: 13

Original Poster
Rep: Reputation: 0
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.
 
Old 10-24-2007, 09:07 PM   #7
Boow
Member
 
Registered: Feb 2004
Distribution: Slackware 10.2
Posts: 669

Rep: Reputation: 32
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.
 
Old 10-24-2007, 09:28 PM   #8
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
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 09:36 PM.
 
Old 10-25-2007, 06:01 AM   #9
zoso375
LQ Newbie
 
Registered: Oct 2007
Posts: 13

Original Poster
Rep: Reputation: 0
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?
 
Old 10-25-2007, 07:41 AM   #10
lord-fu
Member
 
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676

Rep: Reputation: 30
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 . :[
 
Old 10-25-2007, 10:30 AM   #11
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
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.
 
Old 10-25-2007, 11:22 AM   #12
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
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 11:23 AM.
 
  


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
LXer: Linux Data Recovery on Windows - Is possible through Disk Doctors Linux Recovery Software LXer Syndicated Linux News 0 10-22-2006 12:21 PM
Install to laptop with Windows recovery partition piltdown2006 Linux - General 1 09-20-2006 05:54 AM
File Recovery ddearie Linux - Laptop and Netbook 1 02-07-2006 07:21 PM
File recovery after partition table damage - XFS file system gracecourt Linux - General 2 01-13-2004 03:53 PM
File recovery Stephanie General 2 02-06-2003 05:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:25 PM.

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