Skip navigation

Repairing Boot Camp after creating new partition

177175 Views 1,254 Replies Latest reply: Apr 18, 2014 12:22 PM by Loner T RSS
  • docileninja Calculating status...

    Hello Christopher -

     

    I have this same problem but I am concerned about changing the hybrid MBR settings. Do you always use "5" while in gdisk?

  • Christopher Murphy Level 2 Level 2 (470 points)
    Currently Being Moderated
    Dec 31, 2012 6:57 PM (in response to docileninja)

    No, it depends on the GPT partition you're trying to add to the MBR. So you first need to know which GPT partition is the Windows partition.

     

    Also, this is only one possible way to do it, with 5 partitions, but it's the safest. Since  your OS X  partition is not added to the MBR, it means Windows won't see it, and therefore you can't read files from the OS X partition while you're booted in Windows. There is a work around for this, by adding the OS X partition to the MBR also, but if you do that, the MBR won't have enough slots to protect all of your other partitions so something will have to be left out of the MBR and therefore it will appear to be free space to Windows and Windows apps - making that  partition susceptible to being overwritten. That's why for 5+ partition layouts, I recommend just adding the Windows partition to the MBR, and giving up on read/write to the OS X partition.

     

    Another valid layout which is pretty safe, is if the 4th/5th GPT partitions are both Windows formatted volumes (NTFS or FAT32), you can add them both to the MBR. But you need to make sure you mark the correct partition as bootable in gdisk, which is the partition that actually has Windows installed on it.

  • docileninja Level 1 Level 1 (0 points)

    Okay so the outputs from the two commands that you asked Scotch to do are:

     

    sudo gpt -r -vv show disk0

     

    gpt show: disk0: mediasize=500277790720; sectorsize=512; blocks=977105060

    gpt show: disk0: Suspicious MBR at sector 0

    gpt show: disk0: Pri GPT at sector 1

    gpt show: disk0: Sec GPT at sector 977105059

          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  647656248      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC

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

      649335424       1408        

      649336832   76953600      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      726290432  250814464      5  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      977104896        131        

      977105027         32         Sec GPT table

      977105059          1         Sec GPT header

     

    sudo fdisk /dev/disk0

     

    Disk: /dev/disk0geometry: 60821/255/63 [977105060 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: AF 1023 254  63 - 1023 254  63 [    409640 -  647656248] HFS+       

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

    4: 0B 1023 254  63 - 1023 254  63 [ 649336832 -   76953600] Win95 FAT-32

     

     

    What would I do in this situation?

    OS X Mountain Lion (10.8.2)
  • Christopher Murphy Level 2 Level 2 (470 points)

    You'd add partitions 4 and 5 to the MBR, and flag one of them as bootable. Both of those partitions use the GUID for Windows file systems, but there's nothing that says which one contains Windows. But partition 4 is the smaller of the two.

  • Loner T Level 1 Level 1 (20 points)

    Christopher Murphy wrote:

     

    You'd add partitions 4 and 5 to the MBR, and flag one of them as bootable. Both of those partitions use the GUID for Windows file systems, but there's nothing that says which one contains Windows. But partition 4 is the smaller of the two.

    @Christopher... This thread has turned into the 'Ask Christopher Murphy about Bootcamp and Partitioning' thread. It is wonderful to see such community support. My hat off to you Christopher, for such support. Perhaps this will become the longest running thread on this forum.

  • Berend de Meyer Level 1 Level 1 (5 points)

    Hi Christopher - and the rest of you all

     

    Just been reading the first two pages and planning to read it out from 1-24 coming days!

    GREAT 1st solution and info's here!!!!!

     

    I have the same problem running OS X 10.8.2 and installed WIN8PROx64 with Bootcamp 5.0 resulting in:

     

    1. a OS X system that shows no Windows boot-disk in System Prefs;

     

    2. needed to un-install the BootCampServices in Windows for it gave me the first BSOD!

        Since working with the MAC since 2008 I totally forgot what that looked like ;-)

        Now it's with a ;( wich I think is very nice of Bill and telling me I had to GooGle for cache_manager     problems...

     

    3. some random very slow boot-ups with both OS's

     

    So after making a CCC bootable image on an external FW-HDD and a Windows back-up on another FW-HDD, I'll give this a sling shot!

     

    Keep you posted!!!

     

    Cheers to all writers and readers in this GREAT thread!

  • Ikara Calculating status...

    Thank you so much Christopher Murphy, this just saved my life.

    On my MacBook Pro I have BootCamp partition to boot Windows, and in Mac partition I had to create a CaseSensitive partition for CaseSensitive MySQL database, and then I could not boot in Windows anymore.

    I follow all the instructions using the gdisk utility and all is fine again.

    I found this after searching for hours and tearing my hair out.

    Super happy now.

    Thanks!

  • Berend de Meyer Level 1 Level 1 (5 points)

    Hi Chriopher,

     

    Great reading from the first few pages!

     

    Last login: Wed Jan  9 21:39:47 on ttys000

     

    $ diskutil list

     

    /dev/disk0

       #:                                      TYPE NAME                         SIZE            IDENTIFIER

       0:                       GUID_partition_scheme                          *1.0 TB         disk0

       1:                                                    EFI                           209.7 MB     disk0s1

       2:                  Apple_HFS MAC_OSX_ML                          499.0 GB      disk0s2

       3:                     Apple_Boot Recovery HD                          650.0 MB     disk0s3

       4:     Microsoft Basic Data WIN8_PROx64                         500.3 GB      disk0s4

     

     

    $ sudo gpt -r -vv show disk0

     

    Password: [...]

    gpt show: disk0: mediasize=1000204886016; sectorsize=512; blocks=1953525168

    gpt show: disk0: Suspicious MBR at sector 0

    gpt show: disk0: Bad CRC in GPT table at sector 2

    gpt show: disk0: Sec GPT at sector 1953525167

               start                       size            index                 contents

                    0                           1                                     MBR

                    1                  409639             

           409640             974609344                  2                 MBR part 175

      975018984                1269536                  3                  MBR part 171

      976288520                     1272        

      976289792             977233920                 4                  MBR part 7

    1953523712                      1423        

    1953525135                         32                                      Sec GPT table

    1953525167                           1                                      Sec GPT header

     

     

    $ diskutil resizevolume /dev/disk0s2 limits

     

    For device disk0s2 MAC_OSX_ML:

            Current size:            499.0 GB (498999984128 Bytes)

            Minimum size:         456.8 GB (456793563136 Bytes)

            Maximum size:        499.0 GB (498999984128 Bytes)

     

     

    $ sudo gdisk /dev/disk0

     

    GPT fdisk (gdisk) version 0.8.5

     

    Caution! After loading partitions, the CRC doesn't check out!

    Warning! Main partition table CRC mismatch! Loaded backup partition table

    instead of main partition table!

     

    Warning! One or more CRCs don't match. You should repair the disk!

     

    Partition table scan:

      MBR: hybrid

      BSD: not present

      APM: not present

      GPT: damaged

     

    Found valid MBR and corrupt GPT. Which do you want to use? (Using the

    GPT MAY permit recovery of GPT data.)

    1 - MBR

    2 - GPT

    3 - Create blank GPT

     

    Your answer: {one moment please, I'll have to ask Christopher for this one!!!!}

     

    HOUSTON, Do I have a problem???????

     

    Leaving my MAC running in terminal mode for now.........

     

    One More Thing: Yes, this is rocket sience for me!

     

     

    Cheers!

  • Berend de Meyer Level 1 Level 1 (5 points)

    Hi Christopher,

     

    Tried to restore both Win and OSX:

     

    1. So I installed a fresh 1TB HDD in bay#1

    2. Booted in Recovery Disk mode on my bootable FW external CCC Backup

    3. Format the new drive using Disk Utils in HFS Macintosh HD

    4. Installed OS X 10.8.2 download from store

    5. Installed GDISK

    6. Used the same commands as above post and...(. From sector 1 there seems to be PRI GPT's which are not present on my BC disk I removed!)

     

    7. Because I want to restore a Win backup I last made yesterday I used bootCamp 5.0.0 to make the MBR for OSX and Win

    8. Because the BC 5 formats the disk FAT32 (backup is NTFS) I used Disk Utils to reformat the BOOTCAMP partition to NTFS (with Paragon NTFS for OSX latest version)

    9. Checked again with GDISK and PRI GPT's from sector 1 are gone again giving me the caution's lusing gdisk as in  above post again.

     

    Is there a way to partition the BOOTCAMP partition in NTFS for restore backup without distroying the bootcamp MBR records? If so I can restore my OS X Using migration from CCC backup and the Win backup as well!

     

    I hope my question does not seem offtopic as I want to use restore backup!

     

    Thanks in advance!!!!

  • Christopher Murphy Level 2 Level 2 (470 points)

    gpt show: disk0: Bad CRC in GPT table at sector 2

    gpt show: disk0: Sec GPT at sector 1953525167

    and

    Main partition table CRC mismatch! Loaded backup partition table

    instead of main partition table!

     

    Yeah this is not good. But it implies the secondary GPT is OK. Gdisk will use the good one by default, so you should have gdisk spit out the GPT to the screen by typeing p then enter, and post that. I'd also go to the recover/transform menu, r then enter, and print out the MBR which is o then enter. And post that to the the forum. That way it's better understood if the backup GPT and MBR have agreeable entries. Once that's done and confirmed, you can then use gdisk to create a new hybrid MBR and write out the partition tables. When you do this, it will write a new clean MBR and GPT, including a replacement for the bad primary GPT.

  • Berend de Meyer Level 1 Level 1 (5 points)

    Hi Christopher,

     

    Thanks a bunch for your prompt reply!!!

     

    Her are the outputs on the Gdisk command you wanted the info for:

     

    diskutil list

    /dev/disk0

       #:                   TYPE         NAME       SIZE    IDENTIFIER

       0:  GUID_partition_scheme                 *1.0 TB         disk0

       1:                    EFI                209.7 MB       disk0s1

       2:              Apple_HFS   MAC_OSX_ML   499.0 GB       disk0s2

       3:             Apple_Boot  Recovery HD   650.0 MB       disk0s3

       4:   Microsoft Basic Data  WIN8_PROx64   500.3 GB       disk0s4

     

    Command (? for help): p

     

    Disk /dev/disk0:1953525168 sectors, 931.5 GiB

    Logical sector size:512 bytes

    Disk identifier (GUID):DF74661F-A6DE-466B-B637-8D81F396CD3E

    Partition table holds up to 128 entries

    First usable sector is 34, last usable sector is 1953525134

    Partitions will be aligned on 8-sector boundaries

    Total free space is 2701 sectors (1.3 MiB)

     

    Number Startsector)  Endsector)       Size  Code                  Name

       1            40       409639  200.0 MiB  EF00  EFI System Partition

       2        409640    975018983  464.7 GiB  AF00  Apple_HFS_Untitled_5

       3     975018984    976288519  619.9 MiB  AB00  Apple_HFS_Untitled_2

       4     976289792   1953523711  466.0 GiB  0700              BOOTCAMP

     

    Recovery/transformation command (? for help): o

     

    Disk size is 1953525168 sectors (931.5 GiB)

    MBR disk identifier: 0xEC1946A7

    MBR partitions:

     

    Number Boot Start Sector  End Sector   Status  Code

       1                   1      409639  primary  0xEE

       2              409640   975018983  primary  0xAF

       3           975018984   976288519  primary  0xAB

       4      *    976289792  1953523711  primary  0x07

     

    I hope this can give you better insights to the matter!

     

    Thanks again, Greatings

     

     

     

     

     

     


  • Berend de Meyer Level 1 Level 1 (5 points)

    Hi Christopher,

     

    Thanks a bunch for your prompt reply!!!

     

    Here are the outputs on the Gdisk command you wanted the info for:

     

    diskutil list

    /dev/disk0

       #:                   TYPE         NAME       SIZE    IDENTIFIER

       0:  GUID_partition_scheme                 *1.0 TB         disk0

       1:                    EFI                209.7 MB       disk0s1

       2:              Apple_HFS   MAC_OSX_ML   499.0 GB       disk0s2

       3:             Apple_Boot  Recovery HD   650.0 MB       disk0s3

       4:   Microsoft Basic Data  WIN8_PROx64   500.3 GB       disk0s4

     

    Command (? for help): p

     

    Disk /dev/disk0:1953525168 sectors, 931.5 GiB

    Logical sector size:512 bytes

    Disk identifier (GUID):DF74661F-A6DE-466B-B637-8D81F396CD3E

    Partition table holds up to 128 entries

    First usable sector is 34, last usable sector is 1953525134

    Partitions will be aligned on 8-sector boundaries

    Total free space is 2701 sectors (1.3 MiB)

     

    Number Startsector)  Endsector)       Size  Code                  Name

       1            40       409639  200.0 MiB  EF00  EFI System Partition

       2        409640    975018983  464.7 GiB  AF00  Apple_HFS_Untitled_5

       3     975018984    976288519  619.9 MiB  AB00  Apple_HFS_Untitled_2

       4     976289792   1953523711  466.0 GiB  0700              BOOTCAMP

     

    Recovery/transformation command (? for help): o

     

    Disk size is 1953525168 sectors (931.5 GiB)

    MBR disk identifier: 0xEC1946A7

    MBR partitions:

     

    Number Boot Start Sector  End Sector   Status  Code

       1                   1      409639  primary  0xEE

       2              409640   975018983  primary  0xAF

       3           975018984   976288519  primary  0xAB

       4      *    976289792  1953523711  primary  0x07

     

    I hope this can give you better insights to the matter!

     

    Thanks again, Greatings

     

    PS used web interface-editors' "courier new" font family for readers benefit!

  • DSC426 Calculating status...

    Christopher,

     

    I have OSX 10.8.2 and Win7 Pro 64b running via bootcamp on my MBA with a 256GB SSD. 

     

    I created an ExFAT partition in Disk Utility from some of the unused space on my OSX partition.  Following, I cannot boot into Windows as only OSX and RECOVERY show available when I hold down the option key on boot.

    If I look at my startup disk I can see Windows there, however if I select I receive "no bootable device --- insert boot disk and press any key". 

     

    This is likely somewhat redundant, but given I did not see any posts including ExFAT, I thought I would throw this out there to be sure (redundant post equals more specific examples and help to others!) 

     

    Here is what I have and was hoping you could advise /walk me through it....  THANK YOU!!!

     

    sudo gpt -r -vv show disk0

     

    gpt show: disk0: mediasize=251000193024; sectorsize=512; blocks=490234752

    gpt show: disk0: Suspicious MBR at sector 0

    gpt show: disk0: Pri GPT at sector 1

    gpt show: disk0: Sec GPT at sector 490234751

          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  324218744      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC

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

      325897920        320        

      325898240   39063552      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      364961792  125272064      5  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      490233856        863        

      490234719         32         Sec GPT table

      490234751          1         Sec GPT header

     

     

    sudo gdisk -l /dev/disk0


    GPT fdisk (gdisk) version 0.8.6

     

    Partition table scan:

      MBR: hybrid

      BSD: not present

      APM: not present

      GPT: present

     

    Found valid GPT with hybrid MBR; using GPT.

    Disk /dev/disk0: 490234752 sectors, 233.8 GiB

    Logical sector size: 512 bytes

    Disk identifier (GUID): 00001FBF-6F13-0000-E15F-000045770000

    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 1189 sectors (594.5 KiB)

     

     

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

       1              40          409639   200.0 MiB   EF00  EFI system partition

       2          409640       324628383   154.6 GiB   AF00  Customer

       3       324628384       325897919   619.9 MiB   AB00  Recovery HD

       4       325898240       364961791   18.6 GiB    0700  ExFAT

       5       364961792       490233855   59.7 GiB    0700  BOOTCAMP

     

     

    sudo fdisk /dev/disk0

     

    Disk: /dev/disk0          geometry: 30515/255/63 [490234752 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: AF 1023 254  63 - 1023 254  63 [    409640 -  324218744] HFS+       

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

    4: 07 1023 254  63 - 1023 254  63 [ 325898240 -   39063552] HPFS/QNX/AUX

     

     

    diskutil list /dev/disk0

     

    /dev/disk0

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:      GUID_partition_scheme                        *251.0 GB   disk0

       1:                        EFI                         209.7 MB   disk0s1

       2:                  Apple_HFS Macintosh HD            166.0 GB   disk0s2

       3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

       4:       Microsoft Basic Data ExFAT                   20.0 GB    disk0s4

       5:       Microsoft Basic Data BOOTCAMP                64.1 GB    disk0s5

  • BobTheFisherman Level 6 Level 6 (10,570 points)
    Currently Being Moderated
    Jan 17, 2013 5:45 AM (in response to DSC426)

    DSC426 wrote:

     

    Christopher,

     

    I have OSX 10.8.2 and Win7 Pro 64b running via bootcamp on my MBA with a 256GB SSD. 

     

    I created an ExFAT partition in Disk Utility from some of the unused space on my OSX partition.  Following, I cannot boot into Windows as only OSX and RECOVERY show available when I hold down the option key on boot.

    If I look at my startup disk I can see Windows there, however if I select I receive "no bootable device --- insert boot disk and press any key". 

     

    This is likely a redundant question, but given I did not see any posts including ExFAT, I thought I would throw this out there and see if I can correct it (redundant post equals more specific examples and help to others!)

     

    Here is what I have and was hoping you could advise /walk me through it....

     

    You can not create multiple partitions on a drive with a Bootcamp partition. You likely have to start over. Also, you should consider starting a new thread rather than prpetuating this old thread that was identified as solved a long time ago.

  • DSC426 Level 1 Level 1 (0 points)

    Here is a screen capture of how it is configured.  Also, I didn't start a new thread because this seemed the most relevant to the topic with posts just days ago.  Either way, just looking for some help.

     

    Untitled.jpg

1 ... 22 23 24 25 26 ... 85 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (21)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.