MacTavish_10

Q: Repairing Boot Camp after creating new partition

Hi


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

 

I set up Boot Camp to dual-boot Windows on my MacBook Pro Retina. Everything was fine. And just yesterday Apple released the Yosemite Beta for the public and I wanted to download this and give it a try. After some research, I found that creating a separate partition was the way to go, and so I made another partition.

I wasn't aware that this would affect my Windows partition as I thought it was completely different.


So now, when I boot up, there is no option to boot with Windows. But when I boot the Mac and select Startup Disk, it shows Boot Camp is still there and all my files etc are still there.


I have a 256SSD, 160GB was for the Mac, and I have 90GB set for Windows.


I made the new partition to 40GB (and the Mac was now 120GB).

 

Then once I completed that part, I restarted my Mac and the Windows boot option was no longer there.

 

I didn't even install the Yosemite yet. I went to Disk Utility and deleted the 40GB partition that I made.

 

Now I don't know what to do. I have a lot of important things which are still on my Windows. Is there a way to restore normal Boot Camp functionality?

MacBook Pro (Retina, 13-inch, Late 2013), OS X Mavericks (10.9.4)

Posted on Jul 25, 2014 8:20 AM

Close

Q: Repairing Boot Camp after creating new partition

  • All replies
  • Helpful answers

