MacOS – How to setup two OS X boot partitions plus Bootcamp and Data

bootcampefimacospartitionwindows

Is it possible to set up he following combination of partitions; how?

  • two OS X partitions, each bootable (one for the main system, another for testing new OS X releases)
  • a Bootcamp bootable partition for Windows 7
  • data partition shared between OS X and Windows?

I don't need access to either of OS X boot partitions from Windows. And vice versa: don't need to access Windows boot partition from OS X.

I use MacBook Pro 13" 2010, Windows 7 64-bit, OS X Mountain Lion.

Best Answer

It should be possible to partition the HDD like that but not in a default setup with Boot Camp and Windows 8/8.1 is recommended:

The hybrid MBR/GPT necessary for Boot Camp Assistant to install/boot Windows doesn't allow more than 4 partitions:

  • Apple CoreStorage or Macintosh HD
  • Recovery HD
  • your future Windows 8/(7)
  • a place holder in the MBR linking to the GPT (some count the EFI-partition as the fourth one, but this doesn't seem to be true)

So a different approach is necessary:

Skip the hybrid MBR and use a pure GPT setup. Alternatively a multistage boot loader setup with rEFInd may also be possible.

Here is an obviously working setup for Windows 8 (source):

Check the comments there before proceeding.

Windows 7 may work as well with this guide. Here is an opposing point of view which claims that it is impossible to install Windows 7 in native UEFI-mode.

Warning: These steps require you to completely erase your hard drive! Make sure you have all the materials and have backed up all of your data before proceeding.

Materials:

  • A recent MacBook Pro (this will probably work on other Macs, but I don’t have any to test with) I’ve tested this on the 1st-gen Retina 15″ and a 13″ 2nd-gen i5 model.
  • A disk drive capable of reading DVDs (you’ll need an external drive for MacBook Retinas or MacBook Airs)
  • A Mountain Lion Installer thumb drive
  • A CD/USB drive with the “Windows Support” files from Bootcamp
  • A Windows 8 Pro Install DVD

Procedure:

  1. Put the Windows 8 Disk in the disk drive
  2. Option-boot the computer and choose to boot off the “Windows” disk (Do not choose “EFI Boot” but make sure that it does show up, you’ll need to use it later)
  3. Once the installer gets to the setup screen, hit shift+f10. This will bring up a command prompt
  4. Type the following commands (this assumes that you only have one hard drive):
    1. diskpart (this puts you into the windows partitioning shell)
      1. select disk 0 (this selects the primary hard drive, make sure you don’t have any extra drives connected)
      2. clean (this erases your entire hard drive by removing all partition information)
      3. convert gpt (this converts your hard drive from an MBR partition table to a GUID partition table)
      4. create partition efi size=200 (this creates the efi partition where the bootloader will live)
      5. format fs=fat32 (this formats the EFI partition as fat32 so that Windows can write to it)
      6. create partition msr size=128 (this creates a “MicroSoft Reserved” partition… because microsoft)
      7. create partition primary (this uses the rest of your free space to create a usable partition)
      8. format fs=ntfs quick label=Windows (this formats the Windows partition and labels it as “Windows” which is what OS X will see)
      9. exit (this exits the windows partitioning shell)
    2. wpeutil reboot (this tells the computer to reboot)
  5. Option-boot the computer when it reboots, but this time choose “EFI Boot” instead of “Windows” Remember to press the any key to boot into the installer!
  6. Choose to use a Custom Install and install Windows 8 to “Partition 3″ (The only primary partition) Make sure you leave the install disk in the drive through the whole install or you could get a BSOD
  7. Install the Windows Support software from your CD/USB drive to gain full functionality of your computer Congratulations! You now have a natively-EFI-booting Windows 8 Install! Now, on to dual-booting OSX…
  8. Open “Disk Management” in Windows. Find your “C Drive” partition and resize it by right-clicking on it and choosing “shrink volume”
    1. Shrink it by the size you’d like your OS X installations and the shared volume to be (e.g. if you want to give the 3 partitions 200GB, use 204800MB)
    2. Right-click on the now empty area at the end of the drive and make 3 new “Simple volumes” Don’t format it.
  9. Reboot the computer into your OS X Installer thumb drive
  10. Open Disk Utility
    1. Choose “disk0s4″ as this will be the 4th partition on disk 0
    2. On the “Erase” tab choose “Mac OS Extended (Journaled)” since this is what OS X likes to use.
    3. Give it a label that you like (e.g. “SystemML”)
    4. Hit Erase
    5. Choose “disk0s5″ as this will be the 5th partition on disk 0
    6. On the “Erase” tab choose “Mac OS Extended (Journaled)” since this is what OS X likes to use.
    7. Give it a label that you like (e.g. “SystemExperimental”)
    8. Hit Erase
    9. Choose “disk0s6″ as this will be the 6th partition on disk 0
    10. On the “Erase” tab choose “ExFAt”.
    11. Give it a label that you like (e.g. “WinMacShare”)
    12. Hit Erase
    13. Exit Disk Utility
  11. Install OS X on your new partitions.

If step 8.2. fails you have to partition the unallocated space manually after step 9 in Terminal.app with

gpt -r show /dev/diskNumber

to get the partition table, and

gpt add -b StartBlock -i IndexNumber -s SizeOfPartition -t PartitionType diskNumber

to add partitions.

You have to format the volumes afterwards with Disk Utility.