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 Bootcamp after resizing partition

I'm running El Capitan 10.11.1 and Windows 8.1 on Bootcamp. Today, I wanted to add more space to Bootcamp without erasing anything. I went to disk utility and reduced the size of the Macintosh HD by 60 GB. I now see that I have what I believe to be a third partition named untitled which is 59.4 GB.



My problem is that after rebooting and attempting to login to Bootcamp, it doesn't show up on the login window after holding the option key. I changed the startup preference to Bootcamp and saw the following message:



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



After searching for solutions, I found one that would've seemed to do the trick but I'm still stuck in the same boat.



I followed the instructions here: http://nerdr.com/tag/fix-bootcamp-partition-not-booting-mac-and-macbook-pro/



But I receive this message after what should've been the final step: Unable to open device '/dev/disk0' for writing! Errno is 1! Aborting write!



Here is the output from Terminal:


Last login: Mon Feb 1 05:48:33 on ttys000

Dannys-MacBook-Pro:~ green$ sudo gpt -r -vv show disk0

Password:

gpt show: disk0: mediasize=500107862016; sectorsize=512; blocks=976773168

gpt show: disk0: PMBR at sector 0

gpt show: disk0: Pri GPT at sector 1

gpt show: disk0: Sec GPT at sector 976773167

start size index contents

0 1 PMBR

1 1 Pri GPT header

2 32 Pri GPT table

34 6

40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B

409640 563898088 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC

564307728 1269536 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

565577264 116013520 4 GPT part - 48465300-0000-11AA-AA11-00306543ECAC

681590784 262144

681852928 294920192 5 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

976773120 15

976773135 32 Sec GPT table

976773167 1 Sec GPT header

Dannys-MacBook-Pro:~ greencity$ sudo fdisk /dev/disk0

Disk: /dev/disk0 geometry: 60801/255/63 [976773168 sectors]

Signature: 0xAA55

Starting Ending

#: id cyl hd sec - cyl hd sec [ start - size]

------------------------------------------------------------------------

1: EE 1023 254 63 - 1023 254 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

Dannys-MacBook-Pro:~ greencity$ diskutil list

/dev/disk0 (internal, physical):

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *500.1 GB disk0

1: EFI EFI 209.7 MB disk0s1

2: Apple_HFS Macintosh HD 288.7 GB disk0s2

3: Apple_Boot Recovery HD 650.0 MB disk0s3

4: Apple_HFS Untitled 59.4 GB disk0s4

5: Microsoft Basic Data BOOTCAMP 151.0 GB disk0s5

Dannys-MacBook-Pro:~ greencity$ sudo gdisk /dev/disk0

GPT fdisk (gdisk) version 1.0.1


Warning: Devices opened with shared lock will not have their

partition table automatically reloaded!

NOTE: Write test failed with error number 1. It will be impossible to save

changes to this disk's partition table!

You may need to deactivate System Integrity Protection to use this program. See

https://www.quora.com/How-do-I-turn-off-the-rootless-in-OS-X-El-Capitan-10-11

for more information.


Partition table scan:

MBR: protective

BSD: not present

APM: not present

GPT: present


Found valid GPT with protective MBR; using GPT.


Command (? for help): r


Recovery/transformation command (? for help): h


WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,

just hit the Enter key at the below prompt and your MBR partition table will

be untouched.


Type from one to three GPT partition numbers, separated by spaces, to be

added to the hybrid MBR, in sequence: 5

Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): y


Creating entry for GPT partition #5 (MBR partition #2)

Enter an MBR hex code (default 07):

Set the bootable flag? (Y/N): y


Unused partition space(s) found. Use one to protect more partitions? (Y/N): n


Recovery/transformation command (? for help): o


Disk size is 976773168 sectors (465.8 GiB)

MBR disk identifier: 0x3595D390

MBR partitions:


Number Boot Start Sector End Sector Status Code

1 1 681852927 primary 0xEE

2 * 681852928 976773119 primary 0x07


Recovery/transformation command (? for help): w


Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING

PARTITIONS!!


Do you want to proceed? (Y/N): y

OK; writing new GUID partition table (GPT) to /dev/disk0.

Warning: Devices opened with shared lock will not have their

partition table automatically reloaded!

Unable to open device '/dev/disk0' for writing! Errno is 1! Aborting write!



So, anyone know how to fix this issue without having to reinstall fully reinstall Windows?

MacBook Pro, OS X El Capitan (10.11.1), null

Posted on Feb 1, 2016 3:22 AM

Reply
6 replies

Repairing Bootcamp after resizing partition

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