magnify
formats

Get Mac OS back onto MacBook and keep Windows 7 Boot Camp partition

Published on May 23, 2012

Apple MacBook Pro 13-Inch (Thunderbolt)  AngleWhen I got my MacBook Pro 13” I loved the hardware but due to having a small solid-state-drive and feeling like a dunce using Mac OS, I reformatted the entire thing and just put Windows 7 on it.  Well I’ve been wanting to learn more Linux stuff and thought I’d give Mac OS another try.  Restoring Mac OS back was a breeze, getting my Win7 partition back was a nightmare.  Here’s how to get that Boot Camp partition back.

Pre-requisites

  • Mac OS X Install DVD
  • Windows Install DVD
  • External USB HDD (to copy partition to)
  • GParted Live put onto a bootable CD
    You can download the ISO then burn it to a CD using cdburn.exe or via these many burning iso howtos.

While most of these can be put on bootable USB keys, I’ve found to have better reliability through this process using the discs.

Instructions

  1. gparted_1_bigShrink Windows partition
    Need to free up drive space for Mac OS.  Use the free GParted on a boot CD to shrink the partition down to a size that’ll let you fit the Mac OS partition on there (~60GB for Mac OS in my case).  Hold down C while Mac is booting to boot to a bootable CD/DVD or USB stick.  Or hold the alt/option key for the Startup Manager (the disc eject button will work from this screen).  Also see these Startup key combinations for Intel-based Macs
  2. Copy existing Windows partition to another drive
    Use GParted to copy the Windows main partition to an external USB drive since the drive in the Mac is going to get reformatted. 
  3. Install Mac OS and apps from original discs
    Installing Mac OS is a breeze, just boot to the Mac OS disc, use the Disk Utility from the Utilities menu to reformat drive into a single mac partition (a single partition is important), and continue with install.  The Applications Install DVD gives an Unknown Install Error but setting the system clock manually to about 5/1/2011 then installing again works. (thanks post)
  4. Use Boot Camp Assistant to resize Mac partition
    Make the new Windows partition large enough to restore the original partition to. It may be a good idea to leave some buffer (like 1GB).  I started a Windows 7 install using a Windows 7 DVD but I don’t think that’s actually necessary.  In fact, I suspect Boot Camp assistant isn’t needed at all since GParted can resize Mac OS partitions.
  5. Copy Windows partition back to the drive
    Using GParted, delete the Windows partition that Mac OS created and copy the original back from the backup drive.
  6. All heck breaks loose
    Now the Mac OS boot loader (from holding alt/option key while booting up) won’t find the Windows partition.  If you use the Startup Disk program in Mac OS (search for it in Spot Light) to set the Window partition as the starup drive, it gives a “No bootable device – insert boot disk and press any key” error.  Many forum posts say to just to recreate the Windows partition with Boot Camp Assistant and start over.  ouch.   Some posts mention using the Disk Utility in Mac OS to repair the Boot Camp partition, but it was a greyed out option for me.  Here’s how to press on and resolve this…
  7. Restore the Pseudo Master Boot Record (PMBR)
    Mac OS uses a GUID Partition Table (GPT) whereas Windows uses a MBR (see this helpful post).  Boot Camp Assistant creates this PMBR for Windows which gets messed up by using GParted (or other partition tools).  So install rEFIt in Mac OS (not on a boot CD), reboot twice (doesn’t come up the first time), then choose the Partition Tool (second icon on the bottom).  This will copy the GPT into the MBR and make the first Windows partition on the disc ‘active’.  Afterwards you can uninstall rEFIt if you like.

    [Screenshot]

  8. Restore Windows Boot-ability
    Windows still won’t boot yet.  You may see the same error as before or now get “BOOTMGR is missing”.  Here’s where the Windows 7 install disc comes in handy.  Boot to the disc and choose “Repair your computer” after selecting language.  First time I did this it immediately said it found an error and asked if I wanted to fix it.  I said yes, rebooted, but still had the same error message.  That’s okay, boot to the Windows 7 install disc again, go back to “Repair your computer” then choose “Startup Repair” from the Recovery Options screen.  For more info, see (1) this post or (2) this post.
  9. You’re back in business!
    Now the Windows partition should show via the Mac OS Boot Manager (holding down alt/option when booting or in rEFIt if using that) and be bootable!

