You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Repairing Boot Camp after creating new partition

elyoe011 Nov 24, 2014 5:10 AM Re: Repairing Boot Camp after creating new partition

Re: Repairing Boot Camp after creating new partition in response to Loner T

Loner T,


I did this fix:


sudo fdisk -e /dev/disk0

p

setpid 4

07

flag 4

p

write

y


When I started Windows all I had was a black screen with a blinking underscore "_"


I went back to my MAC and try it again... but instead of "setpid 4" and "flag 4" I did "setpid 1" and "flag 1"


Now when I boot into Windows/BootCamp is saying "Missing Operating System" and OS X is not bootable.


Also Macintosh HD is gone from Disk Utility when I go into recovery mode and check Disk Utility...


I there any REMEDY for this? I have a lot of data that I need to recover...


ANY help is really appreciated!!!!!!!!

Mac Pro, OS X Yosemite (10.10.1)

Posted on Nov 24, 2014 6:21 AM

Reply
48 replies

Nov 24, 2014 6:22 AM in response to elyoe011

From Loner T:


Loner T Nov 24, 2014 5:33 AM Re: Repairing Boot Camp after creating new partition

Re: Repairing Boot Camp after creating new partition in response to elyoe011

Do you want to start a new thread in the Bootcamp Discussions and post the information of the following four commands


diskutil list

diskutil cs list

sudo gpt -vv -r show /dev/disk0

sudo fdisk /dev/disk0


Partition 1 is EFI/ESP is never marked bootable. OSX Bootability is derived from EFI/ESP and the GPT entries. Teh only entry that requires MBR-based bootability is Windows/Bootcamp partition, nothing else.

Nov 24, 2014 10:29 AM in response to Loner T

Loner T,


I cannot access anything on my MAC! When I booted up I get this:


User uploaded file



I cannot access the Console/Command line, I have tried Command (⌘)-S and Command (⌘)-V but nothing happens, still showing "Missing Operating System"


I can only get to Recovery using: Command (⌘)-S, then access Disk Utility and this is what I see:


User uploaded file

User uploaded fileUser uploaded fileUser uploaded fileUser uploaded file


Is there any other way, suggestions....? 😟

Nov 24, 2014 3:23 PM in response to elyoe011

If you notice, your /dev/disk0 (750GB) is fully formatted as NTFS and has no OSX installation. Did you pick the entire disk for Windows installation?


Run fdisk /dev/disk0 (you do not need sudo in the Recovery Console).


The 1.4GB /dev/disk1 is the OSX Network Recovery.


If you ran setpid 1/07/flag 1, that would explain that the first 649GB looks like NTFS, even though it is OSX.


You will need to redo the following commands.


fdisk -e /dev/disk0

setpid 1

AF

setpid 4

07

flag 4

p

w

y


This may help.

Nov 24, 2014 4:12 PM in response to Loner T

Everything was fine... Issue started when I tried to increasec the size of my bootcamp partition (from 100gb to 200gb).

I did the following:

1. I decreased my mac hd by 100gb using disk utility

2. Then I loaded bootcamp and used the "mini partition wizard" to increase the size of the partition by 100gb (unallocated space I free on mac hd)

3. I rebooted and everything went poof!!!!!! (Just for bootcamp)


Then, since bootcamp was not staring I found the solution you posted at the beginning:

· sudo fdisk -e /dev/disk0

p

setpid 4

07

flag 4

p

write

y


After this os x was still fine but windows was jus getting stuck at boot (black screen with blinking cursor)

Then I decided to do the following:

· sudo fdisk -e /dev/disk0

p

setpid 1

07

flag 1

p

write

y

After this everything brok! Mac HD disapeared and windows was showing "missing os"


Nov 24, 2014 8:17 PM in response to Loner T

Loner I really appreciate all the help you are giving me!!!


Sorry if I sound ignorant, I was reading the "Installing OS X on an external storage device" and it mention accessing the App Store and the Application folder and my mac is not capable of doing that unless there is a different way of getting there....


It will be really helpful if there is instructions (step-by-step) on how to reconstruct the GPT using Gdisk...?


Again, thanks for your time an collaboration on this!!

Nov 24, 2014 8:42 PM in response to elyoe011

No worries. I do not want you to lose your data either. 😉


If you can access Recovery (the spinning globe), you can install OSX on an external drive. You may get an older version (say Lion - as your Reinstall screen shot shows), but once you have Lion installed, upgrade it to Yosemite (which is a free Upgrade - http://www.apple.com/support/osx/upgrade/ ). Once you have Yosemite installed, install GPT Fdisk.


The screen shot of the 'Missing Operating system...' indicates you have a unibody Macbook Pro. If you have a second Mac you can also use Target Disk Mode (OS X Yosemite: Transfer files between two computers using target disk mode) to recover the GPT on the broken mac, as long as you have the appropriate cables/adapters.


Let me know how you want to proceed.

Repairing Boot Camp after creating new partition

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.