Ok, this is written for a 500GB HDD.
4 partitions max, just like every other (bootable) hard-drive.
I tried this on 2 MacBook Pros and it works perfectly on both.
This tutorial also assumes you have OS X Lion installed.
What I want to achieve is to have OS X Lion & Windows 7 installed, with a shared space too.
- 120 (OSX)
- 260 (SHARED)
- 120 (Windows)
------------Part 1/2------------
Start off by resizing Mac OS X Partition so it's at least 1GB smaller than the full disk.
To do this; go into Utilities and then into Disk Utility. Select your HDD and go to the Partition tab.
1GB is not actually needed, but it's just to be on the safe side, it'll get resized later.
There needs to be 'Blank' unallocated space available.
What you originally have (factory settings):
diskutil list
500GB:
- disk0s1 EFI (Boot) ~200MB
- disk0s2 Mac OS X 10.7
- disk0s4 Mac OS X Recovery
disk0s4 needs to be deleted. Go into Utilities, and load up Terminal.
Type the following:
diskutil eraseVolume HFS+ Blank /dev/disk0s4
Then go into Disk Utility and delete the 'Blank' Partition.
You should only have your OS X Partition and blank space.
Then check your partitions with the command 'diskutil list', you should now have:
500GB:
- disk0s1 EFI (Boot) ~200MB
- disk0s2 Mac OS X 10.7
GOOD!
This part was referenced from: http://osxdaily.com/2011/06/30/deleting-the-mac-os-x-10-7-lion-recovery-hd-partition/
------------Part 2/2------------
Stretch OSX to the full available space using Disk Utility.
Load up Bootcamp Wizard, make Windows Partition 120GB whilst OSX has the remaining 380GB.
Bootcamp should be happy to start the install, but load up Disk Utility first
NOTE: On Lion 10.7.2, Bootcamp has changed a little. You need to insert the Windows 7 disk and then proceed with the installation before the Bootcamp partition will be created. When your computer restarts you need to hold down the option (alt) key and boot back into Lion, then follow the steps below:
Select the OSX Partition, and '+' another partition.
Reduce OSX to 120GB and make the new (middle) partition MS-DOS FAT, call it SHARED. That's what I'm using for now.
Whilst FAT doesn't allow for any single files over 4096MB; it's also writable natively with both OS's.
It should be 260GB. Now you have:
- 120 (OSX)
- 260 (SHARED)
- 120 (Windows)
According to Disk Utility, but...
In reality what we have is:
500GB:
- disk0s1 EFI (Boot) ~200MB
- disk0s2 Mac OS X 10.7
- disk0s3 SHARED
- disk0s4 Windows 7
Insert Windows 7 disk (if you haven't already) and then start the install sequence.
You'll notice that there's a 128MB unallocated space. Tragically you'll have to leave that unallocated.
Format the BOOTCAMP partition (only) and proceed to install Windows.
Don't mess about with deleting and merging partitions, otherwise the partition tables will be damaged.
------------DONE------------
There is absolutely no way that you should even think about doing any of this without a complete backup on a separate disk. Verify the backup before beginning.
1) If you have a complete backup, the easiest way to do this would be to wipe everything, make the partitions you want, and then copy the information back from your backup. If your Recovery HD is deleted, there is no way to re-create it without reinstalling the OS. (At least none that I could find when I was searching recently.)
2) Assuming you have a backup OTHER than that Backup partition, if you want to attempt to merge these, I would try it in this order:
a. Delete the 'Backup' partition.
b. Merge 'Data' partition and former 'Backup' partition.
c. Merge System partition and other partition.
d. Re-create the 'Backup' partition and restore it from whatever backup you have.
I have done several live-system partition resizings with no problems. However, the one time that there was a problem, I had to reformat the entire drive and start over.
Best Answer
Disclaimer: Macbook Air + Lion + Windows 7 Boot Camp + shared partition answers a similar question, however with macOS 10.12 Sierra (or later) the therein mentioned step with removing the macOS Recovery partition does not work any more.
Note: Everything mentioned here worked fine for me for several months. But then I got several data losses on the exFat data partition. Since some weeks, on my MacBook Pro 2016 with Touch Bar, the Touch Bar stopped working properly on macOS, and now it also stopped working on Windows 10, with Bootcamp asking for a restart on every single boot. It was not a hardware failure, as everything is working fine with a clean install with only macOS + Windows 10 (without a shared data partition); I guess it might be related to the unusual partition setup. Thus, in summary, I would no more recommend the method mentioned below.
So, I succeeded to have this setup, by having Windows 10 Home (version 1607 Anniversary Update) first on the drive, followed by the data partition and then by macOS 10.12 Sierra. This circumvents Windows' limit of 4 partitions (including Recovery and EFI system partitions).
Steps for doing this:
In macOS, start Boot Camp, and download Windows support software (via the "Action" menu). This will create a folder "WindowsSupport". Copy it's content to the Windows USB stick (otherwise you might not be able to use the keyboard and touchpad during the Windows installation). The top folders on the USB should look like this then:
Edit the file "AutoUnattend.xml" and remove the sections "ImageInstall" and "DiskConfiguration" (this is required so that you'll be able to set up your hard drive during Windows installation).
You will no more be able to change the startup volume in macOS' preferences. But within Windows, you can use the Boot Camp manager to set your preferred startup volume, and of course you can hold ALT during startup to choose the system.