0

I had windows 8.1 installed with bootcamp and it was running fine but I ran out of space on the partition I originally created. I had read online that I could free up space from OSX by creating a new partition on the HD and re-claiming it on the windows side. I partitioned about 60 gb from my HD with disk utility and now I can't even boot to Windows. This is what my disk utility shows. You can see that bootcamp shows up here and says it is mounted. It also shows up when selecting the startup disk. However, I believe it showed as a drive previously instead of a folder. When I try to boot Windows from this menu my MacBook restarts and goes to a screen saying there is no bootable drive. After trying many things I thought I would just erase the bootcamp partition and start over but when I start the bootcamp assistant it says "The startup disk must be formatted as a single Mac OS Extended (Journaled) volume or already partitioned by Boot Camp Assistant for installing Windows."

Any ideas of how I can recover my Windows partition or even just get rid of it and do a fresh windows install would be greatly appreciated!

  • I also have booted from a windows 8.1 flash drive and was able to boot. However, it prompted me to install and when I clicked "restore or repair Windows" it said the Windows folder was locked. – R.evolution801 Feb 16 '16 at 19:31
2

Try this:

sudo fdisk -e /dev/disk0
p
setpid 4
07
flag 4
p
write
y

This is assuming that your Boot Camp partition is still active, just not bootable. Reboot, and hold the option key as usual, and see if the bootable partition is available. This will likely fix your issue.

Just in case it doesn't, this article outlines some steps you can try.

  • I tried following those commands and I was able to mark partition 4 as active but when I type the "write" command it says "fdisk: /dev/disk0: Operation not permitted". I also tried: "sudo fdisk -e /dev/disk0s5" which is the actual bootcamp address and it said : "fdisk: /dev/disk0s5: Resource busy" – R.evolution801 Feb 17 '16 at 19:46
2

No need to navigate out of current folder, just enter the fdisk command without the sudo, i.e. : fdisk -e /dev/disk0

This will hopefully work, don't be worried if you get a message about MBR not accessible, you should be under the fdisk command prompt, enter 'p' you should then see all your partitions.

Among those partitions you should see one named "Darwin Boot" and the next partition should be your windows partition having currently an "id" 0C, take note of that partition number at the beginning of the line. Use that number instead of 4 if different when you apply the rest of the commands:

setpid 4
07
flag 4
p
write
y

Then close the terminal and reboot.

  • Don't think that accessing /dev/disk0 is possible without sudo. Also, what exactly are the commands doing? – nohillside Apr 16 '16 at 7:37
1

I encountered the same problem as you and also couldn't change the partition when using Terminal. I managed to go around that by using Recovery Mode.

To access Recovery Mode, restart your Mac while holding the ⌘ Command+R keys during the boot process, before the Apple logo.

Once there, in the menu bar, open Utilities > Terminal and use the fdisk commands. This time, you will be able to write the changes and to make them active at the next reboot.

  • Thank you for the reply, I had almost lost hope. I successfully booted into recovery mode and opened the terminal but when I typed the first command "sudo fdisk -e /dev/disk0" it said that the command 'sudo' was not found. Do I need to navigate to a particular directory or something? Any thoughts? – R.evolution801 Apr 12 '16 at 2:47

You must log in to answer this question.

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