0

My old MacBook Pro, A1286, (15in, mid-2012) has an SSD that divided my main boot disk into two partitions, one for Mac OSX (running 10.13, High Sierra) and one for Boot camp (running Windows 10).

The boot partition was always MacOSX. Unfortunately, after I removed it to try to use it as an external drive, it got damaged in some way after I reinstalled it. It would not longer boot correctly was identifying as type "FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF" when I went into recovery mode and ran diskutil list from the terminal.

The bootcamp partition was still bootable though.

In my attempts to repair my boot partition I came across this question that seemed to be very similar to what was happening to me.

I tried to follow the steps laid out by @klanomath. Two problems arose those:

  1. I still got an error when I tried to verify the disk with diskutil verifyDisk disk0 (Specifically: Error: -69808: Some information was unavailable during an internal lookup Underlying error: 1: POSIX reports: Operation not permitted)
  2. In trying to rebuild the partitions I removed all of them from disk0, and then tried to add them back. It seemed to go ok, but now the bootcamp partition is not recognized.

Does anyone know who to restore a bootcamp partition using gpt or another method without losing the data in the partition?

Thanks

EDIT:

Here is a image of the output of diskutil list enter image description here

EDIT 2:

Progress - After @David Anderson pointed out an error (thank you for catching that) in the value I entered for the type, my partition for boot camp is recognized as "Windows Basic Data" type. enter image description here

And in Startup Disk, it shows as an option enter image description here

But unfortunately, when I try using Startup Disk to use it as the boot disk it won't boot still. And says;

"No bootable device -- insert boot disk and press any key"

When I turn on the computer and hold down the option key it doesn't show up as an option either. enter image description here

Here is the output from gpt -r show /dev/disk0

enter image description here

And here is the output from export LC_CTYPE="ASCII";dd if=/dev/disk0s2 bs=512 count=1 | vis -cw;echo

enter image description here

UPDATE:

After updating the type of the partition to 7C3457EF-0000-11AA-AA11-00306543ECAC it shows as an option to boot into if I restart the computer. But it does not show in Startup Disk. And when I try to boot to disk0s2 it will hang at the apple logo with a full progress bar.

I believe I have an idea of what may be complicating my situation. First a little further explanation of how my drives were arranged in the computer originally.

Originally I had an HDD in the computer running OSX (10.8 I believe), then after awhile I added a second drive, an SSD (disk0) and partitioned it to have a OSX partition (disk0s2) and a bootcamp partition (disk0s3). The SSD OSX became my primary boot partition and the old HDD I used for storage, but I never removed OSX completely off of it (now listed as disk1 in diskutil)

A little ago I needed to be able to use the Bootcamp partition but did not have the power adapter for the mbp, so I tried to remove the SSD and use it as an external on a different computer, that did not work, and after I placed it back into the original mbp is when disk0 s2 wasn't being recognized and I started to try to fix it. This is when I messed up my bootcamp partition and then I posted on here.

I believe the OSX Recovery that I have been using is from the original HDD which only had 10.8 on it. And after doing some research it seems that maybe 10.8 can't identify the newer OSX partition (disk0s2) and that is why in Startup Disk I don't see it, but if I reboot the computer it does show up as an option.

enter image description here Here are the outputs that you asked for.

sw_vers

ls -l /Volumes/BOOTCAMP/Boot/BCD

diskutil list

enter image description here

10
  • Edit your question and include the model/year of your Mac. Also, include the version of Windows. May 16, 2022 at 18:34
  • ok, I added the model/year and Windows version. Thanks for the recommendation
    – plapke
    May 17, 2022 at 15:30
  • What does "bootcamp partition is not recognized" mean? Does this mean you can not view the Bootcamp volume files in the Finder? Or, something else? Can you post the output from the command diskutil list? May 17, 2022 at 17:31
  • By "bootcamp partition is not recognized" I mean that it no longer shows as a boot option. I can't boot the computer at all, so I can't see Finder at all, but it also isn't recognized in Disk Utility. It just says "disk0s3" and is greyed out and says "not mounted"
    – plapke
    May 17, 2022 at 20:31
  • 1
    Have you noticed when you entered your data that you entered EBD040A2 instead of entering EBD0A0A2? In other words, you entered a 4 instead of an A. The correct value is documented here May 17, 2022 at 21:43

2 Answers 2

0

Note: You should make all the corrections to the GPT before making the changes given in this answer.

Your disk0 is not hybrid partition, which means the output from the command fdisk /dev/disk0 will probably appear as shown below.

