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.

Fixing missing Bootcamp partition after Mavericks rewrote wrong GPT

User uploaded filePreviously resized my boot camp partition (manually)


Installed Mavericks


Boot Camp disappeared


Disk0s4 is visible in Disk utility but reflects the OLD disk size (pre-resize) and additional space (available for OSX expansion) now appears in its place


[REDACTED] sudo gpt -r -vv show disk0


WARNING: Improper use of the sudo command could lead to data loss

or the deletion of important system files. Please double-check your

typing when using sudo. Type "man sudo" for more information.


To proceed, enter your password, or type Ctrl-C to abort.


Password:

gpt show: disk0: mediasize=240057409536; sectorsize=512; blocks=468862128

gpt show: disk0: Suspicious MBR at sector 0

gpt show: disk0: Pri GPT at sector 1

gpt show: disk0: Sec GPT at sector 468862127

start size index contents

0 1 MBR

1 1 Pri GPT header

2 32 Pri GPT table

34 6

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

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

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

314179176 76558744

390737920 78123008 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

468860928 1167

468862095 32 Sec GPT table

468862127 1 Sec GPT header

[REDACTED] sudo fdisk /dev/disk0

Disk: /dev/disk0 geometry: 29185/255/63 [468862128 sectors]

Signature: 0xAA55

Starting Ending

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

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

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

2: AF 1023 254 63 - 1023 254 63 [ 409640 - 312500000] HFS+

3: AB 1023 254 63 - 1023 254 63 [ 312909640 - 1269536] Darwin Boot

4: 0C 1023 254 63 - 1023 254 63 [ 390737920 - 78123008] Win95 FAT32L

[REDACTED ]

MacBook, OS X Mavericks (10.9)

Posted on Nov 29, 2013 6:04 PM

Reply
59 replies

Mar 13, 2014 10:53 AM in response to Christopher Murphy

I thought there might be some missing partitions that could be uncovered by Test Disk. No, the drive does not show up in finder (it used to).


Is there a way to execute "Ctrl-Alt-Del"? That is what it asks me to do, but I couldn't come up with the right key combination to make it work. Or do I need to boot off my Windows Install CD to use "Windows Startup Repair"?

Mar 20, 2014 10:31 PM in response to Christopher Murphy

Hi Christopher, I find this post online and it seems you really know the problem well. I encounter the similar problem, could you help me with it when you've time? Thanks!


sudo gpt -r -vv show disk0

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

gpt show: disk0: Suspicious MBR at sector 0

gpt show: disk0: Pri GPT at sector 1

gpt show: disk0: Sec GPT at sector 490234751

start size index contents

0 1 MBR

1 1 Pri GPT header

2 32 Pri GPT table

34 6

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

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

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

260811184 33838672

294649856 195584000 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

490233856 863

490234719 32 Sec GPT table

490234751 1 Sec GPT header


I've set the id of partition 4 to 07 and flag it as bootable then the result of "sudo fdisk /dev/disk0" is


Disk: /dev/disk0geometry: 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 - 409639] <Unknown ID>

2: AF 1023 254 63 - 1023 254 63 [ 409640 - 259132008] HFS+

3: AB 1023 254 63 - 1023 254 63 [ 259541648 - 1269536] Darwin Boot

*4: 07 1023 254 63 - 1023 254 63 [ 294649856 - 195584000] HPFS/QNX/AUX


The Win 7 on bootcamp will encounter missing critical files error when booting. The partition 4 may start at the wrong position as I understand after reading your posts, but I don't know how I can set it correctly. Appreciate your help!

Mar 26, 2014 7:26 AM in response to alienwang

alienwang wrote:



294649856 195584000 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7


*4: 07 1023 254 63 - 1023 254 63 [ 294649856 - 195584000] HPFS/QNX/AUX


The Win 7 on bootcamp will encounter missing critical files error when booting. The partition 4 may start at the wrong position as I understand after reading your posts, but I don't know how I can set it correctly. Appreciate your help!


Your partitions look all right. Windows boot errors may need to be fixed using Windows Recovery Console or a re-installation of the OS only.

Sep 9, 2014 12:14 AM in response to Christopher Murphy

Hi, can you help me too. I have exactly same problem.


Here is GPT,

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 702915360 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC

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

704594536 272178599

976773135 32 Sec GPT table

976773167 1 Sec GPT header


Here is fdisk result

sudo fdisk /dev/rdisk0

Disk: /dev/rdisk0 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


Gdisk result


sudo gdisk /dev/disk0

GPT fdisk (gdisk) version 0.8.10


Warning: Devices opened with shared lock will not have their

partition table automatically reloaded!

Partition table scan:

MBR: protective

BSD: not present

APM: not present

GPT: present


Found valid GPT with protective MBR; using GPT.


Thank you.

