Installing Windows (Bootcamp) on a 3TB Mac OSX Fusion drive

UPDATE 2 Please follow this guide: http://dice.neko-san.net/2012/12/how-to-install-boot-camp-on-a-3tb-fusion-drive-mac/ at the moment.

I got myself an iMac 27” (Late 2012) with a 3TB Fusion drive, so that one day I could install Windows with bootcamp on it. However, after the fine machine arrived I noticed that bootcamp was out of the question, which is prevented by Apple for end-user safety reasons.

The problem is well described, but it comes down to the fact that the bootloader of old times sake, which is emulated by Mac OSX, can only boot from Windows partitions that lies within the first 2.2 TB part of the harddrive. (32 bits stuff going on there). So an obvious solution is to put the Windows partition somewhere in the first 2.2 TB of the drive.

Another thing is this Fusion setup. A 128 GB SSD drive in combination with the harddrive act as a logical volume. We want to keep the speed rush from combining these two technologies: FAST FLASH ram and spinning platters.

Ergo:

  1. Break the current Logical Volume,
  2. Repartition the Spinning platter drive with a windows partition, and
  3. Reconstruct the ‘Fusion’ Logical Volume.
  4. Reinstall Mac OS X (by a download)

(source of 1. and 2.)

With “don’t be afraid of the terminal” in the back of your head we head straight there.

Prep your Mac

