DIGIT-ARC read-only archive · snapshot: July 23, 2026

Recover lost partions and file system

26 posts · originally from https://geek.digit.in/community/threads/recover-lost-partions-and-file-system.206369/

meetdilip
meetdilip Original post #1
Jul 4, 2019 at 2:02 PM
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
Jul 4, 2019 at 2:22 PM
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.
meetdilip
Jul 4, 2019 at 9:40 PM
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.
meetdilip
Jul 4, 2019 at 10:16 PM
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.
Desmond
Desmond #5
Jul 5, 2019 at 1:10 AM
The best tool for this is Testdisk, though it's a bit cumbersome to use.

TestDisk - Partition Recovery and File Undelete
meetdilip
Jul 5, 2019 at 9:46 AM
@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
Desmond #7
Jul 5, 2019 at 10:13 AM
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.
meetdilip
Jul 5, 2019 at 10:26 AM
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
Desmond #9
Jul 5, 2019 at 3:22 PM
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.
meetdilip
meetdilip #10
Jul 5, 2019 at 3:43 PM
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.
meetdilip
meetdilip #11
Jul 5, 2019 at 4:20 PM
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.
meetdilip
meetdilip #12
Jul 5, 2019 at 4:52 PM
This is what TestDisk thinks about the drives before going for Quick Search. Current folder struture according to them

earlier.png
Desmond
Desmond #13
Jul 5, 2019 at 5:32 PM
After a quick search I found this link: *ubuntuforums.org/showthread.php?t=1683517

See if this works for you.
Desmond
Desmond #14
Jul 5, 2019 at 5:34 PM
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.
meetdilip
meetdilip #15
Jul 5, 2019 at 9:25 PM
This one has Structure Ok. Can I proceed ? This the only combination that got ok

TestDisk Structure Ok.png
Desmond
Desmond #16
Jul 6, 2019 at 1:51 AM
You could try, though I cannot say with any degree of certainty whether it will work or not.
meetdilip
meetdilip #17
Jul 6, 2019 at 8:11 AM
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
Desmond #18
Jul 6, 2019 at 11:42 AM
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.
meetdilip
meetdilip #19
Jul 6, 2019 at 6:15 PM
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
Desmond
Desmond #20
Jul 6, 2019 at 6:25 PM
Oh nice.

I suggest you switch to a GPT partition table to avoid such a problem in the future.
meetdilip
meetdilip #21
Jul 6, 2019 at 7:04 PM
How can I do that without loosing any data ? Which tool do you recommend ?
Desmond
Desmond #22
Jul 6, 2019 at 7:20 PM
Are you using UEFI bios or legacy BIOS? For using GPT your motherboard must have UEFI BIOS. This will also require that your OS is installed by booting the install media in "UEFI mode". That means after you convert your partition table to GPT, you must reinstall your OS. The reason you need to reinstall it because on UEFI BIOS, OSs use a special EFI boot partition where the bootloaders are stored.

As for the actual conversion, you can use the gdisk utility in linux (run it from a live USB to be safe). It will detect an MBR partition and convert it to GPT without any additional changes. Though this is fairly straightforward, it's still better if you backup all your data just in case.

Of couse, the safest way to do this is to wipe your HDD and reinstall the OS after enabling UEFI BIOS on your motherboard.
meetdilip
meetdilip #23
Jul 6, 2019 at 7:25 PM
I see, thanks. How can we check it is legacy BIOS or UEFI ?
Desmond
Desmond #24
Jul 6, 2019 at 10:18 PM
Go to your BIOS and see if there is an option for it. Which motherboard do you have BTW?
meetdilip
meetdilip #25
Jul 6, 2019 at 11:56 PM
I am not sure as it is a laptop from Dell. It has whatever it came when I bought it. Never checked myself.
Desmond
Desmond #26
Jul 7, 2019 at 12:50 AM
Which model? Perhaps I can check online what it supports.