Dual boot nightmare

How to use TestDisk to recover lost partition
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
meetdilip
Posts: 1
Joined: 05 Jul 2019, 17:00

Dual boot nightmare

#1 Post by meetdilip »

This is my first attempt with TestDisk and I am glad it is available for us. I use to have dual boot on my laptop with Windows 10 and Ubuntu 18.04. Something I tried on gparted spoiled the system. Nothing was working. I used Windows 10 bootable USB and got my laptop working. I was lucky and I got most of my partitions intact. Other than the one in which I had Ubuntu and an NTFS partition named items which had some of my data. Now I need to get these 2 partitions back. I don't mind if I am forced to skip ext4 and save items which has some of my useful files. I tried TestDisk and I got all the drives listed as shown below

Image

I would be happy if I can get all 5 NTFS partitions and the Linux partition next to it back. I think the last one is a recovery partition which is no longer required. But whatever choice do I make, I am getting a bad structure error.

I am attaching " disk management " and " This PC " screenshots so that you can understand what I have here and working. It would be great if could get those displayed drives back. Thanks.

Image

Image

User avatar
cgrenier
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Dual boot nightmare

#2 Post by cgrenier »

When using a "Basic" partition table (PC Intel), there is a limit of 4 entries in the MBR. In your case, it's not possible to choose 3 primaries and 2 logical partitions.
A workaround is to choose EFI GPT and rewrite the partition table, but you need to be able to boot from Microsoft DVD or a Ubuntu DVD/LiveUSB key to reinstall if necessary the multiboot.

recuperation
Posts: 2720
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Dual boot nightmare

#3 Post by recuperation »

cgrenier wrote: 06 Jul 2019, 07:51 When using a "Basic" partition table (PC Intel), there is a limit of 4 entries in the MBR. In your case, it's not possible to choose 3 primaries and 2 logical partitions.
When you are talking about a limit of 4 entries in the MBR, is this a limit of the Testdisk write function?
3 primary partitions should fit into the MBR, the other ones should require two linked partition tables in the "basic" format.

If Testdisk restricts itself to writing just the MBR, there is never a risk that a linked partition table is written onto a partition - something I assumed until now.

User avatar
cgrenier
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Dual boot nightmare

#4 Post by cgrenier »

The limit of 4 entries in the MBR is a limit of the MBR itself. TestDisk can recover logical partitions without problem. At least a single sector between 2 logical partitions is needed to create an extended partition entry.
Here there is no space between the 4 first partitions and between the partition "Items" and the next one, it's why I recommended to use an EFI GPT partition table.

recuperation
Posts: 2720
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Dual boot nightmare

#5 Post by recuperation »

cgrenier wrote: 07 Jul 2019, 08:43 Here there is no space between the 4 first partitions and between the partition "Items" and the next one,
Got it! I overlooked this information.

Locked