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.

Windows partition disappeared after resizing it.

My windows partition disappeared after resizing it. Found a post with a walkthrough for how to fix it.


This post http://nerdr.com/bootcamp-partition-lost-repairing-mac-partitions/


Did everything and this is what I got in my terminal.



Enter an MBR hex code (default AF): 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 490234752 sectors (233.8 GiB)

MBR disk identifier: 0x0566FE4C

MBR partitions:


Number Boot Start Sector End Sector Status Code

1 1 133448879 primary 0xEE

2 * 133448880 489972567 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!


Recovery/transformation command (? for help):

The problem is the second to last line, says the action was aborted because the disk cannot be opened. No idea how the **** this is a problem. Help please.

MacBook Pro, iOS 10.3.1, Windows 10 is the partition

Posted on Apr 27, 2017 4:38 PM

Reply
27 replies

Apr 27, 2017 6:48 PM in response to Loner T

Disk: /dev/disk0 geometry: 30515/255/63 [490234752 sectors]

Signature: 0xAA55

Starting Ending

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

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

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

Andrews-MBP:~ Drew$ sudo gpt -vv -r show /dev/disk0

gpt show: /dev/disk0: mediasize=251000193024; sectorsize=512; blocks=490234752

gpt show: /dev/disk0: PMBR at sector 0

gpt show: /dev/disk0: Pri GPT at sector 1

gpt show: /dev/disk0: Sec GPT at sector 490234751

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 131769704 2 GPT part - 53746F72-6167-11AA-AA11-00306543ECAC

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

133448880 356523688 4 GPT part - 48465300-0000-11AA-AA11-00306543ECAC

489972568 262151

490234719 32 Sec GPT table

490234751 1 Sec GPT header

Andrews-MBP:~ Drew$

My salvation has arrived!

Apr 28, 2017 5:59 AM in response to Loner T

/dev/disk0 (internal, physical):

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *251.0 GB disk0

1: EFI EFI 209.7 MB disk0s1

2: Apple_CoreStorage Macintosh HD 67.5 GB disk0s2

3: Apple_Boot Recovery HD 650.0 MB disk0s3

4: Apple_HFS Windows 182.5 GB disk0s4


/dev/disk1 (internal, virtual):

#: TYPE NAME SIZE IDENTIFIER

0: Macintosh HD +67.1 GB disk1

Logical Volume on disk0s2

4E3CB5D2-8C36-4F22-B4B4-78BA884D3D05

Unencrypted


Andrews-MBP:~ Drew$

Seems to me that it would by #4

Apr 28, 2017 8:49 PM in response to Mrblargg

There is a NTFS primary and backup and both seem to have been destroyed when it was formatted to HFS+. There is a tool included with Testdisk called PhotoRec. There are two other tools on the Testdisk page. You may want to try those to see what can be salvaged. If none of them work, then commercial recovery tools are your last resort.

Windows partition disappeared after resizing it.

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