Scotch_Brawth

Q: Repairing Boot Camp after creating new partition

I'm running OS X 10.8 and Windows 7 x64 Pro.

 

After properly setting up Boot Camp to dual-boot Windows on my Mac mini, I decided to test whether or not it was true that creating another partition (a data partition for OS X) would interfere with Boot Camp.  Wikipedia claims it does interfere but without citing a source, whilst the Boot Camp documentation itself only specifies that the disk must be a single partition _prior_ to setup - there's no mention of whether the disk must be _kept_ that way afterwards.

 

I opened Disk Utility, reduced the size of my OS X parition from 420GB to 80GB, and created a new partition in the unallocated space.  Here's how it looks now:

/___sbsstatic___/migration-images/190/19047693-1.png

When I attempted to proceed with the process, I did receive a warning that doing this (and I quote), "may" cause problems with Boot Camp.  Seeing as it was inconclusive, I thought I'd give it a shot - nothing ventured…

 

Of course, it borked Boot Camp, otherwise I wouldn't be posting here.  Whilst OS X boots just fine, the Boot Camp partition now no longer shows up in the Startup Manager, though it does in the Startup Disk prefPane.  If I do attempt to boot into Boot Camp, I receive the following message on a black screen:

No bootable device --- insert boot disk and press any key

The advice given to someone who had this same problem was, "fix your damaged Boot Camp volume."  But I'm at a loss as to how to do that.

 

So, anyone know how to proceed now so that I can keep my partitions as is, whilst fully restoring normal Boot Camp functionality?

Mac mini (Mid 2011), Mac OS X (10.7.4)

Posted on Jul 26, 2012 11:28 PM

Close

Q: Repairing Boot Camp after creating new partition

  • All replies
  • Helpful answers

