Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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

Reply
58 replies

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.

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

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

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.

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.

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

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.

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

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 🙂

Bootcamp partition missing after yosemite installation

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