If you’re like me, then you’re probably trying to figure out how to install OS X Lion on your Mac. The first requirement is that you have an extra partition on your Mac. Follow the instructions below to add a new partition to your Mac on the fly without formatting anything.
**WARNING: It should go without saying, but just in case, you should ABSOLUTELY TAKE A BACKUP before attempting any of the steps below.**
1. List Disks
Open the Terminal App and list your available disks by running:
Apple_HFS Macintosh HD 249.7 GB disk0s2
2. Find Disk Identifier
The one you will split is probably called “Macintosh HD”, as shown above, although there will be 3 entries if you have a single partition. Each disk will have a disk identifier. Mine is disk0s2.
3. Check Min/Max Disk Size
Query your disk to find it’s min and max sizes by running this command and replacing “disk0s2” with your disk identifier:
diskutil resizevolume disk0s2 limits
For device disk0s2 Macintosh HD: Current size: 249.7 GB (249715376128 Minimum size: 122.5 GB (122549932032 Bytes) Maximum size: 249.7 GB (249715376128 Bytes)
4. Split your Boot Disc
Split your disk and make sure you don’t set your boot disk to less than the minimum. This can be run as many times as you want until you run out of space. In other words, if you want 3 disks instead of two split the disk again using the disk identifier of the newly created disk.
I want to make my boot disk 200GB and my Second (Lion) partition take up the rest of the space, about 50GB:
diskutil resizevolume disk0s2 200GB JHFS+ Lion 48G
The command causes the second partition to use the rest of the space on the disk, so just make sure that you specify a number, 48GB, that is less than the total available disk space after the split.
5. Dealing with Errors.
If you get an error like this then you should boot off your Mac’s startup disk, Open Disk Utility and click Repair Disk. Then re-run the command. You can even run it from terminal while booted off the install disc.
Started partitioning on disk0s2 Macintosh HD Verifying diskError: -9915: Could not modify partition map because filesystem verification failed
7. Now when I run diskutil list I see a new drive:
2: Apple_HFS Macintosh HD 200.0 GB disk0s2 3: Apple_HFS Lion 49.6 GB disk0s3
8. If you have access to Mac OS X Lion you can now use this partition to install it.