When 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.
- 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.
- Shrink 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
- 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.
- 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)
- 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.
- 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.
- 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…
- 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.
- 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.
- 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.