El Capitan has deleted my bootcamp windows partition

I upgraded to El Capitan and now my Windows 10 partition has disappeared. After googling the problem, it seems to be related to having resized my windows partition - which I did when I upgraded to Windows 10, after upgrading to Yosemite but before upgrading to El Capitan... I attach the following screen-shot which seems to be the first of the questions that gets asked:

User uploaded file

I also tried to install gdisk 1.0.0 but I get a warning message when I do. I tried ignoring the message and installing anyway, but it seems to fail to install.


Any help would be greatly appreciated as I don't think I can face having to reinstall everything from scratch.

iMac, OS X El Capitan (10.11), Windows 10 boot camp partition

Posted on Oct 12, 2015 2:12 PM

Reply
Question marked as Top-ranking reply

Posted on Oct 13, 2015 1:49 AM

Install GPT Fdisk (aka gdisk). Leave your Testdisk display and start a new Terminal Window. 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 notice the'+' sign in step 8 (this is called offset notation). The text in parentheses is for informational purpose to describe the action being taken. Gdisk has one-character commands except when entering numbers.


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. 509906944 ( - Start offset in sectors or the start point for Bootcamp part)
  8. +115234809 ( - 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). The only values that need modifications are the Boot flags and step 10. Accept all other defaults that Gdisk offers. Please see thesample Q&A as an example. These steps can be repeated if you make a mistake before you get to Step 12, otherwise start from Step 1 for these steps. Step 6 has numbers which are typed with a space between the numbers. Please see the sample Q&A before you execute these steps.

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


Here is sample Q&A for this section. Please notice the Press Enter/Return.


Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): Y


Creating entry for GPT partition #2 (MBR partition #2)

Enter an MBR hex code (default AF): Press Enter/Return

Set the bootable flag? (Y/N): N


Creating entry for GPT partition #3 (MBR partition #3)

Enter an MBR hex code (default AB): Press Enter/Return

Set the bootable flag? (Y/N): N


Creating entry for GPT partition #4 (MBR partition #4)

Enter an MBR hex code (default 07): Press Enter/Return

Set the bootable flag? (Y/N): Y


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.

59 replies
Question marked as Top-ranking reply

Oct 13, 2015 1:49 AM in response to Biggles293

Install GPT Fdisk (aka gdisk). Leave your Testdisk display and start a new Terminal Window. 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 notice the'+' sign in step 8 (this is called offset notation). The text in parentheses is for informational purpose to describe the action being taken. Gdisk has one-character commands except when entering numbers.


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. 509906944 ( - Start offset in sectors or the start point for Bootcamp part)
  8. +115234809 ( - 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). The only values that need modifications are the Boot flags and step 10. Accept all other defaults that Gdisk offers. Please see thesample Q&A as an example. These steps can be repeated if you make a mistake before you get to Step 12, otherwise start from Step 1 for these steps. Step 6 has numbers which are typed with a space between the numbers. Please see the sample Q&A before you execute these steps.

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


Here is sample Q&A for this section. Please notice the Press Enter/Return.


Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): Y


Creating entry for GPT partition #2 (MBR partition #2)

Enter an MBR hex code (default AF): Press Enter/Return

Set the bootable flag? (Y/N): N


Creating entry for GPT partition #3 (MBR partition #3)

Enter an MBR hex code (default AB): Press Enter/Return

Set the bootable flag? (Y/N): N


Creating entry for GPT partition #4 (MBR partition #4)

Enter an MBR hex code (default 07): Press Enter/Return

Set the bootable flag? (Y/N): Y


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.

Oct 21, 2015 2:23 PM in response to Sean_fa

Sean_fa wrote:


Sorry I'm not sure how to run Testdisk Quick Search!

Was it what you asked for?

If you have not run Testdisk, you do not have valid values for steps 7 and 8 as marked in the solution.


Start on the first page of this discussion, which has the steps for downloading and running Testdisk.


You can also look at http://imgur.com/a/PjmnK , but stop at the ninth (9th) image and post a screen shot.


I suggest you start a new discussion to avoid confusion and use this thread as a reference only.

Oct 21, 2015 1:27 PM in response to Loner T

Here is the output:


Lauras-iMac:~ I-mac-lbds$ sudo dd if=/dev/rdisk0s4 count=1 2>/dev/null | hexdump -C

Password:

00000000 00 00 00 00 00 00 00 00 00 43 00 6c 00 65 00 61 |.........C.l.e.a|

00000010 00 6e 00 4e 00 49 00 43 00 61 00 63 00 68 00 65 |.n.N.I.C.a.c.h.e|

00000020 00 00 00 00 00 00 00 00 00 4e 00 67 00 65 00 6e |.........N.g.e.n|

00000030 00 55 00 70 00 64 00 61 00 74 00 65 00 48 00 69 |.U.p.d.a.t.e.H.i|

00000040 00 67 00 68 00 65 00 73 00 74 00 56 00 65 00 72 |.g.h.e.s.t.V.e.r|

00000050 00 73 00 69 00 6f 00 6e 00 00 00 00 00 00 00 00 |.s.i.o.n........|

00000060 00 43 00 68 00 65 00 63 00 6b 00 53 00 65 00 72 |.C.h.e.c.k.S.e.r|

00000070 00 76 00 69 00 63 00 65 00 00 00 00 00 00 00 00 |.v.i.c.e........|

00000080 00 00 00 00 00 00 00 00 00 43 00 61 00 6e 00 6e |.........C.a.n.n|

00000090 00 6f 00 74 00 20 00 6f 00 70 00 65 00 6e 00 20 |.o.t. .o.p.e.n. |

000000a0 00 53 00 65 00 72 00 76 00 69 00 63 00 65 00 20 |.S.e.r.v.i.c.e. |

000000b0 00 43 00 6f 00 6e 00 74 00 72 00 6f 00 6c 00 20 |.C.o.n.t.r.o.l. |

000000c0 00 4d 00 61 00 6e 00 61 00 67 00 65 00 72 00 2e |.M.a.n.a.g.e.r..|

000000d0 00 20 00 4f 00 70 00 65 00 6e 00 53 00 43 00 4d |. .O.p.e.n.S.C.M|

000000e0 00 61 00 6e 00 61 00 67 00 65 00 72 00 20 00 72 |.a.n.a.g.e.r. .r|

000000f0 00 65 00 74 00 75 00 72 00 6e 00 65 00 64 00 20 |.e.t.u.r.n.e.d. |

00000100 00 4e 00 55 00 4c 00 4c 00 2e 00 00 00 00 00 00 |.N.U.L.L........|

00000110 00 00 00 00 00 00 00 00 00 53 00 65 00 72 00 76 |.........S.e.r.v|

00000120 00 69 00 63 00 65 00 20 00 43 00 6f 00 6e 00 74 |.i.c.e. .C.o.n.t|

00000130 00 72 00 6f 00 6c 00 20 00 4d 00 61 00 6e 00 61 |.r.o.l. .M.a.n.a|

00000140 00 67 00 65 00 72 00 20 00 6f 00 70 00 65 00 6e |.g.e.r. .o.p.e.n|

00000150 00 65 00 64 00 20 00 6f 00 6b 00 00 00 00 00 00 |.e.d. .o.k......|

00000160 00 69 00 69 00 73 00 61 00 64 00 6d 00 69 00 6e |.i.i.s.a.d.m.i.n|

00000170 00 00 00 00 00 00 00 00 00 43 00 61 00 6e 00 6e |.........C.a.n.n|

00000180 00 6f 00 74 00 20 00 6f 00 70 00 65 00 6e 00 20 |.o.t. .o.p.e.n. |

00000190 00 73 00 65 00 72 00 76 00 69 00 63 00 65 00 20 |.s.e.r.v.i.c.e. |

000001a0 00 27 00 69 00 69 00 73 00 61 00 64 00 6d 00 69 |.'.i.i.s.a.d.m.i|

000001b0 00 6e 00 27 00 20 00 77 00 69 00 74 00 68 00 20 |.n.'. .w.i.t.h. |

000001c0 00 27 00 53 00 45 00 52 00 56 00 49 00 43 00 45 |.'.S.E.R.V.I.C.E|

000001d0 00 5f 00 41 00 4c 00 4c 00 5f 00 41 00 43 00 43 |._.A.L.L._.A.C.C|

000001e0 00 45 00 53 00 53 00 27 00 2e 00 20 00 4f 00 70 |.E.S.S.'... .O.p|

000001f0 00 65 00 6e 00 53 00 65 00 72 00 76 00 69 00 63 |.e.n.S.e.r.v.i.c|

00000200

Lauras-iMac:~ I-mac-lbds$


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.

El Capitan has deleted my bootcamp windows partition

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