Boot from an install DVD or USB key (If you have one).
From the first installer page choose Disk Utility from the Tools menu.
Check to see if it finds your partition.
Verify/Repair it.
Then, from Tools, choose Startup Disk, and see if you can set your system partition.
If you don't have an install DVD or USB key there are plenty of instructions around on how to do it.
iPartition can change partition schemes without wiping the disk if it comes to that. It's a great tool to have, I've used it a lot for various disk activities over the years, with Linux, Windows, and OSX partitions.
You need a GUID disk to boot OSX normally, not sure how you had it working with an MBR. Disk Utility will normally tell you what you have and how to correct it, if it can.
This is similar: HD accidentally reformatted to MBR, how to get back to GUID?
Long story short - make sure you back up your disk, you're probably going to be reformatting it.
FIX WITH ACCESS TO SHARED PARTITION
To get Windows to boot, you can try entering the following in gdisk
from OS X. Before entering the command, you will have to disable System Integrity Protection (SIP). If Windows boots, you will be able to access the new shared partition from Windows. If Windows does not boot, follow the instructions in the section titled "FIX WITHOUT ACCESS TO SHARED PARTITION".
Steelhead:~ davidanderson$ gdisk /dev/disk0
GPT fdisk (gdisk) version 1.0.1
Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Partition table scan:
MBR: hybrid
BSD: not present
APM: not present
GPT: present
Found valid GPT with hybrid MBR; using GPT.
Command (? for help): r
Recovery/transformation command (? for help): h
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,
just hit the Enter key at the below prompt and your MBR partition table will
be untouched.
Type from one to three GPT partition numbers, separated by spaces, to be
added to the hybrid MBR, in sequence: 2 4 5
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): y
Creating entry for GPT partition #2 (MBR partition #2)
Enter an MBR hex code (default AF): af
Set the bootable flag? (Y/N): n
Creating entry for GPT partition #4 (MBR partition #3)
Enter an MBR hex code (default 07): 0b
Set the bootable flag? (Y/N): n
Creating entry for GPT partition #5 (MBR partition #4)
Enter an MBR hex code (default 07): 07
Set the bootable flag? (Y/N): y
Recovery/transformation command (? for help): w
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/disk1.
Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Warning: The kernel may continue to use old or deleted partitions.
You should reboot or remove the drive.
The operation has completed successfully.
Steelhead:~ davidanderson$
FIX WITHOUT ACCESS TO SHARED PARTITION
To get Windows to boot, you can try entering the following in gdisk
from OS X. Before entering the command, you will have to disable System Integrity Protection (SIP). If Windows boots, you will not be able to access the new partition from Windows.
Steelhead:~ davidanderson$ gdisk /dev/disk0
GPT fdisk (gdisk) version 1.0.1
Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Partition table scan:
MBR: hybrid
BSD: not present
APM: not present
GPT: present
Found valid GPT with hybrid MBR; using GPT.
Command (? for help): r
Recovery/transformation command (? for help): h
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,
just hit the Enter key at the below prompt and your MBR partition table will
be untouched.
Type from one to three GPT partition numbers, separated by spaces, to be
added to the hybrid MBR, in sequence: 2 3 5
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): y
Creating entry for GPT partition #2 (MBR partition #2)
Enter an MBR hex code (default AF): af
Set the bootable flag? (Y/N): n
Creating entry for GPT partition #3 (MBR partition #3)
Enter an MBR hex code (default AB): ab
Set the bootable flag? (Y/N): n
Creating entry for GPT partition #5 (MBR partition #4)
Enter an MBR hex code (default 07): 07
Set the bootable flag? (Y/N): y
Recovery/transformation command (? for help): w
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/disk1.
Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Warning: The kernel may continue to use old or deleted partitions.
You should reboot or remove the drive.
The operation has completed successfully.
Steelhead:~ davidanderson$
Best Answer
The drives containing the macOS operating system are required to use a GUID partition table (GPT) and contain at least one EFI partition. This table holds up to at least 120 partition entries. There is also a Master Boot Record (MBR) partition table on each drive, but this table is only used by Windows installations on older Mac models.
While having extended partitions is theoretically possible, I have never seen any installation use such a configuration. There are other solutions that make extended partitions unnecessary.
The Startup Disk pane of the macOS System Preferences application, can display other operating systems and startup managers, but on the latest versions of macOS, only the macOS and Windows operating systems can be selected.
You can invoke the Startup Manager by holding down the option key on startup or restart. The Startup Manager menu can display and boot macOs, Windows, other operating systems and other startup managers. For other operating systems and/or startup managers to appear, the boot files usually have to copied to a location compatible with the Startup Manager.
On the newer model Macs, the instructions for adding Ubuntu after installing macOS and Windows can be found at the link below.
Installing Ubuntu on Mac with macOS and Windows already installed
If you already have macOS, Windows and Ubuntu installed on a Mac, the following link explains how to add Ubuntu to the Startup Manager menu.
Triple boot macOS High Sierra, Ubuntu, and Windows without rEFInd