1

I'm totally new on Ubuntu. Just decided to kick out the horrible windows 8: so I downloaded the last version of Ubuntu available on the web site , tried out the live cd and found it quite interesting.

After starting to install I arrived to the part where I could choose and manage the partitions where I wanted to install Ubuntu. Being new to it decided not to touch where I wasn't sure as I didn't want to loose my data partition where I have accumulated my pictures for almost 6 years.
So I decided to go back and let the installation do it by itself. There was a warning saying I would lose all my data but I supposed it would be just on the windows partition. After the install finished I started to wonder around my new OS and realized that I couldn't find my data partition. I guess this is not a new question at all, but I'm just a bit scared as I don't want to loose all the data I had.

I've been reading and trying some solutions like mounting the partitions, but it seems that the only partitions I find is one called boot and another called swap along with sda2 which I tried to mount but got the message wrong nfts format.

So here is the big question: is there any chance to recover the partition or shall I forget about everything (my files) ?

Braiam
  • 67,791
  • 32
  • 179
  • 269
getulio
  • 21
  • 2
    Stop using the hard drive immediately. Only run off a live USB/CD as you risk wiping out data if you're booting off the hard drive. – bcbc Feb 12 '13 at 01:35

3 Answers3

2

Many of the answers above are much more reliable, but in case you've really messed it up, like I've done in the past, then you can try this as a last-resort option.

For this, you'll want to use TestDisk. Once you have installed and launched TestDisk on a LiveCD/USB:

  1. Select [Analyse]
  2. Select the disk that you want to recover from
  3. Select the partition table type. For most people it will be Intel/PC
  4. Following the analysis, TestDisk may find some partitions. If it finds your old data partition, simply have it written to the disk, and that should be that.
  5. If TestDisk doesn't find any/the right partition, try a deeper search. Once again, if this finds the partition, simply write it to the disk, and you're done.
  6. If, like in my case, TestDisk is unable to write the partition to the disk, you can try creating a new partition with the exact specifications (cylinders, heads, sectors, type) your old one had, and that should be able to recover it.

If data has been written to the disk where the old partition was, which is probably the only reason you would ever need to resort to step #6, then it is likely that some/many files will be corrupted; results may vary.

If you want to read the original tutorial where I found these steps, which includes descriptive pictures, click here.

ananaso
  • 3,970
  • 4
  • 31
  • 51
  • thank you very much for your answers ill try to recover all this evevening after work , lets see if i can manage ,,, ill post back with newss hahah . – getulio Feb 12 '13 at 08:55
0

It may be possible to undelete the data partition using a tool called testdisk (see here). If not, you can still probably recover the individual photos, documents, etc. by running photorec (which comes with testdisk).

Photorec will find files even after the partition has been formatted (as happened in your case), but you'll need to recover them to another drive - so you'll need to plug in an external drive. Depending on how important your data is to you, you might consider a professional data recovery service as well, but in my experience photorec works quite well (you do have to sift through everything manually though as the file names will not be recovered).

From the website:

PhotoRec is file data recovery software designed to recover lost files including video, documents and archives from hard disks, CD-ROMs, and lost pictures (thus the Photo Recovery name) from digital camera memory. PhotoRec ignores the file system and goes after the underlying data, so it will still work even if your media's file system has been severely damaged or reformatted.

To install testdisk and photorec from a live CD (make sure the Universe repository is enabled):

