Sunday, December 30, 2012

MacBook Pro (And Windows 8) with Fusion Drive

Earlier this year, adventurous tinkerers had successfully replaced their 2011 MacBook Pros' Hard Drives with Solid State Drives. It was then discovered that with a properly designed caddy, the SuperDrive can be removed and replaced with a second hard drive or SSD.

Recently, with the newest generation iMacs and Mac Minis, a new technology was released with Mac OS X 10.8.2 dubbed "Fusion Drive." Fusion drive uses Apple's Core Storage function to span a logical volume across two physical storages devices, in this case, an SSD and a HDD. The OS then will move your data in the background such that the most used data stays on the SSD, while the other data is saved to the HDD. The result is that the end user sees one "storage device" that has the massive space of a HDD, with the speed of a SSD, at a fraction of the cost. Naturally, I want to do this.

While setting up the Fusion Drive proved to be trivial, the installation of Windows 8 proved to be difficult. The ISO file has a UDF filesystem and Disk Utility will not let you restore it to a flash drive, so it must be burned to a DVD. I used a usb adaptor to connect my original internal SuperDrive, and it worked in all aspects(burning, reading, etc.) but I would get errors when trying to boot from it. Either I would get a blank screen with a blinking cursor, or(with the help of rEFIt, I could get the Windows installer to partially load before giving me a BSOD.)

Video Demonstration Fusion Drive and Windows 8

My Laptop:



15" MacBook Pro (Late 2011)
1680x1050 resolution glossy screen
8 GB Memory
750 GB 5400rpm Stock HDD(Toshiba brand)

Other Equipment:


External HDD (for backing up, if you wish)
Flash Drive or blank DVD/CD(for windows support drivers)

Disclaimers:


  • This will destroy all data on both your internal hard drive as well as your new solid state drive!
  • As with any setup with your data spanning multiple storage devices, your chances of losing your data due to the failure of one of those devices is increased.
  • You have to open up your MacBook Pro to remove/replace the optical drive and the hard drive. This is a warranty-voiding move and you can seriously damage your MacBook if you do not know what you are doing!
  • Your mileage may vary!
  • I am assuming that you have some experience in installing Windows on a Mac, as well as some basic knowledge of the terminal. Don't worry, the Terminal part isn't too tough.

Overview:


  1. Clone/Back up to external storage
  2. Physically install SSD and HDD
  3. Boot to USB key or Cloned HDD
  4. Format/Partition the HDD and SSD
  5. Create the CoreStorage volume, enabling Fusion Drive
  6. Install/Update or Clone OS X onto new Fusion Drive
  7. Finished(if not installing Windows via Boot Camp)
  8. Run Boot Camp Assistant to create Windows partition
  9. Put HDD and internal SuperDrive back in original places
  10. Boot from Windows 8 DVD and install to BOOTCAMP partition.
  11. Install Windows support drivers
  12. Put HDD and SSD back into MacBook
  13. Finished!


Detailed Steps:


1. Clone/Back up to external storage
In OS X, run Carbon Copy Cloner and back up your entire internal hard drive to an external hard drive. This may take a while depending on the amount of data you have. The Source should be your internal HDD and the Destination should be your external drive. Use "Maintain a backup(no archiving)"
Carbon Copy Cloner used for Bootable Backups
NB: You can use your Time Machine backup, but you MUST have a Mountain Lion USB recovery key to do so.


2. Physically Install SSD and HDD
Now you must tear open your MacBook and install the SSD where the current HDD is, Install the HDD in the CD Tray Caddy. I have heard of a few cases where the MacBook refuses to wake from sleep if the SSD is in the CD Tray, so take an extra 5 minutes to make that swap. I have linked the CD Tray Caddy I used above. You don't necessarily need any expensive piece of hardware for it to work. Instead of walking you through everything here, I will point you to iFixit. If you have a different MacBook than mine, follow those instructions from the same site.

Installing MacBook Pro 15" Unibody Late 2011 Dual Hard Drive

Untouched MacBook Pro with Bottom Removed

Oringial HDD installed in HDD Caddy

If your HDD Caddy did not come with the proper mounting tab/adapter cable, you will need to move them from the SuperDrive to the Caddy.

Transfer this mounting tab and adapter cable to the new HDD Caddy

Completed HDD/SSD Transplant

3. Boot to USB key or Cloned HDD
I did this with a USB recovery key, but it can be done with the Cloned copy you made as well. Hold the alt/option key at boot and choose the correct device to boot to.


4. Format/Partition the HDD and SSD
Once up, open Disk Utility.
For both internal drives, you need to do the following:

  • Choose the Drive(not the volume beneath the drive) and click the Partition tab.
  • Choose 1 partition
  • Name the drive "DriveA" for the SSD or "DriveB" for the HDD
  • Click Options and select GUID Partition Table
  • Click Apply. 