Sep 9, 2014 12:32 AM in response to pipinindrawan

Add :

Diskutil Result


diskutil list

/dev/disk0

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *500.1 GB disk0

1: EFI EFI 209.7 MB disk0s1

2: Apple_HFS Macintosh HD 359.9 GB disk0s2

3: Apple_Boot Recovery HD 650.0 MB disk0s3

4: Microsoft Basic Data 101.0 GB disk0s4


Gdisk


sudo gdisk /dev/disk0

GPT fdisk (gdisk) version 0.8.10


Warning: Devices opened with shared lock will not have their

partition table automatically reloaded!

Partition table scan:

MBR: protective

BSD: not present

APM: not present

GPT: present


Found valid GPT with protective MBR; using GPT.


Command (? for help): p

Disk /dev/disk0: 976773168 sectors, 465.8 GiB

Logical sector size: 512 bytes

Disk identifier (GUID): 0000675B-12B2-0000-2C17-000041680000

Partition table holds up to 128 entries

First usable sector is 34, last usable sector is 976773134

Partitions will be aligned on 8-sector boundaries

Total free space is 272178605 sectors (129.8 GiB)


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

1 40 409639 200.0 MiB EF00 EFI system partition

2 409640 703324999 335.2 GiB AF00 Customer

3 703325000 704594535 619.9 MiB AB00 Recovery HD

Sep 21, 2014 9:01 PM in response to Christopher Murphy

I think I am having the same issue. I created a bootcamp partition and then resized it later on for my windows. Mavericks installed and seemed not to affect it, but today my bootcamp partition disappeared. I have read through this post and many others and I need a bit of guidance on how to proceed. I'm not gun-shy with using terminal, but there are some work files on the windows side that I cannot lose (client files, etc.), so I need to be careful. Here is what I found so far:


Disk /dev/disk0 - 750 GB / 698 GiB - 1465149168 sectors (RO)

Current partition structure:

Partition Start End Size in sectors


1 P EFI System 40 409639 409600 [EFI system partitio

2 P Mac HFS 409640 1075084335 1074674696 [Customer]

3 P Mac Boot 1075084336 1076353871 1269536 [Recovery HD]

No FAT, NTFS, ext2, JFS, Reiser, cramfs or XFS marker

4 P MS Data 1269837824 1465147391 195309568 [BOOTCAMP]

4 P MS Data 1269837824 1465147391 195309568 [BOOTCAMP]


I can see the bootcamp using this tool, but I'm not sure why it is not showing up on the following, unlike the original post:

Disk /dev/disk0 - 750 GB / 698 GiB - 1465149168 sectors (RO)

Partition Start End Size in sectors

>P EFI System 40 409639 409600 [EFI]

D Mac HFS 409640 1075084335 1074674696

D MS Data 687562760 1076355072 388792313

D Mac HFS 1075084336 1076353871 1269536

D MS Data 1076355072 1465147384 388792313

D MS Data 1076355079 1465147391 388792313

D Mac HFS 1463879592 1465149127 1269536

Any thoughts on how to move forward are much appreciated!

Sep 22, 2014 4:11 AM in response to kentonfromdenton

Please post a new thread and reference to it here. It avoids confusion and makes it a bit easier to manage and read. Since you are in Testdisk, check each MS Data entry for any familiar files. You can see the movement of Recovery HD and MS Data with two separate entries. Can you also post the the output of


sudo fdisk /dev/disk0

sudo dd if=/dev/rdisk0s4 count=1 2>/dev/null | hexdump -C


in the new thread?

Oct 1, 2014 3:36 PM in response to taibanl

Hi taibnal,


seems you got the problem solved! i have the same problem.... exactly same as the one you had..


this User uploaded fileUser uploaded file


I have no idea how to use sudo or gdisk..

can anyone tell me how to do with the solution that Christopher Murphy has mentioned?

like what sort of code i should type in step by step..


User uploaded file


I feel like dying now...


your help will be appreciated very much!!!

i really nee you guys help!!


P.S.

i was following your code to make this data appear in Terminal...

Oct 1, 2014 4:33 PM in response to Adrianching

Please start a new thread and post the output of the following commands from OSX Terminal in that thread. Post a reference to that thread here.



1. diskutil list

2. diskutil cs list

3. sudo gpt -vv -r show /dev/BootcampDiskWithoutSlice (where BootcampDiskWithoutSlice is of the form disk0 and is visible from the output of 1.)

4. sudo fdisk /dev/BootcampDiskWithoutSlice

5. sudo dd if=/dev/rBootcampDisk count=1 2>/dev/null | hexdump -C (where BootcampDisk is of the form disk0s4 and is visible from the output of 1. Please note the 'r' preceding the disk0s4 format).

Fixing missing Bootcamp partition after Mavericks rewrote wrong GPT

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