mandemcole

Q: Missing BootCamp partition after installing OS X El Capitan

I used to have a 40GB Windows 10 BootCamp partition. I wanted to reduce the size of the partition but having installed El Capitan, I found the the BootCamp volume is 'missing' ie greyed out in Disk Utility and no longer visible as a startup disk.

 

I saw threads on similar issues (e.g. @Loner T: Boot camp missing after El Capitan - My output) and hoped I might be able to get some assistance in restoring it.

 

Thanks to anyone who can help!

 

User @Loner T asked for the following Terminal outputs to help to specify my particular issue:

 

Last login: Sun Nov 22 14:00:52 on console

Lisas-MacBook-Pro:~ lisa$ diskutil list

/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_HFS Holly                   180.0 GB   disk0s2

   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

   4:       Microsoft Basic Data                         40.0 GB    disk0s4

Lisas-MacBook-Pro:~ lisa$ diskutil cs list

No CoreStorage logical volume groups found

Lisas-MacBook-Pro:~ lisa$ sudo gpt -vv -r show /dev/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: /dev/disk0: mediasize=251000193024; sectorsize=512; blocks=490234752

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

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

  353241672   58869176        

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

  490233856        863        

  490234719         32         Sec GPT table

  490234751          1         Sec GPT header

Lisas-MacBook-Pro:~ lisa$ sudo fdisk /dev/disk0

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 -     409639] <Unknown ID>

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

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

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

MacBook Pro with Retina display, OS X El Capitan (10.11.1), 2.3 GHz Intel Core i7 16 GB

Posted on Nov 22, 2015 6:57 AM

Close

