Saturday, April 4, 2015

How to recover lost partitions using testdisk while installing Ubuntu

How to recover lost partitions using testdisk while installing Ubuntu

Recover lost partitions like an Expert

Note: It’s extremely easy to recover lost hard disk partitions so just don’t worry and carefully follow the steps mentioned below.
I am using windows since last 5 years and never landed into problems. All the time I hear people saying Linux is great, Linux is fast, and Linux is extremely secure etcetera etcetera. So one day I thought of trying Linux. I researched on Google and decide to install Ubuntu 13.4 desktop on my laptop. I downloaded Ubuntu, made a bootable usb and started the installation.
three options for ubun installation
I got three options to install Ubuntu:
  1. Install Ubuntu alongside windows
  2. Replace windows with Ubuntu
  3. Something else
I selected the second option replace windows with Ubuntu because I thought Ubuntu will be installed in C drive and all the other drives will be unaltered. Well after 20 minutes of installation I got restless and horrified. All the important data on my pc was completely erased. Trust me the data was really important. The replace with Ubuntu option actually means that all the data on windows(all drives) will be erased. Well, now for me it was important to think about getting that data back. I got it, and therefore decided to write an article about it to help people who got into this trouble.
Quick Note: When you want to install Ubuntu in C drive only then select the third option which is “Something Else”.
Now follow the steps below to get your data back. Most probably you will get almost 95% of your data back if you have not overwritten any data after Ubuntu installation. So don’t worry, carefully follow the steps below.

Steps to recover partitions on Ubuntu:

  • First step, stop using your system. Sit relax for a while, the more you use the more data you loss.
  • Open Ubuntu software centre and install synaptic package manager.
  • Once it is installed open synaptic package manager
  • Open settings >> repositories.
  • Select the options as shown in above figure and then click close.
 ubuntu repositories and settings
  • Click on the reload button on top left of synaptic package manager.
  • After  the reload is completed enter testdisk in search bar. Mark testdisk and right click >> mark for installation. Then click on apply.
 ubuntu2 testdisk
Okay, testdisk is our tool which is going to help in recovering hard disk partitions. We are just 5 minutes away from recovering your lost partitions.

The Final step in recovering lost partitions:

  • Open the terminal by typing ctrl + alt + t you can also open it by Application >> Accessories >> Terminal.
  • Type the following command in the terminal
[syntax type="html"]Sudo testdisk[/syntax]
ubuntu create partition
  • Now click on create.
ubuntu select partition
  • Select the partition you want to recover and click on proceed.
ubuntu7

  • Click on enter.
ubuntu8

  • Select analyse and click on enter.
ubuntu9

  • Select the partition you want to recover.
ubuntu10

  • Click on write to recover the partitions.
ubuntu11

  • You will have to reboot the pc for changes to take effect. Click on ok to reboot the pc.
Well we are at the expected end of the tutorial. Now shut down you pc and restart it. Once you restart your pc you will get all the partitions that were lost.
If you have any problems ask them in comments sections or you can contact me using the contact form. If you find this article useful share it with your friends and help them recover deleted partitions if they have problems regarding it.