How to fix FDISK_partition scheme after repartitioning a larger space for bootcamp I have a Mac that is running Mojave, and yesterday I was trying to repartition the disk so I could get more space on my Windows partition for bootcamp.
In the process, the Windows folder only appeared for me to boot up. So I decided to install gdisk. In the process, I specified h for hybrid recovery command and used 2, 3, 4 for GPT partition numbers. When it asked to specify a hex code, I used ac for partition 2, 07 for partition 3, and 07 for partition 4. I then told it to set the bootable flag for partition 3. It then asked me if I wanted to change partition 4 to EE so I said yes. I have data on partition 2 I would like to recover, if that is still possible.
Now, I cannot boot into either Mac or Windows. And the ability to use gdisk has disappeared. Thanks for your help.
First off, having Mojave and a BIOS booting Windows is an uncommon, but possible combination. So I have to ask: Are you sure your Mac is setup this way?

The first partition should be type EE. When the gdisk command asks something like "good for grub?" The answer should be Yes. This will set the first partition to type EE. The second partition usually is where macOS resides. If you have Mojave installed, then this will be an APFS container. There is no hex code for a APFS type of partition. Feel free to make one up. How about FF? If the Mac is using a APFS container, then the third partition will be for Windows. This should be type 07 and should be marked as bootable. You can use the P command in gdisk to see what is in the GPT. This should confirm what I have posted so far. The 4th partition can be left empty. 


  Of course, if Windows is UEFI booting, then all of the above can be ignored. In this case, you want a fully protected MBR table.


You do not include much information on how exactly you managed to repartition a larger space for Boot Camp. I doubt this can be accomplished by using gdisk alone.

I see from your post, that you can boot to macOS Recovery. Try to capture the output from the following commands and post to your question. Note: With the current state of the partition tables, the gpt command may produce an error message..

fdisk /dev/disk0
gpt -r show /dev/disk0


Next, type typing the following commands. 

fdisk -e /dev/disk0
set 4
07
quit


If asked about writing out, confirm you want to.

Hopefully, you will be able to boot macOS.