Bootcamp partition missing after Yosemite upgrade

After upgrading OS X to 10.10 my Bootcamp partition is missing. Using the free tools testdisk and also gpt, I'm trying how to rescue my Bootcamp partition.

Testdisk output:


TestDisk 7.0-WIP, Data Recovery Utility, December 2014
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org


Disk /dev/disk0 - 2000 GB / 1863 GiB - 3907029168 sectors (RO)
Current partition structure:
     Partition                  Start        End    Size in sectors


 1 P EFI System                    40     409639     409600 [EFI system partition]
 2 P Mac HFS                   409640 1953534639 1953125000 [Customer]
 3 P Mac Boot              1953534640 1954804183    1269544 [Recovery HD]
Warning: number of heads/cylinder mismatches 255 (NTFS) != 1 (HD)
Warning: number of sectors per track mismatches 63 (NTFS) != 1 (HD)
 4 P MS Data               2916796416 3907028991  990232576 [BOOTCAMP]


TestDisk 7.0-WIP, Data Recovery Utility, December 2014
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org


Disk /dev/disk0 - 2000 GB / 1863 GiB - 3907029168 sectors (RO)


The harddisk (2000 GB / 1863 GiB) seems too small! (< 2507 GB / 2335 GiB)
Check the harddisk size: HD jumpers settings, BIOS detection...


The following partitions can't be recovered:
     Partition               Start        End    Size in sectors
>  MS Data               3907028991 4897261566  990232576
   Mac HFS               3907029124 3908298667    1269544


[ Continue ]
NTFS, blocksize=4096, 506 GB / 472 GiB


TestDisk 7.0-WIP, Data Recovery Utility, December 2014
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org


Disk /dev/disk0 - 2000 GB / 1863 GiB - 3907029168 sectors (RO)
     Partition               Start        End    Size in sectors
>P EFI System                    40     409639     409600 [EFI]
 D Mac HFS                   409640 1953534639 1953125000
 D MS Data                  2582536 1954805760 1952223225
 D Mac HFS               1953534640 1954804183    1269544
 D MS Data               1954805760 3907028984 1952223225
 D MS Data               2916796416 3907028991  990232576
 D Mac HFS               3905759584 3907029127    1269544








Structure: Ok.  Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
                P=Primary  D=Deleted
Keys A: add partition, L: load backup, T: change type, P: list files,
     Enter: to continue
FAT32, blocksize=512, 209 MB / 200 MiB


sudo gpt -vv -r show /dev/disk0 output:


➜  ~  sudo gpt -vv -r show /dev/disk0
gpt show: /dev/disk0: mediasize=2000398934016; sectorsize=512; blocks=3907029168
gpt show: /dev/disk0: Suspicious MBR at sector 0
gpt show: /dev/disk0: Pri GPT at sector 1
gpt show: /dev/disk0: Sec GPT at sector 3907029167
       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  1953125000      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
  1953534640     1269544      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
  1954804184   961992232         
  2916796416   990232576      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  3907028992         143         
  3907029135          32         Sec GPT table
  3907029167           1         Sec GPT header


After selecting "List files" for D MS Data 1954805760 3907028984 1952223225 with testdisk I get the Root data of the Bootcamp partition (Programms, Programm Files, User, etc.).

Posted on Jan 14, 2015 7:51 AM

Reply
5 replies

Jan 14, 2015 8:30 AM in response to Loner T

Sure, here:


TestDisk 7.0-WIP, Data Recovery Utility, December 2014
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
     MS Data               1954805760 3907028984 1952223225
Directory /


>dr-xr-xr-x     0     0         0  4-Jan-2015 22:44 .
 dr-xr-xr-x     0     0         0  4-Jan-2015 22:44 ..
 dr-xr-xr-x     0     0         0  4-Nov-2013 19:46 $Recycle.Bin
 dr-xr-xr-x     0     0         0  6-Nov-2013 11:41 AMD
 dr-xr-xr-x     0     0         0  7-Nov-2013 10:25 Boot
 dr-xr-xr-x     0     0         0  4-Nov-2013 20:17 Intel
 dr-xr-xr-x     0     0         0  3-Oct-2014 19:26 MSOCache
 dr-xr-xr-x     0     0         0 14-Jul-2009 05:20 PerfLogs
 dr-xr-xr-x     0     0         0 27-Dec-2014 14:30 Program Files
 dr-xr-xr-x     0     0         0 22-Dec-2014 20:33 Program Files (x86)
 dr-xr-xr-x     0     0         0 22-Dec-2014 20:33 ProgramData
 dr-xr-xr-x     0     0         0  4-Nov-2013 19:45 Recovery
 dr-xr-xr-x     0     0         0 11-Jan-2015 12:50 System Volume Information
 dr-xr-xr-x     0     0         0  4-Nov-2013 19:46 Users
 dr-xr-xr-x     0     0         0  5-Dec-2014 00:54 Windows
 -r--r--r--     0     0      8192  4-Nov-2013 18:20 BOOTSECT.BAK
 -r--r--r--     0     0      2058  4-Nov-2013 20:16 RHDSetup.log
 -r--r--r--     0     0    232960  7-Nov-2007 07:12 VC_RED.MSI
 -r--r--r--     0     0   1442522  7-Nov-2007 07:09 VC_RED.cab
 -r--r--r--     0     0    383786 20-Nov-2010 13:40 bootmgr
 -r--r--r--     0     0     17734  7-Nov-2007 07:00 eula.1028.txt
 -r--r--r--     0     0     17734  7-Nov-2007 07:00 eula.1031.txt
 -r--r--r--     0     0     10134  7-Nov-2007 07:00 eula.1033.txt
 -r--r--r--     0     0     17734  7-Nov-2007 07:00 eula.1036.txt
 -r--r--r--     0     0     17734  7-Nov-2007 07:00 eula.1040.txt
 -r--r--r--     0     0       118  7-Nov-2007 07:00 eula.1041.txt
 -r--r--r--     0     0     17734  7-Nov-2007 07:00 eula.1042.txt
 -r--r--r--     0     0     17734  7-Nov-2007 07:00 eula.2052.txt
 -r--r--r--     0     0     17734  7-Nov-2007 07:00 eula.3082.txt
 -r--r--r--     0     0      1110  7-Nov-2007 07:00 globdata.ini
 -r--r--r--     0     0 3213250560 11-Jan-2015 10:54 hiberfil.sys
 -r--r--r--     0     0    562688  7-Nov-2007 07:03 install.exe
 -r--r--r--     0     0       843  7-Nov-2007 07:00 install.ini
                                                   Next