Q: Missing BootCamp partition after installing OS X El Capitan

  • All replies
  • Helpful answers

  • by Loner T,Solvedanswer

    Loner T Loner T Nov 24, 2015 2:12 AM in response to mandemcole
    Level 7 (24,002 points)
    Safari
    Nov 24, 2015 2:12 AM in response to mandemcole

    The gap between GPT3 and GPT4 indicates that you have a lost NTFS header in this gap. Can you use El Capitan has deleted my bootcamp windows partition as a reference and download Testdisk and GPT Fdisk and start a Testdisk scan?

  • by mandemcole,

    mandemcole mandemcole Nov 24, 2015 1:07 AM in response to Loner T
    Level 1 (0 points)
    Nov 24, 2015 1:07 AM in response to Loner T

    Hi @Loner T,

     

    Thanks for responding. I followed the instructions you linked to but ran into an error with GPT Fdisk: "Unable to open device '/dev/rdisk0' for writing! Errno is 1! Aborting write!"

     

    Full outputs are below. Let me know if you need to see any other Testdisk screens?

     

    TESTDISK OUTPUT:

    Last login: Tue Nov 24 08:44:19 on ttys002

    Lisas-MacBook-Pro:~ lisa$ /Users/lisa/Downloads/testdisk-7.0/testdisk ; exit;

    TestDisk 7.0, Data Recovery Utility, April 2015

    Christophe GRENIER <grenier@cgsecurity.org>

    http://www.cgsecurity.org

     

    No disk found.

    TestDisk will try to restart itself using the sudo command to get

    root (superuser) privileges.

     

    sudo may ask your user password, it doesn't ask for the root password.

    Usually there is no echo or '*' displayed when you type your password.

     

    Password:

    TestDisk 7.0, Data Recovery Utility, April 2015

    Christophe GRENIER <grenier@cgsecurity.org>

    http://www.cgsecurity.org

     

     

     

     

     

     

     

    TestDisk 7.0, Data Recovery Utility, April 2015

    Christophe GRENIER <grenier@cgsecurity.org>

    http://www.cgsecurity.org

         MS Data                353243136  490233848  136990713

    Directory /

     

    dr-xr-xr-x     0     0         0  8-Nov-2014 21:45 .

    dr-xr-xr-x     0     0         0  8-Nov-2014 21:45 ..

    dr-xr-xr-x     0     0         0  1-Nov-2014 11:11 $Recycle.Bin

    dr-xr-xr-x     0     0         0  1-Nov-2014 21:41 745951ad17dc7a906e5a934a03

    dr-xr-xr-x     0     0         0  1-Nov-2014 18:51 Boot

    dr-xr-xr-x     0     0         0  1-Nov-2014 11:12 Intel

    dr-xr-xr-x     0     0         0 22-Aug-2013 16:22 PerfLogs

    dr-xr-xr-x     0     0         0  1-Nov-2014 21:41 Program Files

    dr-xr-xr-x     0     0         0  1-Nov-2014 12:08 Program Files (x86)

    dr-xr-xr-x     0     0         0  1-Nov-2014 11:14 ProgramData

    dr-xr-xr-x     0     0         0  1-Nov-2014 10:52 Recovery

    >dr-xr-xr-x     0     0         0  8-Nov-2014 21:44 System Volume Information

    dr-xr-xr-x     0     0         0  1-Nov-2014 11:10 Users

    dr-xr-xr-x     0     0         0 28-Dec-2014 05:34 Windows

                                                       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

     

    GPT FDISK OUTPUT:

    Lisas-MacBook-Pro:~ lisa$ Sudo gdisk /dev/rdisk0

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

      BSD: not present

      APM: not present

      GPT: present

     

    Found valid GPT with hybrid MBR; using GPT.

     

    Command (? for help): p

    Disk /dev/rdisk0: 490234752 sectors, 233.8 GiB

    Logical sector size: 512 bytes

    Disk identifier (GUID): 00006F6E-6BE0-0000-CD22-0000E70B0000

    Partition table holds up to 128 entries

    First usable sector is 34, last usable sector is 490234718

    Partitions will be aligned on 8-sector boundaries

    Total free space is 58870045 sectors (28.1 GiB)

     

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

       1              40          409639   200.0 MiB   EF00  EFI system partition

       2          409640       351972135   167.6 GiB   AF00  Holly

       3       351972136       353241671   619.9 MiB   AB00  Recovery HD

       4       412110848       490233855   37.3 GiB    0700  BOOTCAMP

     

    Command (? for help): d  

    Partition number (1-4): 4

     

    Command (? for help): n

    Partition number (4-128, default 4): 4

    First sector (34-490234718, default = 353241672) or {+-}size{KMGTP}: 353243136

    Last sector (353243136-490234718, default = 490234718) or {+-}size{KMGTP}: +136990713

    Current type is 'Apple HFS/HFS+'

    Hex code or GUID (L to show codes, Enter = AF00): 0700

    Changed type of partition to 'Microsoft basic data'

     

    Command (? for help): p

    Disk /dev/rdisk0: 490234752 sectors, 233.8 GiB

    Logical sector size: 512 bytes

    Disk identifier (GUID): 00006F6E-6BE0-0000-CD22-0000E70B0000

    Partition table holds up to 128 entries

    First usable sector is 34, last usable sector is 490234718

    Partitions will be aligned on 8-sector boundaries

    Total free space is 2340 sectors (1.1 MiB)

     

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

       1              40          409639   200.0 MiB   EF00  EFI system partition

       2          409640       351972135   167.6 GiB   AF00  Holly

       3       351972136       353241671   619.9 MiB   AB00  Recovery HD

       4       353243136       490233848   65.3 GiB    0700  Microsoft basic data

     

    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/rdisk0.

    Warning: Devices opened with shared lock will not have their

    partition table automatically reloaded!

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

  • by mandemcole,

    mandemcole mandemcole Nov 24, 2015 1:10 AM in response to mandemcole
    Level 1 (0 points)
    Nov 24, 2015 1:10 AM in response to mandemcole

    Just noticed this link in the GPT fdisk intro text and some references to 'SIP' in the thread you linked: https://www.quora.com/How-do-I-turn-off-the-rootless-in-OS-X-El-Capitan-10-11

     

    I'll go follow those instructions and try the steps again...

  • by mandemcole,

    mandemcole mandemcole Nov 24, 2015 2:12 AM in response to mandemcole
    Level 1 (0 points)
    Nov 24, 2015 2:12 AM in response to mandemcole

    @Loner T you have saved my machine! Windows is back!

     

    The Bootcamp partition is available and bootable again and I've turned SIP back on.

     

    Thank you so much for your solution to this problem. I have no idea what I would have done without your help.

  • by Loner T,Helpful

    Loner T Loner T Nov 26, 2015 3:21 PM in response to mandemcole
    Level 7 (24,002 points)
    Safari
    Nov 26, 2015 3:21 PM in response to mandemcole

    Please backup OS X and Windows. Create a Windows System Restore point.