Hope this help others save some time.

Update (8/9/2012):  Get Windows onto your Mac in the first place…
For those looking to get Windows onto your Mac in the first place, this is actually quite easy.  You can either Dual-Boot to MacOS or Windows… or run Windows in a virtual machine, using Virtual Box (free), VMware Fusion, or Parallels.  Mac’s support dual-boot out of the box.  Just have a Windows disc handy, run the Boot Camp Assistant on your Mac, and follow the prompts.  You’ll be running Windows on your Mac in no-time.

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
9 Comments  comments 

9 Responses

  1. I did all the same dances you are going through now and I ended up realizing that the mac os running vmware performed faster than booting native on the bootcamp partition so I thru out my boot camp partition an just have vmware on the ssd with lion.

  2. noahcoad

    Interesting, thanks for the tip Peter. My plan is to try vbox/parallels/vmware in Mac OS w Win7 in the VM from the bootcamp partition next.

    • good plan, but I think you’ll find that native access with no boot camp partition is the fastest. I think the drivers for the bootcamp partition are not what they could be. I have a SATA 3 (6GB/sec) drive in my macbook pro and it gives me about 4.5 of that on the native mac partition. I only get 2.5 when going directly to the3 bootamp partition either mounting it with bootcamp or booting natively. I’ve also moved all my dev work too win8 preview and I’ve found that is much more friendly (both perf and battery) to vmware than win7.

      I miss you Noah!

      • noahcoad

        Good stats! Now you’ve got me wanting to try it out, Win8 preview too. We should sync up sometime, catch up on the phone. I’ll give you a call in the next day or two. :)

        • Yup, looking forward to chatting. I had a bad bike accident last week so it may take me a few more days to catch up on life. You now, concussion, ambulance, trauma center, surgery,etc. I think I will heal but this certainly is no fun.

  3. Thank you so much! While the sequence of events in my case were slightly different, the core concepts got me back my boot camp partition.

    It was on its own 120GB disk in my Mac Pro; used Disk Utility to restore it to a 250 GB HD. (10.6.8 and 10.7.4 sharing a 1TB Drive RAID volume)

    BootCamp would show as a startup disk in the Settings, but would not boot (blinking underscore in top left corner). had to install REFIt, ran partition tool, reboot DIRECTLY into Win7 DVD, perform repair (instantly found problems to correct), reboot back to rEFIt, chose Windows, and voila!

    I love you man!!

  4. andre

    I have a MacBook Air, hence no optical drive. How do I then get “Repair your computer” to fix Windows after increasing its partition?

    • noahcoad

      I haven’t tried it myself, but anything that requires a CD above can be put onto a USB key these days. If you’re doing it from Windows, get the disc image (rEFIT or Win7) and use the Windows 7 USB/DVD Download Tool which just loads any bootable CD/DVD image file onto a USB key. Then you can use the USB key like a DVD. There’s probably a similar tool for MacOS.

  5. Hunter

    Noah,
    Thanks. Your instructions worked well. I had made my Windows partition too small and used Ghost to back it up, then deleted the partition and created a new, larger one, restored with Ghost (and fixed disk errors, before even attempting to boot). However, then I got the No Bootable Disk Error. I went to rEFIt’s website and saw it was no longer being updated and they suggested rEFInd, an actively develop fork, however I couldn’t get rEFInd to install by clicking on the install.sh file. There shouldn’t be an issue with using rEFIt instead of it’s newer fork, should there?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>