sudo apt-get update
sudo apt-get install testdisk
bcbc
  • 6,026
  • Check out this for how to recover the partition (this would be the easiest method): http://askubuntu.com/questions/171163/how-to-recover-a-deleted-ntfs-partition-with-data – bcbc Feb 12 '13 at 01:45
  • thanks ill try all the methos one by one all post back!! – getulio Feb 12 '13 at 08:55
  • many thanks managed to find it now im just a bit unsure of wich step will be the best to finally recover it – getulio Feb 12 '13 at 22:14
  • If you found it in testdisk then you should be able to recover it completely (best) using this information: http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step – bcbc Feb 12 '13 at 22:33
  • hi there , i think ive just messed up a bit more, arrived till the point of changing the partition to logical , done so, and to take effect says that needed to reboot , done so , and now seems that live cd isnt able to load starts it stops and dont even load the screen where you can choose from try or install , i think the best solution will be to extract the hdd from the laptop and use it like an external hdd from another computer where i can run the live cd , like that ill also be able to stop messing with it , im quite desperated as dont really know from where to tackle the problem – getulio Feb 13 '13 at 10:44
  • @user130352 The hard disk shouldn't make any difference to how the CD boots. – bcbc Feb 13 '13 at 17:24
  • 1st: Calm down. 2nd: In certain cases (I experienced this), you must first delete your current partition tables in order to bring back the previous one. Take this advice at your own risk. If you succeeded bringing back the partition, please inform. Otherwise I think that you may need to erase the partitions in order to allow the previous to be returned to its original state. Be careful and read all the scenarios in order to know what is the best solution for you. As I mentioned, this worked for me in the past. However, I lost almost 25% of my data. Good luck. – Geppettvs D'Constanzo Feb 13 '13 at 18:13
  • @GeppettvsD'Constanzo been about an hour trying just to load the live cd from my usb but never bring up the main screen shall i try to do another usb live? – getulio Feb 13 '13 at 18:44
  • @getulio I had similar problems on my Dell computer. Wouldn't boot off a windows repair CD - tried 2 different ones, also a repair USB. Eventually it worked. Don't know why. Keep trying. Don't go deleting partition tables yet. That seems unnecessary. A last resort, certainly not based on a 'why not try this it sort've maybe worked once for me'. Another thing... your files are all there. I deleted a partition once (purposefully) and ran photorec and was shocked to see ALL my data still sitting there. Had to use dd to overwrite it and remove the data. – bcbc Feb 13 '13 at 19:16
  • @bcbc thanks ,well ,,, for the moment i just took off the "problematic" hard drive ,and downloading again the ubuntu live cd ,to reset the usb from begining ,after that the next step will be starting all over again with testdisk ,i was also able to see all my files ,tried to use the copy option from test disk but wasnt able to move them to any other directory as got the full disk message ,also done the step of changing the partition ,problem is that im completely new and no much idea of writing tables and stuff ,i decided not to rush at all, as the files will always there , waiting to be saved – getulio Feb 13 '13 at 19:34
  • @getulio that's a good plan. Measure twice, cut once. Get an external hard drive so you can copy off the data and use an a backup going forward. – bcbc Feb 13 '13 at 19:37
  • i had my external drive ready but seems i had problems detecting it too , starting to love linux at the same rate than hating it haahah – getulio Feb 13 '13 at 19:52
  • @bcbc well,,, managed to load the live cd once again , now on the left side of the screen i can find my data partition , i ve gone to devices but when trying to click on it apear the error message of "unable to mount DATA" with the message Adding read ACL for iud 999 media/ubuntu failed operation not supported , what would be the best thing to do? many thanks! – getulio Feb 13 '13 at 20:20
  • @getulio I created a chat room so we can discuss, join me here: http://chat.stackexchange.com/rooms/info/7506/discussion-between-bcbc-and-getulio?tab=general – bcbc Feb 13 '13 at 20:43
  • @bcbc my reputation seems to be to low to prticipate – getulio Feb 13 '13 at 21:19
  • @bcbc maybe somewhere where i can even send a pic , email? – getulio Feb 13 '13 at 21:28
  • @bcbc mounted and working now my doubt is ,, how can i transfer everything to somewhere safe? shall i mount the new internal hdd and tranfer there? thanks to all of you who helped ! – getulio Feb 13 '13 at 21:39
  • My email is openbcbc@gmail.com (I tried adding you explicitly but it seems the system is buggy). – bcbc Feb 13 '13 at 21:40
  • @getulio If you can mount the data partition, then you should mount the external drive as well in the same way, and copy everything to it. – bcbc Feb 13 '13 at 21:49
0

Yes. There is a good chance to recover your partitions. Nevertheless you must run the whole process from a CD/DVD/USB in order to recover your disk to the previous partition tables. You can't bring back a partition while part of/or the whole disk is mounted. So I suggest you to make a live-cd in order to run the process.

Parts of this answer comes from this previous answer.

The procedure I used is documented at the very bottom, placed here for your convenience:

IMPORTANT: Try not to use forensic recovery procedures and not to use MS based recovery tools in the first instance.

  1. First of all you calm down. Tranquil, if you erased or removed the partition's table, the data is still there. You need to find a way to bring it back, that's it.
  2. The most you can keep the drive off new data, the best for your data. If you write new data, the older data will be replaced by the new as this starts using the clusters.
  3. If possible, try not using MS based tools, which (in my case) just wrote a few clusters in the disk which made unusable some data. MS Recovery Tools (such as Easy Data Recovery and others) tries to read the partition table but it also writes some clusters which can't be fully read in order to recover the "usable part of the data". This may harm your data replacing the original allocation clusters with blank data which allows the software to gain access to the cluster itself.
  4. Follow the instructions shown on the video documented by amzertech, which was embedded in the previous post and that clearly explains exactly what I did in order to recover my data.
  5. If you follow these instructions, I am sure you are going to succeed. Even in the worst cases ([...]) you will succeed if you follow this easy instructions. Remember, the data will remain intact if you leave the disk intact. The most things you do to the disk, will be the most risk your data is reaching.

If you need further assistance don't hesitate to drop a comment.

Good luck!

  • thank you!!! ill try to learn a bit before continue touching but ill try this evening , many thanks to all of you ! – getulio Feb 12 '13 at 08:56
  • found the data partition , yipee!!! now what to do ! dont want to takee further steps without asking first ahah – getulio Feb 12 '13 at 22:04