Question: gDisk Erased Bootcamp Partition After Repair Attempt
I'm running MacOS Sierra 10.12 and Windows 10 Build 10240 on 750GB disk.
Without doing proper research, I stupidly used Disk Utility to add a new 139GB partition to the same disk that had MacOS and Bootcamp and made the filesystem as ExFat because I wanted both my MacOS and Windows to be able to read and write to it.
Lo and behold, Boot Camp was no longer functioning. Whilst MacOS still boots, the Boot Camp partition now no longer showed up in the Startup boot option menu, though it did in the Disk Utlility and on the MacOS desktop. Attempting to boot straight off of bootcamp showed the following message:
No bootable device --- insert boot disk and press any key
So I followed this tutorial:
I already know I may have made a mistake because I was using that tutorial and an answer from another apple forum post (https://discussions.apple.com/message/19071422#19071422). The nerdr tutorial in the link above says to use gptfdisk and I was using the terminal app gdisk based on the answer in the apple forum.
After following the procedure exactly, however, it had all the same menu options so I didn't know if there is a difference. After I was done, Bootcamp was completely erased. Now here's what gdisk shows as my new partition table:
Command (? for help): p
Disk /dev/disk0: 1465149168 sectors, 698.6 GiB
Sector size (logical): 512 bytes
Disk identifier (GUID): DC08A243-0BDF-4D84-870F-044744CBFD1A
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 1465149134
Partitions will be aligned on 8-sector boundaries
Total free space is 70891845 sectors (33.8 GiB)
Number Start (sector) End (sector) Size Code Name
1 40 409639 200.0 MiB EF00 EFI System Partition
2 409640 1100019007 524.3 GiB AF00
3 1100019008 1101288543 619.9 MiB AB00
4 1101288544 1392987759 139.1 GiB 0700
5 1392987760 1394257295 619.9 MiB AB00 Recovery HD
I think the data is still probably there, it is now just missing on the partition table. As you can see, the Recovery HD disk ends on sector 1394257295 and the last available sector is 1465149134. It says there is 33.8gb of free space, and the Windows bootcamp partition was around 39gb if I remember correctly.
I don't have anything backed up or have time machine running.
I thought restoring the partition I made back to the original partition may fix. I was not able to restore the ExFat partition back to the 750GB hard drive. I get message "Restore Process Has Failed" and the following list of commands:
Repartitioning target device...
Source volume is read-write and cannot be unmounted, so it can't be block copied.
I get the above message over and over, even after unmounting it, reformatting the file system as MacOS journaled, and so on. Lastly I don't know if bootcamp was booting using MBR or GPT, but the disk did have a windows folder on it if that helps.
So, is there a way to recover the bootcamp partition, without messing up my harddrive, and while keeping my 139.1 GB ExFat partition?
MacBook Pro, macOS Sierra (10.12), Bootcamp Windows 10 RTM Build 10240