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

repair bootcamp boot after partition modification

Hello

I tired to change the size of mac partition and after that i cant boot into windows 10 that i installed using bootcamp.

i have a mac os sierra 10.12.6 (16G29).

i tried to use the fdisk utility i launched it from recovery disk terminal it did succeed but i cant boot on windows i see the option mac , windows and recovery disk in boot utility when opening the mac but when i choose windows it doesnt boot at windows.

Here is my results of fdisk :

django-1:~ wicemtrabelsi$ sudo fdisk -e /dev/disk0

fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory

Enter 'help' for information

fdisk: 1> p

Disk: /dev/disk0 geometry: 30410/255/63 [488552530 sectors]

Sector size: 4096 bytes

Offset: 0 Signature: 0xAA55

Starting Ending

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

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

1: EE 1023 254 63 - 1023 254 63 [ 1 - 76805] <Unknown ID>

2: AF 1023 254 63 - 1023 254 63 [ 76806 - 476562710] HFS+

3: AB 1023 254 63 - 1023 254 63 [ 476639516 - 158692] Darwin Boot

4: 0C 1023 254 63 - 1023 254 63 [ 476798208 - 11754240] Win95 FAT32L

fdisk: 1>

And the result after i booted in mac

django-1:~ wicemtrabelsi$ sudo fdisk -e /dev/disk0

Password:

fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory

Enter 'help' for information

fdisk: 1> p

Disk: /dev/disk0 geometry: 30410/255/63 [488552530 sectors]

Sector size: 4096 bytes

Offset: 0 Signature: 0xAA55

Starting Ending

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

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

1: EE 1023 254 63 - 1023 254 63 [ 1 - 76805] <Unknown ID>

2: AF 1023 254 63 - 1023 254 63 [ 76806 - 476562710] HFS+

3: AB 1023 254 63 - 1023 254 63 [ 476639516 - 158692] Darwin Boot

*4: 07 1023 254 63 - 1023 254 63 [ 476798208 - 11754240] HPFS/QNX/AUX

fdisk: 1>



Thank You for your help

MacBook Pro (15-inch, 2017), macOS Sierra (10.12.6), null

Posted on Sep 20, 2017 2:06 PM

Reply
Question marked as Best reply

Posted on Sep 22, 2017 9:39 AM

Hello

This solved the solution and bootcamp worked correctly again.

Now i have two windows partitions.

Thank you Loner For your support

For thos who have this issue further just did this one and it worked for me :

sudo gdisk /dev/disk0

x (experts menu)

n (create a new protective MBR and remove the Hybrid MBR)

o (print the new MBR)

p (print the partition table)

w (write)

y (confirm write)

17 replies
Question marked as Best reply

Sep 22, 2017 9:39 AM in response to Loner T

Hello

This solved the solution and bootcamp worked correctly again.

Now i have two windows partitions.

Thank you Loner For your support

For thos who have this issue further just did this one and it worked for me :

sudo gdisk /dev/disk0

x (experts menu)

n (create a new protective MBR and remove the Hybrid MBR)

o (print the new MBR)

p (print the partition table)

w (write)

y (confirm write)

Sep 22, 2017 7:13 AM in response to Loner T

here is the output the write was aborted dont know why :

Django:~ wicemtrabelsi$ sudo gdisk /dev/disk0

Password:

GPT fdisk (gdisk) version 1.0.3


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: hybrid


BSD: not present


APM: not present


GPT: present


Found valid GPT with hybrid MBR; using GPT.


Command (? for help): x


Expert command (? for help): n


Expert command (? for help): o


Disk size is 488552530 sectors (1.8 TiB)

MBR disk identifier: 0x00000000

MBR partitions:


Number
Boot
Start Sector
End Sector
Status Code

1 1 488552529
primary 0xEE


Expert command (? for help): p

Disk /dev/disk0: 488552530 sectors, 1.8 TiB

Sector size (logical): 4096 bytes

Disk identifier (GUID): B8ED0190-29E6-4A6C-A758-B741325BC715

Partition table holds up to 128 entries

Main partition table begins at sector 2 and ends at sector 5

First usable sector is 6, last usable sector is 488552524

Partitions will be aligned on 2-sector boundaries

Total free space is 77 sectors (308.0 KiB)


Number
Start (sector) End (sector)
Size Code
Name

1 6 76805
300.0 MiB
EF00
EFI System Partition

2 76806 476639515
1.8 TiB AF00
NoName

3 476639516 476798207
619.9 MiB
AB00

4 476798208 488552447
44.8 GiB 0700
BOOTCAMP


Expert 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!

repair bootcamp boot after partition modification

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