At this point, the drive is essentially empty. I hope you backed up!


5. Create the CoreStorage volume, enabling Fusion Drive
Now we will create the logical volume that spans both drives.

Open terminal and run:

sudo -i

Enter your password if needed. Warning: from this point on, you have root privileges. You will not be asked twice if you accidentally choose to wipe your only backup!

diskutil list

this is similar to what is shown when the command is run. Note where I highlighted
After entering that, you will see a list similar to that of the GUI version of Disk Utility. Pay attention to the drive name(top left) for the drives that contain "DriveA" and "DriveB" Mine both contain Apple_CoreStorage instead, since I already ran these commands. In my case, they were on /dev/disk0 and /dev/disk1, respectively. If your system shows them as different numbers, replace 0 and 1 with those numbers from this point on.
Create the Core Storage device using this command:

diskutil cs create "Fusion Drive" disk0 disk1

If it all works properly, You will see this line as part of the return:
"Core Storage LVG UUID: XXXXXXXX-XXXX-XXXX-XXXXXXXXXXX"
Open up TextEdit or grab some pen and paper, and copy this down. Be sure it is exactly correct. You need this for the next step!

Run this command to create the volume on your new CoreStorage device. (it is all one line)

diskutil coreStorage createVolume XXXXXXXX-XXXX-XXXX-XXXXXXXXXXX jhfs+ "Macintosh HD" 100%

At this point, you should see a device named "Fusion Drive" in the Disk Utility App, with "Macintosh HD" as the only volume on the drive.


6. Install/Update or Clone OS X onto new Fusion Drive
If you used the USB recovery key, you can install a fresh copy of Mountain Lion now. If you used your cloned hard drive, you can run Carbon Copy Cloner to restore your backup to the new Fusion drive.

If you are doing a fresh install, follow through normally, choosing the freshly created Macintosh HD volume. If you want to recover your time machine or other backup, be sure to choose a temporary user that is not the same name as your old user account. I used "temp". When done installing, run Software Update to update everything. At this point, you can use Migration Assistant (found in /Applications/Utilities) to recover your old user account, applications, and documents.


7. Finished(if not installing Windows via Boot Camp)
Congratulations! If you do not plan on using Windows via Boot Camp, you are done! Time to go show off how fast your MacBook is!

If you plan on installing Windows, please read on. I spent about 30 hours trying to get Windows 8 to boot successfully, and it basically boils down to you needing to set up the partition, put your SuperDrive back into your macbook, along with your internal HDD, and installing that way.


8. Run Boot Camp Assistant to create Windows partition
On your newly created Fusion Drive, run Boot Camp Assistant(can be found in /Applications/Utilities).
Click continue, and check the box for downloading software as well as installing windows 7. Save the support utilities to a flash drive, make your partition as large as you want(minimum for Windows 8 is 20GB, can be up to the maximum size of your internal HDD, if you have the free space).

If Boot Camp Assistant will not let you do so, open up Disk Utilitiy, select "Fusion Drive" and then the Partition tab. Click the plus icon below, Name the partition BOOTCAMP, choose MS-DOS(FAT) as the format, and size it how you like. Click Apply. After it is successfully completed, shut down your MacBook.


9. Put HDD and internal SuperDrive back in original places
Now you must follow the reverse of step 2 to put the internal HDD and the internal SuperDrive back where it came from. It is a pain, but as of now, the only way I found to get this working.

10. Boot from Windows 8 DVD and install to BOOTCAMP partition
Boot up your Macbook, holding the alt/option key. Insert your Windows install DVD if you haven't already. Select the Windows CD icon when it appears. The Windows Installer will load, and when it does, click Install Windows, and Custom install. At this point, highlight the BOOTCAMP partition, click Advanced, and Format. After clicking OK, click install, and it will begin. The MacBook may reboot a few times. if after the install, it boots into Mac OS X, reboot, hold the alt/option key and select the Windows Hard Drive icon, not the CD.
Soon you will be setting up your copy of Windows 8.


11. Install Windows support drivers
When in Windows 8, insert your flash drive that you saved the support drivers on, and run the installer to install all the necessary drivers. The only thing not working is that when you hit the volume or brightness keys, the overlay does not appear on the screen(but the actual functions still do work).


12. Put HDD and SSD back into MacBook
When done, power down your MacBook and follow Step 2, for the last time. If everything goes together correctly, when holding alt/option at startup, you should see 2 Fusion Drive icons, as well as a Windows Icon.
All 3 Drives are Present!


13. Finished!
Congratulations, if you have made it this far, you successfully have installed an SSD, created a fusion drive, and installed Windows 8! I hope you enjoy your newly upgraded Mac, and feel free to drop me a comment!