Page 1 of 9 last Next
  • by Loner T,

    Loner T Loner T Jul 25, 2014 8:27 AM in response to MacTavish_10
    Level 7 (23,633 points)
    Safari
    Jul 25, 2014 8:27 AM in response to MacTavish_10

    Please post the output of

     

    1. diskutil list

    2. sudo fdisk /dev/<DiskWhereYouHaveInstalledBootcamp>

    3. sudo gpt -v -r show /dev/<DiskWhereYouHaveInstalledBootcamp>

     

    Bootcamp webpage clearly warns about this.

     

    Yosemite also warns about installing on a backup mac. It also creates a hidden Recovery in addition to what you may already have for Mavericks.

  • by MacTavish_10,

    MacTavish_10 MacTavish_10 Jul 25, 2014 8:52 AM in response to Loner T
    Level 1 (9 points)
    Jul 25, 2014 8:52 AM in response to Loner T

    I only read about the possible affect on Bootcamp after I did the partition

     

    Here is the Disk Utility:

     

    Disk_Utility.jpg

     

    sudo gpt -r -vv show disk0

     

    Terminal.jpg

     

    sudo fdisk /dev/disk0

     

    Screen Shot 2014-07-25 at 16_Fotor.jpg

  • by Loner T,Solvedanswer

    Loner T Loner T Jul 25, 2014 9:04 AM in response to MacTavish_10
    Level 7 (23,633 points)
    Safari
    Jul 25, 2014 9:04 AM in response to MacTavish_10

    sudo fdisk -e /dev/disk0

    p

    setpid 4

    07

    flag 4

    p

    write

    y

     

    Now Reboot and hold the ALT key and check if Windows shows up and is bootable.

     

    If you get 'missing operating system', then Windows Startup Repair and see if Windows will comeback alive.

     

    If you notice the difference between the Disk Utility screen (two partitions) vs the fdisk output (or the GPT) there are 'hidden' partitions and the MBR partitioning style used for Windows allows a maximum of 4 partitions. If you need further explanation, read the original thread.

     

    Yosemite should not be installed on any machine that is critical to you. If only partitioning was done, but Yosemite was NOT installed, you are in better shape. Yosemite ignores and is unaware of bootcamp and creates an additional Recovery HD and moves things around.

  • by MacTavish_10,

    MacTavish_10 MacTavish_10 Jul 25, 2014 9:30 AM in response to Loner T
    Level 1 (9 points)
    Jul 25, 2014 9:30 AM in response to Loner T

    Ok you have kind of lost me. I've never really used command line before and I'm not sure what I am doing.

     

    I entered sudo gdisk /dev/disk0 and got this:

     

    new2.jpg

    What am I to do next? Sorry, could you say step by step please.



    p

    setpid 4

    07

    flag 4

    p

    write

    y


    How do I do this?


  • by Loner T,

    Loner T Loner T Jul 25, 2014 9:39 AM in response to MacTavish_10
    Level 7 (23,633 points)
    Safari
    Jul 25, 2014 9:39 AM in response to MacTavish_10

    Please use fdisk not gdisk.

     

    Here is an example.

     

    sudo fdisk -e /dev/disk0

    Password:

    fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory

    Enter 'help' for information

    fdisk: 1> p

    Disk: /dev/disk0 geometry: 121643/255/63 [1954210120 sectors]

    Offset: 0 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 - 1452530904] HFS+       

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

    *4: 07 1023 254  63 - 1023 254  63 [1454211072 -  499998720] HPFS/QNX/AUX

    fdisk: 1> setpid 4

             Starting       Ending

    #: id  cyl  hd sec -  cyl  hd sec [     start -       size]

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

    *4: 07 1023 254  63 - 1023 254  63 [1454211072 -  499998720] HPFS/QNX/AUX

    Partition id ('0' to disable)  [0 - FF]: [7] (? for help)

    fdisk: 1> flag 4

    Partition 4 marked active.

  • by MacTavish_10,

    MacTavish_10 MacTavish_10 Jul 25, 2014 9:45 AM in response to Loner T
    Level 1 (9 points)
    Jul 25, 2014 9:45 AM in response to Loner T

    Oh sorry about that.

    Ok  I did the fdisk and this appeared:

    help3.jpg

     

    What should I enter next? Could you say it step by step please? When I write setpid 4, it says command not found

  • by Loner T,

    Loner T Loner T Jul 25, 2014 9:58 AM in response to MacTavish_10
    Level 7 (23,633 points)
    Safari
    Jul 25, 2014 9:58 AM in response to MacTavish_10

    There is a '-e' in my example, which enables interactive mode.

     

    The command is sudo fdisk -e /dev/disk0.

  • by MacTavish_10,

    MacTavish_10 MacTavish_10 Jul 25, 2014 9:58 AM in response to Loner T
    Level 1 (9 points)
    Jul 25, 2014 9:58 AM in response to Loner T

    Oh sorry about that.  I didn't see the image that you posted.

    Ok I have done this so far:

    newer1.jpg

    What should I do next?

  • by Loner T,

    Loner T Loner T Jul 25, 2014 10:09 AM in response to MacTavish_10
    Level 7 (23,633 points)
    Safari
    Jul 25, 2014 10:09 AM in response to MacTavish_10

    Do not use single quotes that I have shown here. It just indicates what you type.

     

    Enter '7'

    Press Return Key

    Enter 'flag 4'

    Press Return Key

    Enter 'p'

    Press Return Key

    Enter 'w'

    Press Return Key

    Enter 'y'

    Press Return Key

     

    Now Power cycle and hold the ALT key till you see icons from which you can select Windows (or Bootcamp).

  • by MacTavish_10,

    MacTavish_10 MacTavish_10 Jul 25, 2014 10:28 AM in response to Loner T
    Level 1 (9 points)
    Jul 25, 2014 10:28 AM in response to Loner T

    Ok I managed to do it. I restarted the Mac and Windows is there again and its all working as normal!

     

    Thank you so much for your help.

  • by MattTheMedic,

    MattTheMedic MattTheMedic Jul 28, 2014 5:16 AM in response to Loner T
    Level 1 (0 points)
    Jul 28, 2014 5:16 AM in response to Loner T

    Loner T, after you helped me fixing the bootcamp partition. There was a gap in disk utility between Macintosh HD and Bootcamp. I dragged M. HD

    down so it had more space. Everything worked (Windows as well). In a early screenshot i saw the original size of Macintosh HD before the whole partition problem. It was 4 GB larger . I was stupid enough to enlarge the Macintosh HD with 4 GB to return it to the original size. Now Bootcamp changed into Disk0s4 and is greyed out. Windows does show when pressing alt/option but when i boot into windows it says: missing operating system. Is there any way to fix this?

     

    I hope you can help.

     

    Schermafbeelding 2014-07-28 om 09.46.45.png

  • by Loner T,

    Loner T Loner T Jul 28, 2014 6:08 AM in response to MattTheMedic
    Level 7 (23,633 points)
    Safari
    Jul 28, 2014 6:08 AM in response to MattTheMedic

    Do you want to start a new thread in the Bootcamp forum and post a link to that new thread here? You may also want to post the latest output from the three commands in this thread to show the current state.

  • by MattTheMedic,

    MattTheMedic MattTheMedic Jul 28, 2014 6:16 AM in response to Loner T
    Level 1 (0 points)
    Jul 28, 2014 6:16 AM in response to Loner T

    Yes, here's the thread : Bootcamp doesn't work, again.

     

    Thanks for helping. The output of the commands are in the thread.

  • by joaomalveiro,

    joaomalveiro joaomalveiro Jul 30, 2014 6:38 PM in response to Loner T
    Level 1 (0 points)
    Jul 30, 2014 6:38 PM in response to Loner T

    Doing this didn't solve my problem, i still can't access bootcamp. The only thing that changed is that on the selection menu with alt key i've windows listed again, but it's not working.Screen Shot 2014-07-31 at 02.34.37.png

Page 1 of 9 last Next