Disk: /dev/disk0    geometry: 60801/255/63 [976773168 sectors]
Offset: 0   Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE 1023 255  63 - 1023 255  63 [         1 -  976773167] <Unknown ID>
 2: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
 3: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused      

To create a hybrid partitioned disk, you need to edit the Master Boot Record (MBR) table on disk0. This can be accomplished by using the command given below.

fdisk -f /dev/zero -e /dev/disk0

In this case, the command fdisk is interactive. Enter the data given in the first column of the table below.

User
Entry
Type Default
Value
Comment
edit 1 command no Edit first table entry
ee parameter yes Partition id
n parameter yes Edit in CHS mode?
1 parameter no Partition offset
409639 parameter no Partition size
edit 2 command no Edit second table entry
ff parameter no Partition id
n parameter yes Edit in CHS mode?
409640 parameter yes Partition offset
913864664 parameter no Partition size
edit 3 command no Edit third table entry
07 parameter no Partition id
n parameter yes Edit in CHS mode?
914274304 parameter yes Partition offset
62498816 parameter no Partition size
flag 3 command no Flag the third table entry as bootable
print command no Print loaded MBR partition table
quit command no Quit edit of current MBR, saving current changes
y parameter no Confirm save to disk, then quit?

The probable output from the fdisk interactive command print given in the above table or the command fdisk /dev/disk0 is given below.

Disk: /dev/disk0    geometry: 60801/255/63 [976773168 sectors]
Offset: 0   Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE    0   0   2 - 1023 254  63 [         1 -     409639] <Unknown ID>
 2: FF 1023 254  63 - 1023 254  63 [    409640 -  913864664] Xenix BBT   
*3: 07 1023 254  63 - 1023 254  63 [ 914274304 -   62498816] HPFS/QNX/AUX
 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused      

 

5
  • Thank you for the help. Question though, and sorry if I am being ignorant, but am I trying to create a hybrid drive or maybe the better question is do I need to? My original goal was to be able to salvage data from my disk0s2 partition. In trying to do that I messed up my bootcamp partition (disk0s3). With your help, disk util sees disk0s3 as a bootcamp, though I can't boot into it, and disk0s2 is recognized as a boot option when I restart, but again won't actually boot (it hangs at the apple logo with a full progress bar). Do I need a hybrid drive to be able to boot into either of them?
    – plapke
    May 19, 2022 at 15:30
  • Post the output from the commands sw_vers and ls -l /Volumes/BOOTCAMP/Boot/BCD. Also, if the output from diskutil list has changed, then post the new output. I ask for this output, so I can better answer the questions in your previous comment. May 19, 2022 at 16:49
  • I added the outputs, and some more background into my setup. Thanks again for all your assistance
    – plapke
    May 20, 2022 at 15:29
  • You need a hybrid partitioned drive only to get Windows to boot. You will probably need other repairs beyond hybrid partitioning in order to get Windows to boot. For example, you probably erased the BIOS boot code in the Master Boot Record (MBR). May 23, 2022 at 9:18
  • You could try upgrading from Mountain Lion to at least Sierra. This would allow you to mount APFS volumes. If successful, you could save files off the APFS volumes. Or, you could try booting from Internet Recovery using Option-Command-R. However, you would have to use the command line interface (CLI) to save files. May 23, 2022 at 9:27
0

I am also facing same issue after recovering my macOS partition which was changed by OSx recovery. To recover my macOS partition I followed the instruction at following posts

Last one was most helpful.

But in this process 1st entry of the partition table changed from MBR was PMBR. I suspect due to this only it is not showing up at the boot time, although it shows up from startup disk.

I will update my answer as I try to make my Bootcamp bootable again.

Update 1

I was able to successfully rebuild the MBR by following the step mentioned here and in another thread. But it is still not booting.

Here is the output from fdisk.

Disk: /dev/disk0    geometry: 60821/255/63 [977105060 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE    0   0   2 - 1023 254  63 [         1 -     409639] <Unknown ID>
 2: FF 1023 254  63 - 1023 254  63 [    409640 -  618098816] Xenix BBT   
 3: 07 1023 254  63 - 1023 254  63 [ 618508456 -   45836120] HPFS/QNX/AUX
*4: 07 1023 254  63 - 1023 254  63 [ 664606720 -  312498176] HPFS/QNX/AUX 

BCD is present under /Volumes/BOOTCAMP/Boot/

Disk shows up in the startup but does not boot. Am I missing something?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .