colinkoenig

Q: Bootcamp partition missing after yosemite installation

I am running OS X 10.10.1 currently. Right after I upgraded to Yosemite my windows 7 partition was missing. I have all of my school work and programs on that partition and I use it quite often. I have seen other questions similar to this but none with an external hard drive backed up like I do. I tried to repair the windows 7 partition with disk utility but it appears to just be floating in cyber space unrecognizable and unrepairable. Something happened when I "upgraded" to Yosemite.

 

Thankfully, I have an external hard drive with both my Macbook partition as well as my windows 7 partition saved on to my external hard drive. I went the extra mile and partitioned my external hard drive as well with a macbook partition and a windows 7 partition so they are not in the same part of the hard drive. Unfortunately I'm a little rusty with my tech skills now. How can I just restore this back to what it was? time machine won't restore my windows 7 partition. I just want everything back to where it was originally, I don't care about yosemite. I'm quite sure that I didn't overwrite the windows 7 partition on my external hard drive because it doesn't exist on this new operating system, so it must be in my external drive. Can someone please give me some direction for a beginner on stuff like this?

MacBook Pro (15-inch Mid 2012)

Posted on Mar 4, 2015 2:35 PM

Close

Q: Bootcamp partition missing after yosemite installation

  • All replies
  • Helpful answers