Use Right to change directory, h to hide Alternate Data Stream
    q to quit, : to select the current file, a to select all files
    C to copy the selected files, c to copy the current file

Jan 14, 2015 9:38 AM in response to wowpatrick

This a table that I use to verify that the sectors are valid.


GPT 3 StartGPT 3 SizeGPT 3 EndNTFS StartSector OffsetNTFS SizeNTFS End
1953534640126953619548041761954805760158419522232253907028985


You need to use the following steps. If you see any error messages during the following steps, please stop and post back here with the error message. The following steps have values from your Testdisk output (and you can verify) in Steps 7 and 8. Please use the default values for partition MBR hex codes when rebuilding the Hybrid MBR, as offered by Gdisk, otherwise it will cause further problems.


Rebuild GPT4 using start/end offsets


  1. Sudo gdisk /dev/rdisk0
  2. P (print the full list of parts)
  3. D (delete)
  4. 4 (part 4)
  5. N (new part)
  6. 4 (part 4)
  7. 1954805760 - Start offset in bytes (start point for Bootcamp part)
  8. +1952223225(Size offset as opposed to End offset)
  9. 0700 (Windows part type)
  10. P (print list of all parts just to see what changes will be made)
  11. W (Write the new GPT)
  12. Y (Yes! really write the new GPT)

This will delete and re-write the GPT partition info for /dev/disk0s4.

Rebuild MBR to match the new GPT information thus resetting the Hybrid MBR.

Use defaults for other questions (like partition codes).

  1. Sudo gdisk /dev/disk0
  2. P (Print list of parts)
  3. R (Recover)
  4. H (chooses Hybrid)
  5. Partitions numbers to be hybridized: 2 3 4
  6. Y (Good for GRUB question)
  7. N (part 2 boot flag)
  8. N (part 3 boot flag)
  9. Y (part 4 boot flag make NTFS bootable partition)
  10. P (Print list of updated parts)
  11. W (Write the new MBR)
  12. Y (Yes! write the new MBR)
  13. Reboot


Test 1 - Does Bootcamp Volume show up in Finder?

Test 2 - Can you see files in Bootcamp Volume?

Test 3 - Can you select Bootcamp in System Preferences -> Startup Disk?

Test 4 - If Test 3 is successful, select Bootcamp and Click Restart


If you see a hanging underline cursor at the top left on a black screen, and it does not proceed further, you may need Windows Startup Repair or a tool called EasyBCD.

Jan 14, 2015 10:54 AM in response to Loner T

Hey Loner T,


I followed your steps and now Bootcamp is working just fine! Thank you so much for your help! If you are not already an Apple Support Staff employee, they should hire you ASAP! Haven't seen such good help in a long time! Thank you!


Any chance you could explain how you calculated the partition ending values? How do did you know which ones of the MS Data sections where the right ones? Just curious to know!


Thanks again for all your help!

Jan 14, 2015 11:39 AM in response to wowpatrick

wowpatrick wrote:


I followed your steps and now Bootcamp is working just fine! Thank you so much for your help! If you are not already an Apple Support Staff employee, they should hire you ASAP! Haven't seen such good help in a long time!

😊 🙂


Any chance you could explain how you calculated the partition ending values? How do did you know which ones of the MS Data sections where the right ones? Just curious to know!



I used what you got from Testdisk from this line which has the start/end/size triplet.

MS Data 1954805760 3907028984 1952223225

If there is gap between GPT3 and GPT4, I look for a partition which is a sum of the Gap size and GPT4 size and begins a few hundred sectors after the GPT3 ends.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Bootcamp partition missing after Yosemite upgrade

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