Recover lost partions and file system

meetdilip

Computer Addict
On my laptop, I had Windows 10 + Ubuntu 18.04 dual boot. Using OneKey recovery, I had recovery partition for Windows. While trying bring some free space to Ubuntu using gparted, I lost the file system and partitions at boot. Nothing boot when I press the power button. I goes to grub-rescue . But when I use 18.04 as live USB, I can see one of my NTFS partitions and Windows 10 partitions available and files are intact. I think other data and partitions are safe somewhere down there,

Is there any live CD or USB methods using which I can get the file system back. Nothing has been formatted, I somehow messed up while trying gparted. Any help will be great. I am totally locked out of laptop. I have my desktop available.
 

thetechfreak

Legend Never Ends
Been in a similar situation earlier. I used this back in the day: boot-repair-disk

Best thing is it automatically fixes it(in most cases). However you'll need to make an ISO(for which you'll need a different PC). use something like RUFUS.
 
OP
meetdilip

meetdilip

Computer Addict
I fixed most of the issue by reinstalling Windows 10 using original ISO. Now only one partition is missing ( plus an Ubuntu one ). I was so close to recovering it through EaseUS partition master free edition. Sadly, only the pro edition supports recovery. They just show we can recover it after 3 hours of scanning.

The good news for me is that it looks like a good partition recovery tool can recover my data partition. I can skip Ubuntu one. For that, is there any good and free partition recovery tool which can scan and recover partition from unallocated space ? Thanks.
 
OP
meetdilip

meetdilip

Computer Addict
I tried Aomei, EaseUS and Mini Tool. All of them need premium license to recover. They simply scan and show it to us. :(

Stellar, Disk Internals,Macrorit, Paragon, Active @ partition manager also does not work either.
 
Last edited:

Desmond

Destroy Erase Improve
Staff member
Admin
The best tool for this is Testdisk, though it's a bit cumbersome to use.

TestDisk - Partition Recovery and File Undelete
 
OP
meetdilip

meetdilip

Computer Addict
@Desmond David I did try. I am confused at this part where everything is tagged as D aka deleted. I am not sure what to set them. I am adding the disk management app screenshot as well. If possible, please guide me


test disk recovered.png


lost partitions.png


I have 1 NTFS and 1 Ubuntu partition lost. My primary aim is to get back the NTFS partition which is in the unallocated space. I am ok even if the Linux one got lost.
 

Desmond

Destroy Erase Improve
Staff member
Admin
Its been a while since I've used testdisk, so I don't remember what exactly to do.

It says on the bottom "A: add partition". You could try pressing A and see if it works.

Also, it would he better if you read testdisk's documentation online.
 
OP
meetdilip

meetdilip

Computer Addict
I tried to read their documentation. Looks like everything worked for me. Only that all partitions are now on D, I need to change them to P, L, E or * .I am not sure which one is which. That is why I attached the disk management screenshot.
 

Desmond

Destroy Erase Improve
Staff member
Admin
If you are using GPT, all of your partitions will be primary partitions (P). Which means logical (L) and extended (E) partitions are not in the picture. I think setting them all to P is a safe bet.

Edit: Hold on, from your Disk Management screenshot, it looks like you have extended partition and logical partitions as well. Perhaps you are not using GPT, but MBR. In this case it's a bit more tricky. You will have to verify which partition is primary and which is extended and set it accordingly.

However, you should consider moving to GPT later, since it is more modern than MBR and is universally supported by all OSs.

Edit2: I think testdisk is displaying all of your partitions. I think you need to set the existing partitions status manually. In MBR partitions, there can be up to 4 primary partitions and any number of logical partitions inside a extended partition (It's complex, I know). In your case you have one primary partition (C:) and the rest are logical partitions. So, the sequence in this case is something like : P, E, L, L, ....

The Linux partitions in the end are probably P.
 
Last edited:
OP
meetdilip

meetdilip

Computer Addict
When I click p, I can see the folder names insidethe partition. I changed the partition types of available partitions and guessed that of 2 lost partitions. Sadly, what I did was wrong. TestDisk says Structure - Bad in red colour. I skipped the whole process worrying whether a lot of things would be messed up.
 
OP
meetdilip

meetdilip

Computer Addict
Thansk @Desmond David

Can you please recheck the C: partition in the disk management screenshot ? It says logical drive and is light blue in colour. Data( I: ) is the primary partition according to it.
 
OP
meetdilip

meetdilip

Computer Addict
This is what TestDisk thinks about the drives before going for Quick Search. Current folder struture according to them

earlier.png
 

Desmond

Destroy Erase Improve
Staff member
Admin
After a quick search I found this link: *ubuntuforums.org/showthread.php?t=1683517

See if this works for you.
 

Desmond

Destroy Erase Improve
Staff member
Admin
Thansk @Desmond David

Can you please recheck the C: partition in the disk management screenshot ? It says logical drive and is light blue in colour. Data( I: ) is the primary partition according to it.
Ahh, that should not happen. You can only make primary partitions bootable. See if you can somehow get the C drive out of the extended partition.
 
OP
meetdilip

meetdilip

Computer Addict
I have a doubt. What will happen if we move logical to primary or primary to logical ? Will it end up in loosing data ?
 

Desmond

Destroy Erase Improve
Staff member
Admin
Like I said, with MBR its tricky, too much scope for error. Much simpler for GPT because all partitions are primary in GPT.

Technically, in MBR, taking a logical partition out of an extended partition means shifting the extended partition entry after the partition you want to move out and then turn the logical partition into a primary one.
 
OP
meetdilip

meetdilip

Computer Addict
Finally I figured it out. Had to delete the OS drives and bring back the data drives as primary. Then I installed Windows 10 after arranging data into other drives. Now I have enough space for Windows 10. There is now around 100 GB waiting for me if I want to try Ubuntu as dual boot.

Thanks @thetechfreak & @Desmond David
 
Top Bottom