pmyers42

Q: Yosemite Bootcamp Breakage

I've been doing a decent job of following the discussion so far on fixing Bootcamp post-Yosemite. (Running Windows 7.) I've run TestDisk and gotten the following screens of info:

bootcamp1.tiff

bootcamp2.tiff

bootcamp3.tiff

 

I'm not sure of what to do next. Any help?

MacBook Pro, OS X Yosemite (10.10)

Posted on Oct 29, 2014 8:32 PM

Close

Q: Yosemite Bootcamp Breakage

  • All replies
  • Helpful answers

  • by Loner T,

    Loner T Loner T Oct 29, 2014 8:48 PM in response to pmyers42
    Level 7 (23,813 points)
    Safari
    Oct 29, 2014 8:48 PM in response to pmyers42

    Do not use left/right keys anywhere in Testdisk.

     

    Press Enter and use "P" to list files and look for familiar files. The best file to look for is "System Volume Information", and Bootcamp should have just one.

     

    If you can post the output of the usual five commands, it would be helpful.

  • by Loner T,

    Loner T Loner T Oct 29, 2014 9:06 PM in response to pmyers42
    Level 7 (23,813 points)
    Safari
    Oct 29, 2014 9:06 PM in response to pmyers42

    Missed the edit window. You should check all three MS Data partition entries for familiar files. The size (the third column) for all of them being the same is a very encouraging sign.

  • by pmyers42,

    pmyers42 pmyers42 Oct 29, 2014 9:07 PM in response to Loner T
    Level 1 (0 points)
    Oct 29, 2014 9:07 PM in response to Loner T

    My files are on #4, the second MS Data from 1232365568 to 1465147384.

     

    I feel like "the usual five commands" was a reading comprehension quiz that I just failed. What are they?

     

    Here's the first fdisk command:

    sudo fdisk /dev/disk0

    ...

    Disk: /dev/disk0 geometry: 91201/255/63 [1465149168 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 - 1230686280] <Unknown ID>

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

    4: 0C 1023 254  63 - 1023 254  63 [1349916672 -  115230720] Win95 FAT32L

    Peters-MacBook-Pro-4:~ petermyers$ diskutil list

    /dev/disk0

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:      GUID_partition_scheme                        *750.2 GB   disk0

       1:                        EFI EFI                     209.7 MB   disk0s1

       2:          Apple_CoreStorage                         630.1 GB   disk0s2

       3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

       4:       Microsoft Basic Data                         59.0 GB    disk0s4

    /dev/disk1

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:                  Apple_HFS MacBook HD             *629.7 GB   disk1

                                     Logical Volume on disk0s2

                                     7959165E-5811-400A-B0E8-9673CAF86C8E

                                     Unencrypted

  • by Loner T,

    Loner T Loner T Oct 29, 2014 9:24 PM in response to pmyers42
    Level 7 (23,813 points)
    Safari
    Oct 29, 2014 9:24 PM in response to pmyers42

    No, you did not fail the Quiz.

     

    The usual five commands are (you posted the output of two of them already)

     

    diskutil list

    diskutil cs list

    sudo gpt -vv -r show /dev/disk0

    sudo fdisk /dev/disk0

    sudo dd if=/dev/rdisk0s4 count=1 2>/dev/null | hexdump -C

  • by Loner T,

    Loner T Loner T Oct 29, 2014 9:30 PM in response to pmyers42
    Level 7 (23,813 points)
    Safari
    Oct 29, 2014 9:30 PM in response to pmyers42

    pmyers42 wrote:

     

    My files are on #4, the second MS Data from 1232365568 to 1465147384.

    If you have located the files, the current GPT#4 should be deleted (based on what the GPT shows), a new GPT#4 with this start/end created, a new Hybrid MBR generated and a quick set of tests.

     

    I have been using Yosemite Upgrade Broke Bootcamp as a reference thread, if that makes it any easier for you.

  • by pmyers42,

    pmyers42 pmyers42 Oct 29, 2014 9:33 PM in response to Loner T
    Level 1 (0 points)
    Oct 29, 2014 9:33 PM in response to Loner T

    diskutil list

    /dev/disk0

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:      GUID_partition_scheme                        *750.2 GB   disk0

       1:                        EFI EFI                     209.7 MB   disk0s1

       2:          Apple_CoreStorage                         630.1 GB   disk0s2

       3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

       4:       Microsoft Basic Data                         59.0 GB    disk0s4

    /dev/disk1

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:                  Apple_HFS MacBook HD             *629.7 GB   disk1

                                     Logical Volume on disk0s2

                                     7959165E-5811-400A-B0E8-9673CAF86C8E

                                     Unencrypted


    diskutil cs list

    CoreStorage logical volume groups (1 found)

    |

    +-- Logical Volume Group BB50E155-DCA8-4D67-BFAA-4BE463548B81

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

        Name:         MacBook HD

        Status:       Online

        Size:         630111375360 B (630.1 GB)

        Free Space:   18911232 B (18.9 MB)

        |

        +-< Physical Volume 09B0544F-198B-4EE3-9473-BC2EFEDEF1FC

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

        |   Index:    0

        |   Disk:     disk0s2

        |   Status:   Online

        |   Size:     630111375360 B (630.1 GB)

        |

        +-> Logical Volume Family 409362F9-E239-4FB7-AE90-89EBF7E82B89

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

            Encryption Status:       Unlocked

            Encryption Type:         None

            Conversion Status:       NoConversion

            Conversion Direction:    -none-

            Has Encrypted Extents:   No

            Fully Secure:            No

            Passphrase Required:     No

            |

            +-> Logical Volume 7959165E-5811-400A-B0E8-9673CAF86C8E

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

                Disk:                  disk1

                Status:                Online

                Size (Total):          629740142592 B (629.7 GB)

                Conversion Progress:   -none-

                Revertible:            Yes (no decryption required)

                LV Name:               MacBook HD

                Volume Name:           MacBook HD

                Content Hint:          Apple_HFS


    sudo gpt -vv -r show /dev/disk0

    Password:

    gpt show: /dev/disk0: mediasize=750156374016; sectorsize=512; blocks=1465149168

    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 1465149167

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

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

      1232365456   117551216        

      1349916672   115230720      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      1465147392        1743        

      1465149135          32         Sec GPT table

      1465149167           1         Sec GPT header


    sudo dd if=/dev/rdisk0s4 count=1 2>/dev/null | hexdump -C

    00000000  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|

    *

    00000020  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 0d 0a  |--------------..|

    00000030  0d 0a 44 75 6d 69 74 72  75 20 53 61 6d 6f 68 76  |..Dumitru Samohv|

    00000040  61 6c 6f 76 0d 0a 50 65  73 73 61 63 0d 0a 55 6e  |alov..Pessac..Un|

    00000050  69 76 65 72 73 69 74 79  0d 0a 53 69 6e 67 6c 65  |iversity..Single|

    00000060  0d 0a 34 20 6e 65 77 20  70 68 6f 74 6f 73 0d 0a  |..4 new photos..|

    00000070  0d 0a 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |..--------------|

    00000080  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|

    *

    000000b0  2d 2d 0d 0a 0d 0a 54 77  6f 6f 20 69 73 20 74 68  |--....Twoo is th|

    000000c0  65 20 6d 6f 73 74 20 66  75 6e 20 77 61 79 20 74  |e most fun way t|

    000000d0  6f 20 6d 65 65 74 20 6e  65 77 20 70 65 6f 70 6c  |o meet new peopl|

    000000e0  65 20 69 6e 20 79 6f 75  72 20 61 72 65 61 0d 0a  |e in your area..|

    000000f0  0d 0a 68 74 74 70 3a 2f  2f 6d 61 69 6c 2e 74 77  |..http://mail.tw|

    00000100  6f 6f 2e 63 6f 6d 2f 6d  2f 68 24 6d 65 32 68 4f  |oo.com/m/h$me2hO|

    00000110  55 0d 0a 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |U..-------------|

    00000120  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|

    *

    00000150  2d 2d 2d 0d 0a 44 6f 6e  27 74 20 77 61 6e 74 20  |---..Don't want |

    00000160  74 6f 20 72 65 63 65 69  76 65 20 74 68 65 73 65  |to receive these|

    00000170  20 6d 61 69 6c 73 3f 20  46 6f 6c 6c 6f 77 20 74  | mails? Follow t|

    00000180  68 69 73 20 6c 69 6e 6b  3a 20 68 74 74 70 3a 2f  |his link: http:/|

    00000190  2f 6d 61 69 6c 2e 74 77  6f 6f 2e 63 6f 6d 2f 6d  |/mail.twoo.com/m|

    000001a0  2f 41 73 33 62 65 32 4f  79 0d 0a 54 57 4f 4f 20  |/As3be2Oy..TWOO |

    000001b0  4e 56 2f 53 41 2c 20 55  42 49 44 4f 43 41 20 43  |NV/SA, UBIDOCA C|

    000001c0  65 6e 74 65 72 20 33 31  34 35 2c 20 31 30 35 20  |enter 3145, 105 |

    000001d0  52 6f 75 74 65 20 50 6f  6d 6d 69 65 72 73 2c 20  |Route Pommiers, |

    000001e0  46 2d 37 34 33 37 30 20  42 65 6c 6c 65 76 75 65  |F-74370 Bellevue|

    000001f0  2c 20 46 72 61 6e 63 65  20 69 6e 66 6f 2d 65 6e  |, France info-en|

    00000200

  • by pmyers42,

    pmyers42 pmyers42 Oct 29, 2014 9:36 PM in response to Loner T
    Level 1 (0 points)
    Oct 29, 2014 9:36 PM in response to Loner T

    To quote from the other thread:

    sudo gdisk /dev/disk0

    p

    d

    4

    n

    4

    86923264

    538218489

    0700

    p

    w

    y

     

    I assume I modify some of these values for my situation, yes?

  • by Loner T,

    Loner T Loner T Oct 29, 2014 9:42 PM in response to pmyers42
    Level 7 (23,813 points)
    Safari
    Oct 29, 2014 9:42 PM in response to pmyers42

    pmyers42 wrote:

     

    To quote from the other thread:

    sudo gdisk /dev/disk0

    p

    d

    4

    n

    4

    86923264 1232365568

    538218489 1465147384

    0700

    p

    w

    y

     

    I assume I modify some of these values for my situation, yes?

    Yes, I just plugged in the values from your previous post. Reboot after this change.

     

    After this verify that the Bootcamp volume shows up with files and can be selected in Startup Disk. Recreate the Hybrid MBR via Gdisk, reboot and test.

     

    Your GPT output shows the typical gap between GPT#3 and GPT#4 and your Testdisk NTFS header is right in that gap.

  • by pmyers42,

    pmyers42 pmyers42 Oct 29, 2014 9:56 PM in response to Loner T
    Level 1 (0 points)
    Oct 29, 2014 9:56 PM in response to Loner T

    OK. Doing a quick Time Machine back-up before making changes. I don't know what time zone you're in, but don't feel like you have to wait up for me. If this doesn't get resolved until yesterday or Friday, it's no big deal.

     

    Thanks for the help so far.

  • by pmyers42,

    pmyers42 pmyers42 Oct 29, 2014 11:06 PM in response to Loner T
    Level 1 (0 points)
    Oct 29, 2014 11:06 PM in response to Loner T

    OK, so I can now see BOOTCAMP, but trying to boot from it brought up a screen saying there was no bootable disk. If I understand correctly, the next step is what I'm copying from the other post, but I'll await your confirmation:

     

    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: 490234752 sectors, 233.8 GiB

    Logical sector size: 512 bytes

    Disk identifier (GUID): 59BDFEEB-1EB4-4529-94FE-3CBC2C3CD513

    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 2604 sectors (1.3 MiB)

     

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

       1              40          409639   200.0 MiB   EF00  EF

       2          409640       401060383   191.0 GiB   AF05  Macintosh HD

       3       401060384       402329919   619.9 MiB   AB00  Re

       4       402331648       490233848   41.9 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): AF

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

     

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

    Enter an MBR hex code (default AB): AB

    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

     

    Recovery/transformation 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/disk0.

    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.

     

    Now Reboot and verify the output of fdisk again.

  • by Loner T,Solvedanswer

    Loner T Loner T Oct 30, 2014 5:05 AM in response to pmyers42
    Level 7 (23,813 points)
    Safari
    Oct 30, 2014 5:05 AM in response to pmyers42

    Yes, this is the correct set of steps. You can run sudo disk /dev/disk0 before and after these steps to make sure you see an entry #4 which is set to be bootable and point to the correct start/end that you found from Testdisk.

     

    I need to change the example because it uses a non-CoreStorage setup.

     

    On my Yosemite machine, the second entry is "AC" not "AF" as is normal for non-CS volumes. While creating the Hybrid MBR, Gdisk uses the values that it sees in GPT to derive the values and these are always correct. Use the defaults as suggested, except for boot ability.

     

    sudo fdisk /dev/disk0

    Password:

    Disk: /dev/disk0 geometry: 31130/255/63 [500118192 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 -  250392096] <Unknown ID>

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

    *4: 07 1023 254  63 - 1023 254  63 [ 252071936 -  248045568] HPFS/QNX/AUX

  • by pmyers42,

    pmyers42 pmyers42 Oct 30, 2014 10:35 PM in response to Loner T
    Level 1 (0 points)
    Oct 30, 2014 10:35 PM in response to Loner T

    All's well now! Thanks so much for your help. I have to ask, though, why did the instructions have me only mark the Windows partition as bootable? It made the computer book to Windows by default, and I had to reboot a couple times to set up the default to be the Mac side again.

  • by Loner T,

    Loner T Loner T Oct 31, 2014 3:44 AM in response to pmyers42
    Level 7 (23,813 points)
    Safari
    Oct 31, 2014 3:44 AM in response to pmyers42

    The OSX side uses GPT/EFI to decide what partitions to load/boot from. The Traditional Windows-via-Bootcamp uses the MBR (Hybrid) that you created to boot from. You can look at the bless man page (https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/ man8/bless.8.html) to see how it works.

     

    The following is typically used to switch from OSX to Windows via Startup Disk.

     

    bless --mount directory [--file file] [--setBoot] [--nextonly] [--shortform] [--legacy]
      [--legacydrivehint device] [--options string] [--quiet | --verbose]

     

    See usage of --nextonly and --legacydrivehint on the man page.

     

    If you get "stuck" on Windows, a PRAM reset also helps, as noted in OS X Mavericks: Reset your computer’s PRAM.