Mismatched MBR / GPT dilemma Topic is solved

Using TestDisk to repair the filesystem
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
ArtieJ
Posts: 5
Joined: 21 Dec 2022, 23:24

Mismatched MBR / GPT dilemma

#1 Post by ArtieJ »

TLDR: guy who know a little about computers screws up disk, begs kindly advice from fellow humans.

One morning my Windows 10 main system drive would not boot. I managed to use Testdisk
to make a copy of my files, so I do have a backup.
Then I was able to actually restore the system so that I could boot from the drive!
The problem is I was also trying things in Windows Disk Management, diskpart and system repair
so I don't remember what the magic combination was that got me to that point.

I used the system a couple of times but then a few days later it would not boot again.
I bought another disk and was going to use Clonezilla and put the system
on that but Clonezilla freaked because there was a mismatched GPT and MBR partition and would not complete the process.

The motherboard bios doesn't have a UEFI setting (about 7 years old), so I figured the drive must have been MBR originally.
I had tried to wipe the GPT off using command line in Clonezilla and using sgdisk -z /dev/sda
(yes, I confirmed it's sda). There seemed to be conflicting messages, but one did say the GPT had been destroyed and I would need to create a new partition.

So, back to Testdisk...When I select the drive and then need to select the partition table type, there is a note
Hint: EFI GPT partition table type has been detected. So I guess there are still GPT entries.

If I select EFI GPT and Analyse, it says Bad GPT partition, invalid signature. Below it shows two identical partition entries:
1 P MS Reserved 34 32767 32734 [Microsoft reserved partition]
1 P MS Reserved 34 32767 32734 [Microsoft reserved partition]

If I then select Quick Search, the message is "The hard disk 9480 GB / 447 GiB) seems too small!" and lists 2 MS Data
partitions that can't be recovered. So I hit Enter to continue.
There is a list of 6 partitions, the first one is System Reserved and is marked P, the others are marked D.

If I use Intel as the partition table type and analyse, the error is "Bad sector count. No partition is bootable."
Then using quick search, it show 3 partitions, the System Reserved is marked * for Primary bootable, the other 2 are marked P Primary.
I can select the largest partition and still list the files to copy.

At this point I'm not sure what to do. I have a backup of my files, but it's not just about the files, I'd really like to be able to boot and use the system normally.
A lot of time goes into setting up a system. I have music production software installed, there's programs, plugins, configurations, hardware settings, on and on.

If you have read all this and have any ideas, even if it's just to tell me to get stuffed and buy some rescue software,
I would greatly appreciate it anyway.

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

Re: Mismatched MBR / GPT dilemma

#2 Post by recuperation »

Instead of writing what you see on your screen please upload the relevant screenshots to this site using the attachments tab at the bottom of the page.
Please post a Testdisk log file as well.

Thank you!

ArtieJ
Posts: 5
Joined: 21 Dec 2022, 23:24

Re: Mismatched MBR / GPT dilemma

#3 Post by ArtieJ »

OK, attached first 3 screen shots of using the EFI GPT partition table type selection.
Attachments
drive_selected.jpg
drive_selected.jpg (126.38 KiB) Viewed 3557 times
drive_selected_menu.jpg
drive_selected_menu.jpg (85.35 KiB) Viewed 3557 times
efi_gpt_analyse.jpg
efi_gpt_analyse.jpg (116.6 KiB) Viewed 3557 times

ArtieJ
Posts: 5
Joined: 21 Dec 2022, 23:24

Re: Mismatched MBR / GPT dilemma

#4 Post by ArtieJ »

One more screen cap and log file to this point.
Attachments
efi_gpt_quick_search.jpg
efi_gpt_quick_search.jpg (102.18 KiB) Viewed 3556 times
testdisk_1-12-23.log
(2.16 KiB) Downloaded 185 times

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

Re: Mismatched MBR / GPT dilemma

#5 Post by recuperation »

ArtieJ wrote: 12 Jan 2023, 02:01 TLDR: guy who know a little about computers screws up disk, begs kindly advice from fellow humans.

One morning my Windows 10 main system drive would not boot. I managed to use Testdisk
to make a copy of my files, so I do have a backup.
Then I was able to actually restore the system so that I could boot from the drive!
The problem is I was also trying things in Windows Disk Management, diskpart and system repair
so I don't remember what the magic combination was that got me to that point.

I used the system a couple of times but then a few days later it would not boot again.
I bought another disk and was going to use Clonezilla and put the system
on that but Clonezilla freaked because there was a mismatched GPT and MBR partition and would not complete the process.

The motherboard bios doesn't have a UEFI setting (about 7 years old), so I figured the drive must have been MBR originally.
I had tried to wipe the GPT off using command line in Clonezilla and using sgdisk -z /dev/sda
(yes, I confirmed it's sda). There seemed to be conflicting messages, but one did say the GPT had been destroyed and I would need to create a new partition.
The command "sgdisk -z /dev/sda" lets me smell a rat. Are you using a dual boot installation?

So, back to Testdisk...When I select the drive and then need to select the partition table type, there is a note
Hint: EFI GPT partition table type has been detected. So I guess there are still GPT entries.

If I select EFI GPT and Analyse, it says Bad GPT partition, invalid signature. Below it shows two identical partition entries:
1 P MS Reserved 34 32767 32734 [Microsoft reserved partition]
1 P MS Reserved 34 32767 32734 [Microsoft reserved partition]

If I then select Quick Search, the message is "The hard disk 9480 GB / 447 GiB) seems too small!" and lists 2 MS Data
partitions that can't be recovered. So I hit Enter to continue.
There is a list of 6 partitions, the first one is System Reserved and is marked P, the others are marked D.

If I use Intel as the partition table type and analyse, the error is "Bad sector count. No partition is bootable."
Then using quick search, it show 3 partitions, the System Reserved is marked * for Primary bootable, the other 2 are marked P Primary.
I can select the largest partition and still list the files to copy.
Instead of describing screens that only you see you should have uploaded pictures to this site.
At this point I'm not sure what to do. I have a backup of my files, but it's not just about the files, I'd really like to be able to boot and use the system normally.
For that purpose you need to recover all partitions that are needed for Windows 10 using Quick Search or even Deep Search. But you should know which partition table type you were using. If that works a chkdsk-operation may be necessary. Afterwards you can try a Windows repair installation. If that fails prepare for a fresh installation of your operating system.
A lot of time goes into setting up a system. I have music production software installed, there's programs, plugins, configurations, hardware settings, on and on.
And that's why you need to backup your operating system regularly to avoid wasting time on a fresh installation.

If you have read all this and have any ideas, even if it's just to tell me to get stuffed and buy some rescue software,
I would greatly appreciate it anyway.
Rescue software does not repair installations. Testdisk is the exception but can only heal certain limited well-defined problems.

ArtieJ
Posts: 5
Joined: 21 Dec 2022, 23:24

Re: Mismatched MBR / GPT dilemma

#6 Post by ArtieJ »

The command "sgdisk -z /dev/sda" lets me smell a rat. Are you using a dual boot installation?
Using sgdisk from command prompt in Clonezilla Live CD, not a dual boot. That was a recommendation I read on a couple of sites to remove
GPT entries from boot sector. I believe the original partition table type was MBR and I probably caused Windows Disk Management to create the GPT entries.
Instead of describing screens that only you see you should have uploaded pictures to this site.
I only used screen descriptions as a shortcut, figuring if someone was interested I could provide more information. Always glad to play by the rules however, so I posted screen captures and log file immediately when instructed to do so.
...you need to recover all partitions that are needed for Windows 10 using Quick Search or even Deep Search.

Then that's what I need to learn to do. My nature is to try to do things myself and not bother others. I'll review tutorials and play with it some more.
I've used chkdsk and windows Repair options several times through the years.

Yeah, I'm just frustrated at myself. Like many I have that love/hate relationship with computers.
I don't know that my terminology is always right, so I know it can also frustrate someone attempting to help.
But I do have all the files and already have a fresh Windows installation on another disk so it's all good.

Thanks for your time.

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

Re: Mismatched MBR / GPT dilemma

#7 Post by recuperation »


ArtieJ
Posts: 5
Joined: 21 Dec 2022, 23:24

Re: Mismatched MBR / GPT dilemma

#8 Post by ArtieJ »

Let me put a happy ending bow on this thread.
I used Testdisk to write the MBR partition table type to the disk for the partitions discovered using the Intel type search, then used Windows repair tools and used some bootrec commands to make the disk bootable into Windows.
Cloezilla still complained about the mismatched MBR/GPT.
I couldn't figure out how to get rid of the GPT entries with Testdisk, so I used a little CLI program called Diskparts. Process was easy and quick. No more complaints from Clonezilla!

Got my disk cloned, and am now using the new disk. I really don't trust the old disk since the same thing happened twice within a month, so I'll wipe and discard it.
AFTER I make another clone for backup.
Thanks for your help recuperation, you prodded me in the right direction.

Locked