i just installed ubuntu on my pc , earlier os was windows xp . linux deleted all my data now i wants to recover my data back

Solution


First, are you sure that it is gone. Some people don't know where the windows copy is in Ubuntu. If you are using 11.04 or newer it'll be on your left as a hard drive icon.

If it is gone then we need to recover it. If you have done nothing more then most if not all of your personal data can be recovered. As long as you don't write over it it is still there, yes even with a reformating. So, to prevent accidentally overwriting something we'll use the cd or usb copy of ubuntu to search for files.

Boot to your install medium of Ubuntu.
1 Connect to the internet and install testdisk from...
Dec 1, 2013
3
0
10,510


 

stillblue

Honorable
Nov 30, 2012
1,163
0
11,660


First, are you sure that it is gone. Some people don't know where the windows copy is in Ubuntu. If you are using 11.04 or newer it'll be on your left as a hard drive icon.

If it is gone then we need to recover it. If you have done nothing more then most if not all of your personal data can be recovered. As long as you don't write over it it is still there, yes even with a reformating. So, to prevent accidentally overwriting something we'll use the cd or usb copy of ubuntu to search for files.

Boot to your install medium of Ubuntu.
1 Connect to the internet and install testdisk from ubuntu software center.
Open a terminal (that's like a c: prompt in windows). From the menu start typing terminal and then click on the terminal.
type- sudo testdisk
keep hitting enter to accept the default choice (after selecting your hard drive) until you reach quick search. The output of quick search will show all the partitions that it found including ones deleted during your install. If you do not see your original partition then do the deeper search. When you see your partition then highlight it and press "P" to list the files and folders there. Carefully copy what you need to another disk, do not copy it back to the original hard drive because that could over write something not yet recovered.
When you've copied them all over then you can reboot and copy from where you saved them to to your hard drive.

If that didn't find everything then you could try
sudo photorec
This will seek out all files and copy them to a new location, again do it to an external drive. The problem with photorec is that it renames things and copies everything which can take a very long time. Hours even. You can limit it to certain extensions like doc, png, jpg, etc...Which cuts that down considerably.

Good luck.
 
Solution