PDA

View Full Version : Recover overwritten partition with Testdisk



IreneLing
April 12th, 2013, 07:52 PM
Hello all.

I accidentally overwrote my partition from Ubuntu to Android-x86. I used testdisk to search for the previous partition while using Ubuntu from USB , and here is the result :

After quick scan:

http://img545.imageshack.us/img545/222/quickscan.png

Deeper scanning:

http://img12.imageshack.us/img12/5961/deeperscan.png


After Deeper scan:

http://img707.imageshack.us/img707/6137/finishdeeperscan.png

Deeper scan results:

http://img19.imageshack.us/img19/2060/deeperscanresult.png


Only second row able to list its files , the rest are damaged:

http://img27.imageshack.us/img27/6647/resultp1.png


Before reboot :

http://img801.imageshack.us/img801/8249/aftersetl.png

Since only one partition is available , so I changed it to L and reboot , but it shown Error 17.
And I read some thread regarding the error and changed the partition to P , reboot again , but it is the Android-x86 again.

This is the first time I use Testdisk , and do not understand much about partition,disk drive etc....Wonder is my overwritten Ubuntu still exist ? is it still able to be recovered ? If not , I will need to reinstall Ubuntu with tears now.

Thank you.

darkod
April 12th, 2013, 08:37 PM
When changing the characteristic of the Linux partition, make it * (primary bootable). For the Linux Swap partition make it L (logical).

In any case you will need to reinstall grub2 since it was probably destroyed. I suggest to first recover the partitions and see if you can access the data from live mode.

If you can, reinstalling grub2 on the MBR is easy to do.

But why aren't there more folders when listing the content of the Linux partition? I'm afraid this linux partition might be from android and your ubuntu data might be lost.

IreneLing
April 13th, 2013, 07:19 PM
When changing the characteristic of the Linux partition, make it * (primary bootable). For the Linux Swap partition make it L (logical).

In any case you will need to reinstall grub2 since it was probably destroyed. I suggest to first recover the partitions and see if you can access the data from live mode.

If you can, reinstalling grub2 on the MBR is easy to do.

But why aren't there more folders when listing the content of the Linux partition? I'm afraid this linux partition might be from android and your ubuntu data might be lost.

Thank you so much for your reply.

I'm not sure why there is so less folders listed , and yes I think the Linux partition is already completely deleted....I follow your instruction but it still direct to Android.

Guess I need to reinstall Ubuntu , and really thanks for your instruction which might be useful for me in future.