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 91 of 102 last Next
  • by Bx029297,

    Bx029297 Bx029297 Jul 3, 2014 4:12 PM in response to Christopher Murphy
    Level 1 (0 points)
    Jul 3, 2014 4:12 PM in response to Christopher Murphy

    The windows drive "BOOTCAMP" does not show up in the finder when i type it as "BOOTCAMP"

    however i can still see it as a second drive in the left hand side under "device"

     

    - shows a folder in startup disk "windows bootcamp" instead of showing a drive

    - third partition in Disk utility ( 3partitions in total Max osx, Linux, Windows) as i deleted the Linux Swap partition that i had created.

  • by Loner T,

    Loner T Loner T Jul 3, 2014 5:13 PM in response to Bx029297
    Level 7 (24,596 points)
    Safari
    Jul 3, 2014 5:13 PM in response to Bx029297

    Do you want to start a separate thread for this? Also can you post the output of

     

    sudo gpt -vv -r show /dev/disk0

    sudo fdisk /dev/disk0

     

    Do you have a good Windows backup (not a Mac OS X disk utility image or a time machine)?

     

    How much effort do you want to spend in fixing this? Do you have an option to re-install and get all your data and applications?

  • by Loner T,

    Loner T Loner T Jul 3, 2014 5:58 PM in response to Bx029297
    Level 7 (24,596 points)
    Safari
    Jul 3, 2014 5:58 PM in response to Bx029297

    If ALT/Option key is pressed during power-up and Windows is selected from the icons AND the Windows CD/DVD is in the Optical drive, does it boot windows and allow you to repair the installation or re-install Windows (Windows OS Only)?

  • by Bx029297,

    Bx029297 Bx029297 Jul 4, 2014 4:26 AM in response to Loner T
    Level 1 (0 points)
    Jul 4, 2014 4:26 AM in response to Loner T

    Loner T, I do not mind spending time on trying to fix this at all, i've already spent quite some time

     

    I have got now my bootcamp data on a usb drive.

     

    Now: - If ALT/Option key is pressed during power-up and Windows is selected from the icons without the Windows CD/DVD in the Optical drive

    i get the error: A disk read error occurred.

     

    -If ALT/Option key is pressed during power-up AND the Windows CD/DVD is in the Optical drive,

    i can see choose between three Hard drives: Mac os, Recovery HD, Windows, and two CD icons: Windows CD, EFI BOOT


    if i select Windows hard drive or Windows CD i get the same message error "A disk error occurred".


    I can only start windows CD by rebooting and holding "C" for some reason.


    output of sudo gpt -vv -r show /dev/disk0 gives :

     

    gpt show: /dev/disk0: mediasize=320072933376; sectorsize=512; blocks=625142448

    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 625142447

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

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

      163486648       1096       

      163487744  147910656      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      311398400     829440       

      312227840  312913920      5  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      625141760        655       

      625142415         32         Sec GPT table

      625142447          1         Sec GPT header

     

    output of sudo fdisk /dev/disk0 gives:

     

    Disk: /dev/disk0geometry: 38913/255/63 [625142448 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 -  161807472] HFS+      

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

    *4: 07 1023 254  63 - 1023 254  63 [ 163487744 -  147910656] HPFS/QNX/AUX


  • by Bx029297,

    Bx029297 Bx029297 Jul 4, 2014 6:22 AM in response to Bx029297
    Level 1 (0 points)
    Jul 4, 2014 6:22 AM in response to Bx029297

    Finally solved the problem,

     

    i deleted one of the partition that i had created (linux) so as to resize the mac os x partition to what it was like before.

    Hence there are only two visible partitions in disk Utility now Mac OS x and Bootcamp.

    Then typed in command:

     

    sudo fdisk -e /dev/disk0

    setpid 4

    07

    flag 4

    write

     

    then tried to reboot (without windows CD) , held ALT/Option button , selected Windows and running windows 7 seems to be working fine now.

     

    Thank to both of you Christopher Murphy and Loner T.

    But does it mean that i will have issues creating multiple partitions? because i still want to fully install Linux and not run it on VM..

  • by Loner T,

    Loner T Loner T Jul 4, 2014 7:33 AM in response to Bx029297
    Level 7 (24,596 points)
    Safari
    Jul 4, 2014 7:33 AM in response to Bx029297

    Glad to see it work.

     

    The limitation is due to the Bootcamp implementation using an MBR on a single disk.There is a little bit more freedom when using multiple disks.

     

    If you need to run Linux, one option to consider is an external storage device so the partitions which use  Bootcamp on the main disk can hold OSX and Bootcamp. Another option is to add an additional disk into your machine, and install Linux on the second disk, or move Bootcamp to the second disk and use the first disk as OSX/Linux.

  • by Bx029297,

    Bx029297 Bx029297 Jul 4, 2014 7:42 AM in response to Loner T
    Level 1 (0 points)
    Jul 4, 2014 7:42 AM in response to Loner T

    So at the moment if i either try to add an additional partition by shrinking Mac os partition or Bootcamp i will end up with the same issues?

  • by Loner T,

    Loner T Loner T Jul 4, 2014 8:28 AM in response to Bx029297
    Level 7 (24,596 points)
    Safari
    Jul 4, 2014 8:28 AM in response to Bx029297

    Yes. A single disk and the MBR implementation requires 4 partitions as maximum (as you can see in fdisk output). You can create your own Hybrid MBRs, but they are fragile and some Disk Utility operations can cause problems, including data loss.

     

    Using a second storage device, is probably the best solution (with least amount of issues), if you do want to use VMs.

  • by Loner T,

    Loner T Loner T Jul 4, 2014 10:38 AM in response to Loner T
    Level 7 (24,596 points)
    Safari
    Jul 4, 2014 10:38 AM in response to Loner T

    Loner T wrote:

     

    Using a second storage device, is probably the best solution (with least amount of issues), if you do want to use VMs.

    This should have said "if you do NOT want to use VMs".

  • by Bx029297,

    Bx029297 Bx029297 Jul 4, 2014 11:10 AM in response to Loner T
    Level 1 (0 points)
    Jul 4, 2014 11:10 AM in response to Loner T

    Do you know if i still need to create partitions using rEFInd?

     

    i quote from Christopher Murphy "

     

    "rEFIt is no longer maintained you shouldn't use it. Use rEFInd instead, which is a fork of rEFIt and is actively maintained by Rod Smith who is also the author of GPT fdisk (a.k.a. gdisk). You'll want to read the instructions on how to configure it to use the linux EFI STUB bootloader, that way you don't have to deal with GRUB. rEFInd is a boot manager, strictly speaking it's not a bootloader. It dynamically finds the Windows and OS X bootloaders, and with minimal one time configuration it can locate linux kernels (including new ones when you do software updates) and use the built-in EFI STUB bootloader that's in the kernel itself."

  • by Loner T,

    Loner T Loner T Jul 4, 2014 11:15 AM in response to Bx029297
    Level 7 (24,596 points)
    Safari
    Jul 4, 2014 11:15 AM in response to Bx029297

    I will defer to Christopher for any rEFInd questions. I do not use it.

  • by Bx029297,

    Bx029297 Bx029297 Jul 4, 2014 11:50 AM in response to Loner T
    Level 1 (0 points)
    Jul 4, 2014 11:50 AM in response to Loner T

    There is something that i just though about,

     

    what if i erase my current bootcamp partition so as to have a single Mac os partition

     

    Then create 3 partitions beforehand, install whatever OS first on the 2nd partition and reinstall Windows 7 with Bootcamp at the end?

  • by Loner T,

    Loner T Loner T Jul 4, 2014 12:00 PM in response to Bx029297
    Level 7 (24,596 points)
    Safari
    Jul 4, 2014 12:00 PM in response to Bx029297

    If you have more than one disk, the second disk can be split to accommodate Bootcamp. This is my Mac mini with an SSD/HDD and a DIY Fusion Drive.

     

    diskutil list

    /dev/disk0

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:      GUID_partition_scheme                        *256.1 GB   disk0

       1:                        EFI EFI                     209.7 MB   disk0s1

       2:          Apple_CoreStorage                         255.7 GB   disk0s2

       3:                 Apple_Boot Boot OS X               134.2 MB   disk0s3

    /dev/disk1

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:      GUID_partition_scheme                        *1.0 TB     disk1

       1:                        EFI EFI                     209.7 MB   disk1s1

       2:          Apple_CoreStorage                         934.5 GB   disk1s2

       3:                 Apple_Boot Boot OS X               650.0 MB   disk1s3

       4:       Microsoft Basic Data BOOTCAMP                64.9 GB    disk1s4

    /dev/disk2

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:                  Apple_HFS Fusion HD              *1.2 TB     disk2

     

    With a single disk, it will not work, because of the MBR which allows only 4 partitions (the MBR contains EFI, OSX, Recovery partitions already when just OSX is running)

     

    From Boot Camp 5.1: Frequently asked questions


    Which application should I use to create a Windows partition and to install Windows?

    Use Boot Camp Assistant (located in the Utilities folder) to create a Windows partition and to install Microsoft Windows. Boot Camp Assistant works with an Intel-based Mac that has a single hard disk partition or Fusion Drive. Boot Camp Assistant creates an additional partition for the Microsoft Windows operating system or allows you to install Microsoft Windows on another drive if you have more than one internal drive.

  • by Bx029297,

    Bx029297 Bx029297 Jul 4, 2014 12:05 PM in response to Loner T
    Level 1 (0 points)
    Jul 4, 2014 12:05 PM in response to Loner T
  • by Christopher Murphy,

    Christopher Murphy Christopher Murphy Jul 4, 2014 12:18 PM in response to Bx029297
    Level 3 (555 points)
    Jul 4, 2014 12:18 PM in response to Bx029297

    1. Yes you still need partitions no matter what boot manager or boot loader you use because each OS has its own file system, and file systems need partitions.

    2. Apple's current Windows support is the complicating factor in all of this. All Linux distros can be installed to GPT partitioned disks, just like OS X uses. No need for an MBR (it's humorously called a Protective MBR which is an MBR with a single entry to "protect" the GPT and all disk contents from being accidentally modified by tools that only understand the legacy MBR partition scheme). However, Windows on Macs right now use CSM-BIOS mode in Mac firmware that presents BIOS to Windows rather than EFI. Windows thinks it's on a BIOS computer, and therefore mandates the use of MBR for boot disks, rather than GPT. So that's why we have this hybrid MBR+GPT approach on Mac with Windows on it. You inherit the limitations of MBR, which is four primary partitions.

    3. While not supported, and will almost certainly cause problems down the road if you ask Disk Utility to do a whole disk repair, or do a major OS upgrade that uses the Apple installer (e.g. from Mountain Lion to Mavericks); you can do exactly what you suggest by installing Windows last. So the GPT partitions in order are: EFI System, OS X, OS X Recovery, Linux boot, Linux root or LVM, Linux swap (if you're not using LVM), Windows. So that's 6 or 7 partitions, with Windows in the last partition. Not obvious is you can create a hybrid MBR using gdisk whereby the #1 MBR entry, type 0xEE which means it's a protective entry, encompassing the GPT, OS X, and Linux partitions. So MBR entry 1 is GPT entries 1 through 6 (plus the GPT itself). Windows partition tools and installer will see those 6 partitions as just one partition and it won't be inclined to modify either the partition entry or their contents. MBR entry 2 would be GPT entry 7, i.e. the one for Windows.

     

    So even though it's not supported, it's safe in that nothing is left exposed/unprotected. If you wedge Windows in a middle partition, you're kinda stuck and run out of MBR slots to describe and protect the whole disk, what typically happens is anything looking at the MBR sees four entries describing the first four GPT partitions, and the remaining GPT partitions actually look like unallocated/free space and fair game, not protected. So that's why I like this idea of installing Windows last.

     

    But the bottom line is, if you're going to do triple booting, you're really off the rails and you need to understand what tools you can and can't use, have good backups and recovery plans, and understand how to recreate the proper hybrid MBR in case you do inadvertently use a tool you shouldn't have and it breaks booting.

     

    Another way to do this is like Loner T suggested, is do only OS X + Windows as Apple suggests on the internal disk. And on some other disk, GPT partition it and use that for Linux, which will boot off externals, unlike Windows which is pretty fussy with that.

first Previous Page 91 of 102 last Next