After trying to install a third operating system Windows 10 won't boot, displaying the message "Missing Operating System". My problem seems to be very similar to this one: Triple Boot: "Missing operating system" on Windows 7 partition after Ubuntu installation
However, I followed the steps provided in the solution and it still shows the same error. I have tried many other solutions and none have worked; I can't figure out what I'm missing.
diskutil list disk0:
sudo gpt -r show /dev/disk0:
sudo fdisk /dev/disk0:
Thanks in advance!
Best Answer
You have a couple of problems.
MacOS will boot directly from firmware, doesn't require ESP to boot (most of the time) and ignores hybrid MBR.
First recreate ESP
It is likely that the contents are still there - you just need to add it's definition to your GPT partition table. You have unallocated space from positions 34 to 409606. You need to add the partition back to the table in this space which you can do using gdisk which you can download from here https://sourceforge.net/projects/gptfdisk/
Install it, then open using
sudo gdisk /dev/disk0
and you should see something like this :Take option
p
to show GPT partition table and you should see your first partition starting at position 409640 (same as mine below). Note I deleted my EFI partition table entry here so as to look the same as yours but my second partition started at the same number as you as it is the standard position after a 200MiB ESP.Now you want to backup your partition table using option
b
. This will save it to your home folder and can be used to restore if you make a mistake.Now add the missing partition table entry with option
n
. You can take defaults but make sure you set partition type toEF00
which is EFI. The start position is important - try 40 as it is the default and also what yourfdisk
screen print shows. The end position doesn't matter so just take one less than the next partition.You can then take option
p
to show GPT partiton table. Note nothing is saved yet.Create Hybrid MBR
Take options followed by
r
,h
to create new hybrid MBR partition table. All you want to put there is the Windows partition which will be your 3rd GPT partition now you've added the ESP. Take the option to add 0xEE protective MBR, set the type code for BOOTCAMP partition to0700
and make it bootable.You can then use option
o
to check it.It doesn't much matter what is in your hybrid MBR partition table as long as Windows (and Linux if you are booting it in BIOS mode) start and end at the same sectors as in the GPT table. As you can see I don't have any macOS listed at all as it EFI boots even on my 2007 MBP so what is here is irrelevant for it. Note that if you were booting Windows in EFI mode it also would not care what is in hybrid member or even be able to see it.
If you are happy you can take option
w
and write the new partition table to disk.It should now boot whether you installed Windows in BIOS or EFI mode. If it doesn't then you will need to fix bootloader with Windows standard
bcdboot
command but repairing partition tables is required first.