Be sure to prepare your mac for this. All you data will be removed. You can hook up a Time Machine disk, which will benefit you in the restore process. Be prepared to fall back into Apple Internet Recovery safety nets if you do not have a Recovery Disk (see: http://support.apple.com/kb/DL1433)

Boot into recovery mode.

Reboot your Mac and hold down Cmd-R to boot into recovery mode.

Investigate and Note down

We are going to rearrange disks and you need the terminal based powertool diskutil for this. The Disk Utility.app is not going to get you anywhere. I’ve understood that Mac OSX Mountain Lion 10.8.x comes with a Disk Utility.app to do special things to Fusion Drive. It makes sure that you as a user sees nothing, just 1 single disk and it shows ‘Logical Volume’ in the info bar below. You may want to look at it, or head straight over to the terminal.

In the menu bar go to Utilities > Terminal to launch the terminal.

Type:

diskutil list

You will see this list:

/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *121.3 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:          Apple_CoreStorage                         121.0 GB   disk0s2
   3:                 Apple_Boot Boot OS X               134.2 MB   disk0s3
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *3.0 TB     disk1
   1:                        EFI                         209.7 MB   disk1s1
   2:          Apple_CoreStorage                         3.0 TB     disk1s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk1s3
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS Macintosh HD           *3.1 TB     disk2

It means that disk0s2 (disk0 partition 2) from your 121.3 GB (SSD) drive is connected to your disk1s2 (disk1 partition 2) from your 3.0 TB harddrive. It results into a ‘new drive’ disk2 with the total capacity of 3.1 TB. This is the fusion drive as you know it and where your OS is installed on.

We also look into the ‘coreStorage’ magic with the following command

diskutil coreStorage list

You will see

CoreStorage logical volume groups (1 found)
|
+-- Logical Volume Group 68CFB85B-A9F7-4FCF-B30A-A36B1EC3F079
    =========================================================
    Name:         Macintosh HD
    Size:         3120722075648 B (3.1 TB)
    Free Space:   114688 B (114.7 KB)
    |
    +-< Physical Volume 47AA037E-2610-4851-AAFD-9DD030C626A5
    |   ----------------------------------------------------
    |   Index:    0
    |   Disk:     disk0s2
    |   Status:   Online
    |   Size:     120988852224 B (121.0 GB)
    |
    +-< Physical Volume 594F384F-9A09-4E2F-9103-9082FC3BE69B
    |   ----------------------------------------------------
    |   Index:    1
    |   Disk:     disk1s2
    |   Status:   Online
    |   Size:     2999733223424 B (3.0 TB)
    |
    +-> Logical Volume Family 2B6303F8-4E0A-4595-99FE-79E030F13C49
        ----------------------------------------------------------
        Encryption Status:       Unlocked
        Encryption Type:         None
        Conversion Status:       NoConversion
        Conversion Direction:    -none-
        Has Encrypted Extents:   No
        Fully Secure:            No
        Passphrase Required:     No
        |
        +-> Logical Volume AEF67AEA-D098-4762-BDBB-CA982BF80803
            ---------------------------------------------------
            Disk:               disk2
            Status:             Online
            Size (Total):       3106191572992 B (3.1 TB)
            Size (Converted):   -none-
            Revertible:         No
            LV Name:            Macintosh HD
            Volume Name:        Macintosh HD
            Content Hint:       Apple_HFS

Or something similar (propably other Device ID’s, called UUID). The explaination is as follows. The Logical Volume Group consists (mind the arrow to the left +-<) of two physical Volumes. disk0s2 size 121.0 GB (the SSD drive), and the same partition identifier as above and the disk1s2 size 3.0 TB (the harddisk). On this Logical Volume Family a (mind arrow to the right +->) single Logical Volume is created called disk2 with a size of 3.1 TB, called “Macintosh HD” and the type is Apple_HFS (or JHFS+ to be exact).

Step 1, destroy the logical volume group

Now that we have written down all relevant numbers, including the UUID of the Volumes, we are going to remove the logical Volume using:

diskutil coreStorage delete <UUID of logical volume group = top one>

with diskutil list you can see what has happened. The disk0s2 and disk1s2 became ‘Untitled’ with the same size. Now disk1 is ready for a new partition

Step 2, repartition the harddrive

Using diskutil partitionDisk command we can create three partitions

  1. Mac OSX partition, say ~500 GB
  2. Windows Partition, say ~500 GB
  3. Mac OSx ‘Data’ partition, the remainder say 2.0 TB (but we want the remainder!)

These sizes seems adequate for my case, you may choose other sizes of the first two partitions as long as the sum of the first Mac and Windows partition is lower that 2.2 TB (for safety lower than 2.0 TB)

Actually the ‘Data’ Partition is not really a data partition as we will stitch all Mac OSX partitions together, including the SSD drive into one ‘fusion’ drive in step 3.

The command to make these partitions is

# diskutil partitionDisk <disk#> <#ofPartitions> <type1> <name1> <size1>  <type> <name2> <size2> ...
diskutil partitionDisk disk2 3  HFS+ "Macintosh HD" 500G  MS-DOS "Windows" 500G  HFS+ "Macintosh Data" R

The R at the end (size of partition3) will ensure that the remainder of the disk is calculated and used for the “Macintosh Data” disk.

Using diskutil list you can check how you did. We should see the following for disk1:

/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *3.0 TB     disk1
   1:                        EFI                         209.7 MB   disk1s1
   2:                  Apple_HFS Macintosh HD            499.9 GB   disk1s2
   3:       Microsoft Basic Data Windows                 500.0 GB   disk1s3
   4:                  Apple_HFS Macintosh Data            2.0 TB   disk1s4

Step 3, Reconstruct the ‘Fusion’ Logical Volume.

As said, we are to reconstruct the Logical Volume to make optimal use of the Fusion drive technology. source. The trick is to use both the SSD and the ‘split’ partitions of the harddrive. We make use of the diskutil coreStorage command.

diskutil coreStorage create "Macintosh HD" disk0s2 disk1s2 disk1s4

Important to note that disk1s4 is added as a third volume!

diskutil coreStorage list will show you the following

CoreStorage logical volume groups (1 found)
|
+-- Logical Volume Group 8A4840B8-3964-4872-90DE-1C49833CC990
    =========================================================
    Name:         Macintosh HD
    Size:         2620588019712 B (2.6 TB)
    Free Space:   0 B (0 B)
    |
    +-< Physical Volume 2B85B4D3-4D91-49A5-9F8D-BE00908B5C5F
    |   ----------------------------------------------------
    |   Index:    0
    |   Disk:     disk0s2
    |   Status:   Online
    |   Size:     120988852224 B (121.0 GB)
    |
    +-< Physical Volume 69550BFB-B2E6-4273-AA51-9A24C1218BB0
    |   ----------------------------------------------------
    |   Index:    1
    |   Disk:     disk1s2
    |   Status:   Online
    |   Size:     499350855680 B (499.4 GB)
    |
    +-< Physical Volume 577515B7-31B4-4174-837D-F3649C57ECDC
        ----------------------------------------------------
        Index:    2
        Disk:     disk1s4
        Status:   Online
        Size:     2000248311808 B (2.0 TB)

We need to create a single volume on it using

diskutil coreStorage createVolume 8A4840B8-3964-4872-90DE-1C49833CC990 JHFS+ "Macintosh HD" 100%

to list what happened use the diskutil coreStorage list again:

CoreStorage logical volume groups (1 found)
|
+-- Logical Volume Group 8A4840B8-3964-4872-90DE-1C49833CC990
    =========================================================
    Name:         Macintosh HD
    Size:         2620588019712 B (2.6 TB)
    Free Space:   0 B (0 B)
    |
    +-< Physical Volume 2B85B4D3-4D91-49A5-9F8D-BE00908B5C5F
    |   ----------------------------------------------------
    |   Index:    0
    |   Disk:     disk0s2
    |   Status:   Online
    |   Size:     120988852224 B (121.0 GB)
    |
    +-< Physical Volume 69550BFB-B2E6-4273-AA51-9A24C1218BB0
    |   ----------------------------------------------------
    |   Index:    1
    |   Disk:     disk1s2
    |   Status:   Online
    |   Size:     499350855680 B (499.4 GB)
    |
    +-< Physical Volume 577515B7-31B4-4174-837D-F3649C57ECDC
    |   ----------------------------------------------------
    |   Index:    2
    |   Disk:     disk1s4
    |   Status:   Online
    |   Size:     2000248311808 B (2.0 TB)
    |
    +-> Logical Volume Family 00FCC443-973A-4C1F-99ED-9CDF9BCF060E
        ----------------------------------------------------------
        Encryption Status:       Unlocked
        Encryption Type:         None
        Conversion Status:       NoConversion
        Conversion Direction:    -none-
        Has Encrypted Extents:   No
        Fully Secure:            No
        Passphrase Required:     No
        |
        +-> Logical Volume 4765BAF4-69C4-472E-B678-3BAF3773D9C9
            ---------------------------------------------------
            Disk:               disk2
            Status:             Online
            Size (Total):       2607275888640 B (2.6 TB)
            Size (Converted):   -none-
            Revertible:         No
            LV Name:            Macintosh HD
            Volume Name:        Macintosh HD
            Content Hint:       Apple_HFS

Step Final, reinstall Max OSX

When this is all done, you can reinstall Mac OS X. Exit the terminal and hit ‘Reinstall Mac OS X Mountain Lion’. As you messed up the recovery partition with this endevour, it will start to redownload from the internet. Grab a cup of coffee now that you mastered a powerful command line tool and defeated the end-user safety barrier put in place by Apple.

After the download and install is completed, you can use e.g. Time Machine to restore your mac.

In Disk Utility.app on your Macintosh HD drive you will see the Windows partition nicely sandwiched in between.

Make yourself a nice Windows 7 or 8 (64 bits right!) USB disk (let me Google that for you) from which you can boot, reboot your mac and use Option/Alt to boot windows and install it into the Windows Partition. You might want to reformat this into NTFS. You can download the drivers for Bootcamp from here

Disclaimer

When Mac OS X is installed, the numbering of the partitions is different. Mac OS X will add a Boot Partition on the SSD and Harddisk (similar to the first ‘diskutil list’ listing we saw in the investigation step)

Mac OS X works fine using this three physical volume group Fusion Drive method. When I use a hard disk benchmark test like Blackmagic Disk Speed Test it runs at a whoping 300+ MB/s write and 400+ MB/s read. So I guess all is well.

I did not install Windows though, I will update this post when I have done so. However I have some experience in installing bootcamp this way (without using the actual bootcamp wizard)

UPDATE: 22DEC12-1600CET: command to createVolume in Step 3 was without the coreStorage command. now Corrected. UPDATE: 28DEC12: Windows can be installed with having the partition as ‘first’ on the disk. Please follow the guide http://dice.neko-san.net/2012/12/how-to-install-boot-camp-on-a-3tb-fusion-drive-mac/

Consulted Background Resources