first Previous Page 71 of 102 last Next
  • by Number88,

    Number88 Number88 Feb 22, 2014 5:06 PM in response to staycoldb
    Level 3 (750 points)
    Feb 22, 2014 5:06 PM in response to staycoldb

    In the terminal

    sudo gdisk /dev/disk0

    should open it

  • by staycoldb,

    staycoldb staycoldb Feb 22, 2014 5:06 PM in response to Loner T
    Level 1 (0 points)
    Feb 22, 2014 5:06 PM in response to Loner T

    Last login: Sat Feb 22 18:58:44 on ttys000
    bryans-mbp:~ Manila$ sudo gdisk /dev/disk0
    Password:
    GPT fdisk (gdisk) version 0.8.9

     

    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: 625142448 sectors, 298.1 GiB
    Logical sector size: 512 bytes
    Disk identifier (GUID): AEDDB192-5B74-44B1-BA43-EEA9844E2E54
    Partition table holds up to 128 entries
    First usable sector is 34, last usable sector is 625142414
    Partitions will be aligned on 8-sector boundaries
    Total free space is 2149 sectors (1.0 MiB)

     

    Number  Start (sector)    End (sector)  Size       Code  Name
       1              40          409639   200.0 MiB   EF00  EFI System Partition
       2          409640        80005903   38.0 GiB    AF00  Macintosh HD
       3        80005904        81275439   619.9 MiB   AB00  Recovery HD
       4        81276928       625141759   259.3 GiB   0700  BOOTCAMP

  • by Loner T,

    Loner T Loner T Feb 22, 2014 5:10 PM in response to staycoldb
    Level 7 (24,869 points)
    Safari
    Feb 22, 2014 5:10 PM in response to staycoldb

    On my system (yours should be the same).

     

    type gdisk

    gdisk is /usr/sbin/gdisk

  • by Loner T,

    Loner T Loner T Feb 22, 2014 5:16 PM in response to Number88
    Level 7 (24,869 points)
    Safari
    Feb 22, 2014 5:16 PM in response to Number88

    Number88 wrote:

     

    There's an option in gdisk to load the MBR and build a fresh GPT from it - sadly I've never used it and don't know whether that would help you.

    It could be an option.

    I think you are referring to this (the  "f load MBR and build fresh GPT from it" option). If OS X boots correctly, it figures out the GPT correctly. The other question would be does using Option key during a powerup show Bootcamp as a valid partition and does it try to boot?

     

    sudo gdisk /dev/disk0

    Password:

    GPT fdisk (gdisk) version 0.8.9

     

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

     

    Recovery/transformation command (? for help): ?

    b          use backup GPT header (rebuilding main)

    c          load backup partition table from disk (rebuilding main)

    d          use main GPT header (rebuilding backup)

    e          load main partition table from disk (rebuilding backup)

    f          load MBR and build fresh GPT from it

    g          convert GPT into MBR and exit

    h          make hybrid MBR

    i          show detailed information on a partition

    l          load partition data from a backup file

    m          return to main menu

    o          print protective MBR data

    p          print the partition table

    q          quit without saving changes

    t          transform BSD disklabel partition

    v          verify disk

    w          write table to disk and exit

    x          extra functionality (experts only)

    ?          print this menu

     

    Recovery/transformation command (? for help):

  • by Number88,

    Number88 Number88 Feb 22, 2014 5:18 PM in response to staycoldb
    Level 3 (750 points)
    Feb 22, 2014 5:18 PM in response to staycoldb

    My bad. The MBR does not agree with the GPT. In the MBR there's a large gap between partitions 3 and 4.

    In the GPT that gap does not exist.

     

    Does OSX still boot ok?

  • by staycoldb,

    staycoldb staycoldb Feb 22, 2014 5:20 PM in response to Loner T
    Level 1 (0 points)
    Feb 22, 2014 5:20 PM in response to Loner T

    Last login: Sat Feb 22 20:15:27 on ttys000
    bryans-mbp:~ Manila$ gdisk
    GPT fdisk (gdisk) version 0.8

     

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

  • by staycoldb,

    staycoldb staycoldb Feb 22, 2014 5:21 PM in response to Number88
    Level 1 (0 points)
    Feb 22, 2014 5:21 PM in response to Number88

    88, yes, I have to hit 'option' to choose OSX, but OSX is still booting ok

  • by staycoldb,

    staycoldb staycoldb Feb 22, 2014 5:24 PM in response to staycoldb
    Level 1 (0 points)
    Feb 22, 2014 5:24 PM in response to staycoldb

    what should I input for device filename? I'm assuming this is the hdd?

  • by Number88,

    Number88 Number88 Feb 22, 2014 5:27 PM in response to staycoldb
    Level 3 (750 points)
    Feb 22, 2014 5:27 PM in response to staycoldb

    sudo gdisk /dev/disk0

  • by staycoldb,

    staycoldb staycoldb Feb 22, 2014 5:33 PM in response to Number88
    Level 1 (0 points)
    Feb 22, 2014 5:33 PM in response to Number88

    O, nevermind, I misread Loner's reply. He was giving me the path to gdisk and I mistook it for syntax.

     

    88, the output for that command is already above

  • by Loner T,

    Loner T Loner T Feb 22, 2014 5:36 PM in response to Number88
    Level 7 (24,869 points)
    Safari
    Feb 22, 2014 5:36 PM in response to Number88

    The EFI part looks good.

     

    OSX

     

    GPT: 2          409640        80005903   38.0 GiB    AF00  Macintosh HD

     

    MBR: AF 1023 254  63 - 1023 254  63 [    409640 -   79596264] HFS+

     

    These do not agree.

     

    Recovery looks good.

     

    Bootcamp is a mess.

     

    GPT: 4        81276928       625141759   259.3 GiB   0700  BOOTCAMP

     

    MBR: 07 1023 254  63 - 1023 254  63 [ 204806144 -  420335616]

     

    What happens when you try to boot Windows? Do you get Operating System not found error?

  • by staycoldb,

    staycoldb staycoldb Feb 22, 2014 5:38 PM in response to staycoldb
    Level 1 (0 points)
    Feb 22, 2014 5:38 PM in response to staycoldb

    Loner, when I try to boot windows I get "disk read error, press ctrl+alt+delete to restart".

  • by Number88,

    Number88 Number88 Feb 22, 2014 5:40 PM in response to staycoldb
    Level 3 (750 points)
    Feb 22, 2014 5:40 PM in response to staycoldb

    I see.

    The MBR has your Bootcamp partition starting at sector  204806144 but the GPT has your Bootcamp partition starting at sector 81276928

    So the resizing worked at least to some degree.

    I am presuming that the GPT was not updated by the tool you used.

    The problem is, if we make a new GPT from the MBR Windows may still refuse to boot.

    If we make a new hybrid MBR we don't know at this stage which start sector gdisk will use.

     

    It may be an option to use testdisk to recover the old Windows partition and then build a new hybrid MBR with those details.

    It's still possible that this will fail to boot Windows.

     

    What does Loner T think?

     


  • by Number88,

    Number88 Number88 Feb 22, 2014 5:51 PM in response to staycoldb
    Level 3 (750 points)
    Feb 22, 2014 5:51 PM in response to staycoldb

    Has Windows been successfully booted since you resized?

  • by staycoldb,

    staycoldb staycoldb Feb 22, 2014 5:54 PM in response to Number88
    Level 1 (0 points)
    Feb 22, 2014 5:54 PM in response to Number88

    Nope. I ran the tool in windows, rebooted the machine and immediately got that disk read error. So no, I can't get into the windows partition at all.

first Previous Page 71 of 102 last Next