Previous Page 2 of 4 last Next
  • by Loner T,Solvedanswer

    Loner T Loner T Mar 4, 2015 6:18 PM in response to colinkoenig
    Level 7 (24,307 points)
    Safari
    Mar 4, 2015 6:18 PM in response to colinkoenig

    Leave your Testdisk display and start a new Terminal Window. Please use the following steps.

     

    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.

     

    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. 779970560 - Start offset in bytes  (start point for Bootcamp part)
    8. +196802553 (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 6. Accept all other defaults that Gdisk offers.


    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. W  (Write the new MBR)
    11. Y    (Yes! write the new MBR)
    12. 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.

  • by colinkoenig,

    colinkoenig colinkoenig Mar 4, 2015 6:23 PM in response to Loner T
    Level 1 (0 points)
    Mar 4, 2015 6:23 PM in response to Loner T

    Last login: Wed Mar  4 18:29:11 on ttys000

    Colins-MacBook-Pro-4:~ colinkoenig$ sudo gdisk /dev/rdisk0

    Password:

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

      BSD: not present

      APM: not present

      GPT: present

     

    Found valid GPT with hybrid MBR; using GPT.

     

    Command (? for help): P

    Disk /dev/rdisk0: 976773168 sectors, 465.8 GiB

    Logical sector size: 512 bytes

    Disk identifier (GUID): 0000748D-3F86-0000-AC09-000039110000

    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 108913493 sectors (51.9 GiB)

     

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

       1              40          409639   200.0 MiB   EF00  EFI system partition

       2          409640       778700191   371.1 GiB   AF05  Macintosh HD

       3       778700192       779969727   619.9 MiB   AB00  Recovery HD

       4       888883200       976773119   41.9 GiB    0700  BOOTCAMP

     

    Command (? for help): D

    Partition number (1-4): 4

     

    Command (? for help): 779970560

    b back up GPT data to a file

    c change a partition's name

    d delete a partition

    i show detailed information on a partition

    l list known partition types

    n add a new partition

    o create a new empty GUID partition table (GPT)

    p print the partition table

    q quit without saving changes

    r recovery and transformation options (experts only)

    s sort partitions

    t change a partition's type code

    v verify disk

    w write table to disk and exit

    x extra functionality (experts only)

    ? print this menu

     

    Command (? for help):

     

     

     

     

    ----

     

    Ok i entered that first long number....however I didn't put the second one with the plus sign in yet, It didn't display anything that seemed to appear that I should be putting in a second number. Is it ok to put this second number with the plus sign now? Just making sure I'm not doing anything wrong.

  • by Loner T,Helpful

    Loner T Loner T Mar 4, 2015 6:39 PM in response to colinkoenig
    Level 7 (24,307 points)
    Safari
    Mar 4, 2015 6:39 PM in response to colinkoenig

    You missed step 5. in the first set of commands.

     

    The d,4,n,4 sequence deletes the current GPT4 and adds it back with different start/size values.

  • by colinkoenig,

    colinkoenig colinkoenig Mar 4, 2015 6:46 PM in response to Loner T
    Level 1 (0 points)
    Mar 4, 2015 6:46 PM in response to Loner T

    Ok awesome finished the first one...on the second chain of steps I'm stuck here on the Y or N I just entered the default like you said

     

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

     

    ast login: Wed Mar  4 20:40:09 on ttys000

    Colins-MacBook-Pro-4:~ colinkoenig$ 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: hybrid

      BSD: not present

      APM: not present

      GPT: present

     

    Found valid GPT with hybrid MBR; using GPT.

     

    Command (? for help): P

    Disk /dev/disk0: 976773168 sectors, 465.8 GiB

    Logical sector size: 512 bytes

    Disk identifier (GUID): 0000748D-3F86-0000-AC09-000039110000

    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 860 sectors (430.0 KiB)

     

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

       1              40          409639   200.0 MiB   EF00  EFI system partition

       2          409640       778700191   371.1 GiB   AF05  Macintosh HD

       3       778700192       779969727   619.9 MiB   AB00  Recovery HD

       4       779970560       976773112   93.8 GiB    0700  Microsoft basic data

     

    Command (? for help): R

     

    Recovery/transformation command (? for help): H

     

    WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,

    just hit the Enter key at the below prompt and your MBR partition table will

    be untouched.

     

    Type from one to three GPT partition numbers, separated by spaces, to be

    added to the hybrid MBR, in sequence: 2 3 4

    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): N

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

     

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

    Enter an MBR hex code (default AB): Y

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

    Your option? (Y/N): Y

     

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

    Enter an MBR hex code (default 07): 07

    Set the bootable flag? (Y/N):

  • by colinkoenig,

    colinkoenig colinkoenig Mar 4, 2015 6:51 PM in response to Loner T
    Level 1 (0 points)
    Mar 4, 2015 6:51 PM in response to Loner T

    I think i accidentally hit Y and W when I should have put N can i just exit and redo it...and I skipped the default part on a few of them.

  • by Loner T,Helpful

    Loner T Loner T Mar 4, 2015 6:53 PM in response to colinkoenig
    Level 7 (24,307 points)
    Safari
    Mar 4, 2015 6:53 PM in response to colinkoenig

    Yes. This is what it should look like.

    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): 07

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

  • by colinkoenig,

    colinkoenig colinkoenig Mar 4, 2015 7:15 PM in response to Loner T
    Level 1 (0 points)
    Mar 4, 2015 7:15 PM in response to Loner T

    You literally just fixed my entire computer, a seemingly impossible and obscure problem, and a part of my life for college. Saying thank you on this forum does not begin to extend my gratitude towards you and the work you did for me. This post and the work you've done should be locked and stickied for future use for every person with this problem. Thank you so much.

  • by Loner T,

    Loner T Loner T Mar 4, 2015 7:26 PM in response to colinkoenig
    Level 7 (24,307 points)
    Safari
    Mar 4, 2015 7:26 PM in response to colinkoenig

    Glad to see it work.

     

    Please backup OS X and Windows, both, and use this as a baseline for future recovery. Time Machine does not backup Windows. Use an external disk, format it as NTFS from the Windows side, and create a backup, and enable file history, and a daily backup regimen is highly recommended for both.

     

    Good luck with your college work. Please post back if you run into any other issues.

  • by colinkoenig,

    colinkoenig colinkoenig Mar 4, 2015 7:32 PM in response to Loner T
    Level 1 (0 points)
    Mar 4, 2015 7:32 PM in response to Loner T

    Sorry...a few questions.

     

    1. By creating a backup of windows do you mean just overwriting the backup I previously had on the windows partition of my external drive?

    2. What is enabling file history and how do I do it?

    3. Is there a certain program I would use to restore windows in case of a major problem or does windows have a recovery program I can just access once I plug in my external drive.

     

    Thanks again...sorry if I'm unintelligent

  • by Loner T,

    Loner T Loner T Mar 4, 2015 7:39 PM in response to colinkoenig
    Level 7 (24,307 points)
    Safari
    Mar 4, 2015 7:39 PM in response to colinkoenig

    If you already have a Backup setup for Windows, you do not need to overwrite it. File History has a concise explanation http://windows.microsoft.com/en-US/windows-8/set-drive-file-history (i assume you are running W8+). Windows has built-in utilities for it - http://windows.microsoft.com/en-us/windows-8/what-happened-to-backup-restore. There is scheduling available in File History. It is very similar to Apple Time Machine.

  • by colinkoenig,

    colinkoenig colinkoenig Mar 4, 2015 7:43 PM in response to Loner T
    Level 1 (0 points)
    Mar 4, 2015 7:43 PM in response to Loner T

    I'm actually using win7 because I like it a lot more haha whoops...

  • by Loner T,

    Loner T Loner T Mar 4, 2015 7:48 PM in response to colinkoenig
    Level 7 (24,307 points)
    Safari
    Mar 4, 2015 7:48 PM in response to colinkoenig

    You can use W7's built-in Backup and Restore. It is quite a good tool.

     

    Please see http://windows.microsoft.com/en-us/windows/back-up-restore-faq#1TC=windows-7.

  • by habashynn,

    habashynn habashynn Mar 29, 2015 10:17 AM in response to Loner T
    Level 1 (0 points)
    Mar 29, 2015 10:17 AM in response to Loner T

    Loner T

    I just wanted to thank You so much with Colinkoenig as your step-by-step post ended my "Nightmare Inn" scary episode!

    I really appreciate all your efforts in solving this problem which i am sure 1000s of users passed through.

    I have a CNC machine which needs Windows to run its software -- that is why i needed to have bootcamp partition.

    On a gloomy morning after upgrading to Yosemite that partition just vanished!!! all cnc machine settings, software, jobs etc. just Gone with the Wind.

    testdisk and gdisk tools are also amazing to make life easy.

    Now it is my problem to get a better backup method for windows partition

     

    May God bless you all!

    -naguib

  • by Loner T,

    Loner T Loner T Mar 29, 2015 11:54 AM in response to habashynn
    Level 7 (24,307 points)
    Safari
    Mar 29, 2015 11:54 AM in response to habashynn

    habashynn wrote:

     

    I just wanted to thank You so much

    Glad to see it recovered and working. . Backups (and, if possible, verified backups) can save hours of pain and grief.

  • by bippity,

    bippity bippity Apr 18, 2015 1:52 PM in response to Loner T
    Level 1 (0 points)
    Apr 18, 2015 1:52 PM in response to Loner T

    I would also like to say thanks for providing these step-by-step instructions to recover the Bootcamp partition.

    I'm not entirely sure how it happened, but a few days ago I decided to add memory space to my Bootcamp volume through the MiniTool partition software. After I restarted to my Mac partition, I realized that my Bootcamp volume became 'Disk0s4' and was unmountable.

    After a good hour searching, I found this post and I just wanted to tell you that your instructions not only helped me recover the partition, but also saved all my code/programs, and my internship

Previous Page 2 of 4 last Next