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

Bootcamp problem after upgrading to Yosemite (disk0s4)

I used to have Bootcamp running Windows 7. Then i did the upgrade to Yosemite and all the sudden I don't find it in the Startup Manager anymore. Then I looked it up in Disk Utility and it comes as "disk0s4" in gray. I used several Microsoft software for college, and now i don't know what to do. How can I recover my Bootcamp again, or is that even possible?


Thanks for your help! I'm new in the scene.

MacBook Pro, OS X Yosemite (10.10.1), 1 Disk, 2 Partitions

Posted on Feb 9, 2015 9:38 AM

Reply
18 replies

Feb 10, 2015 3:13 AM in response to Loner T

here the result of the commands you gave me


1.

Luiss-MacBook-Pro:~ Luiszea$ diskutil list

/dev/disk0

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *500.1 GB disk0

1: EFI EFI 209.7 MB disk0s1

2: Apple_CoreStorage 430.2 GB disk0s2

3: Apple_Boot Recovery HD 650.0 MB disk0s3

4: Microsoft Basic Data 40.0 GB disk0s4

/dev/disk1

#: TYPE NAME SIZE IDENTIFIER

0: Apple_HFS Macintosh HD *429.9 GB disk1

Logical Volume on disk0s2

943C368A-A750-487F-A698-3BBDCEF1BC5F

Unencrypted




2.

Luiss-MacBook-Pro:~ Luiszea$ diskutil cs list

CoreStorage logical volume groups (1 found)

|

+-- Logical Volume Group EC1DDCE8-390E-40F9-A27D-7701A1C6C7C7

=========================================================

Name: Macintosh HD

Status: Online

Size: 430249996288 B (430.2 GB)

Free Space: 19001344 B (19.0 MB)

|

+-< Physical Volume 119C2037-0984-4797-85C0-D967D597D842

| ----------------------------------------------------

| Index: 0

| Disk: disk0s2

| Status: Online

| Size: 430249996288 B (430.2 GB)

|

+-> Logical Volume Family EA6A7306-6A67-4FD9-802B-2B4C5CFFA377

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

Encryption Status: Unlocked

Encryption Type: None

Conversion Status: NoConversion

Conversion Direction: -none-

Has Encrypted Extents: No

Fully Secure: No

Passphrase Required: No

|

+-> Logical Volume 943C368A-A750-487F-A698-3BBDCEF1BC5F

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

Disk: disk1

Status: Online

Size (Total): 429878673408 B (429.9 GB)

Conversion Progress: -none-

Revertible: Yes (no decryption required)

LV Name: Macintosh HD

Volume Name: Macintosh HD

Content Hint: Apple_HFS



3.

Luiss-MacBook-Pro:~ Luiszea$ sudo gpt -vv -r show /dev/disk0

Password:

gpt show: /dev/disk0: mediasize=500107862016; sectorsize=512; blocks=976773168

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 976773167

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 840332024 2 GPT part - 53746F72-6167-11AA-AA11-00306543ECAC

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

842011200 56638912

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

976773120 15

976773135 32 Sec GPT table

976773167 1 Sec GPT header



4.

Luiss-MacBook-Pro:~ Luiszea$ sudo fdisk /dev/disk0

Disk: /dev/disk0 geometry: 60801/255/63 [976773168 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: AC 1023 254 63 - 1023 254 63 [ 409640 - 840332024] <Unknown ID>

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

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

Apr 17, 2015 5:17 AM in response to luis.p

Yes. It looks valid. One missing part is the line after MS Data is supposed to have three numbers as shown in my screen image. These are NTFS start/end/size numbers. Here is a table using your GPT entries and the start/end/size from your partition list screen. Please verify that the numbers are correct.


GPT 3 StartGPT 3 SizeGPT 3 EndNTFS StartSector OffsetNTFS SizeNTFS EndSector Offset (MB)
840741664126953684201120084201267214721347604419767731131



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. 842012672 - Start offset in bytes (start point for Bootcamp part)
  8. +134760441 (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


Here is a sample Q&A for the second set of Gdisk steps.


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.

Apr 17, 2015 8:07 AM in response to Loner T

Luiss-MacBook-Pro:~ Luiszea$ gdisk

GPT fdisk (gdisk) version 1.0.0


Type device filename, or press <Enter> to exit:

Luiss-MacBook-Pro:~ Luiszea$ Sudo gdisk /dev/rdisk0

Password:

GPT fdisk (gdisk) version 1.0.0


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): 00001F52-2D4A-0000-7A2E-00008F6F0000

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 56638933 sectors (27.0 GiB)


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

1 40 409639 200.0 MiB EF00 EFI system partition

2 409640 840741663 400.7 GiB AF05 Macintosh HD

3 840741664 842011199 619.9 MiB AB00 Recovery HD

4 898650112 976773119 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-976773134, default = 842011200) or {+-}size{KMGTP}: 842012672

Last sector (842012672-976773134, default = 976773134) or {+-}size{KMGTP}: +134760441

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: 976773168 sectors, 465.8 GiB

Logical sector size: 512 bytes

Disk identifier (GUID): 00001F52-2D4A-0000-7A2E-00008F6F0000

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 1500 sectors (750.0 KiB)


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

1 40 409639 200.0 MiB EF00 EFI system partition

2 409640 840741663 400.7 GiB AF05 Macintosh HD

3 840741664 842011199 619.9 MiB AB00 Recovery HD

4 842012672 976773112 64.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!

Warning: The kernel may continue to use old or deleted partitions.

You should reboot or remove the drive.

The operation has completed successfully.

Luiss-MacBook-Pro:~ Luiszea$

Apr 17, 2015 8:15 AM in response to Loner T

This is Step 4 of the rebuilt. Is that warning important or should I just proceed as normal?


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:

Bootcamp problem after upgrading to Yosemite (disk0s4)

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