Contribute
Register

How to create a Fusion Drive with a Recovery HD partition and working Find My Mac

Status
Not open for further replies.
Joined
May 21, 2012
Messages
72
Motherboard
Gigabyte Z77-DS3H Rev 1.0
CPU
i5-3570K
Graphics
MSI AMD Radeon RX 580 Armor 8GB
This is a guide for anyone who wants to create a Fusion Drive with a Recovery HD. Fusion Drive is a single Logical Volume comprising two hard drives, usually an SSD and a HDD, to give the speed of the first with the capacity of the second. Recovery HD is necessary for services such as FileVault and Find My Mac.

If you do not require a Recovery HD or Find My Mac but want a Fusion Drive, then I suggest you follow neilhart's excellent guide here:
http://www.tonymacx86.com/mountain-...ion-drive-using-tonymacx86-tools-chimera.html
It is more in-depth, and slightly different due to the lack of a Recovery HD in his method.

Credit also goes to him for large sections of this guide, which I adapted to make this solution.

Requirements:
i) Two hard drives (for best results an SSD and a HDD)
ii) A working Mac/Hackintosh, which is not booting from either of the drives you wish to set up
iii) A working Recovery HD partition (which can be on the Mac you are using to set up the Fusion Drive)
iv) Pacifist
v) Chimera

Start with two empty drives, for best results an SSD and a HDD. Using the Disk Utility application, format them both with the GUID partition map scheme and Mac OS Extended (Journaled) (jhfs+) file format. I called mine SSD and HDD. Now select HDD in the left-hand column (just your partition not the whole drive), and make a note of its size in bytes. This will be written in the bottom right of the window under Total Capacity. Do the same for the Recovery HD partition from your real Mac. This may be hidden in Disk Utility by default, in order to view it, follow the instructions on this page:
http://reviews.cnet.com/8301-13727_7-20081463-263/manage-all-partitions-with-disk-utility-in-os-x/

Then open the Terminal application and type this command:
Code:
diskutil list

It will return a complete list of the drives and partitions attached to the computer, each with an IDENTIFIER. Make a note of the identifier which corresponds to HDD, ignoring the ones for GUID_partition_scheme and EFI EFI. Mine was disk0s2, though yours may not be.

Partition HDD with Terminal into two jhfs+ partitions by pasting in this command, making the necessary changes:
Code:
diskutil resizeVolume IDENTIFIER xB jhfs+ "Recovery HD" yB

Replace IDENTIFIER with your own IDENTIFIER which you noted above, y with the size in bytes of the Recovery HD volume from your real Mac (which should be the same as here, but may not be), and x with the size in bytes of your HDD that you noted above minus the size in bytes of the Recovery HD. You will need a calculator for this. For example, my HDD’s size was 500,107,862,016B and my Recovery HD’s size was 650,002,432B so I would replace x with 499457859584, and y with 650002432. Its IDENTIFIER was disk0s2, so my overall command was:
Code:
diskutil resizeVolume disk0s2 499457859584B jhfs+ "Recovery HD" 650002432B

We can now convert the new Recovery HD partition from jhfs+ to Apple_Boot. First, take note of the exact start/size of the partition by entering this command, replacing disk0 with the disk number allocated to your HDD:
Code:
sudo gpt show disk0

You should see a list of the partitions on the drive, the one we are interested in is shown here with asterisks, the last GPT partition on the disk.

Code:
     start       size  index  contents
        0          1         PMBR
        1          1         Pri GPT header
        2         32         Pri GPT table
       34          6
       40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
   409640  246725744      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
247135384     262144
**247397528    1269528       3  GPT part - 48465300-0000-11AA-AA11-00306543ECAC**
248667056    1402591
250069647         32         Sec GPT table
250069679          1         Sec GPT header

Identify yours and note its start and size values.
Now remove the partition, and re-add it with the UUID=426F6F74-0000-11AA-AA11-00306543ECAC, using the following commands as guides, but replacing your start and size values:

Code:
gpt remove -b 247397528 -s 1269528 -t 48465300-0000-11AA-AA11-00306543ECAC disk0
gpt add -b 247397528 -s 1269528 -t 426F6F74-0000-11AA-AA11-00306543ECAC disk0

Now copy the Recovery HD partition from your real Mac to this partition (replace the relevant IDENTIFIERs):

Code:
dd if=/dev/disk2s3 of=/dev/disk0s3

Now we will create a Fusion Drive, using the whole of the SSD, but only one of the HDD partitions, leaving the Recovery HD separate:
Code:
diskutil cs create "Fusion Drive" disk0s2 disk1

(Where disk1 is the SSD and disk0s2 is the non-Recovery HD partition on the HDD.)

Now type:
Code:
diskutil cs list

You should see the details of all the logical volume groups on your computer, including your one Fusion Drive. Note down the alphanumeric string for Logical Volume Group, marked here with asterisks.

Code:
CoreStorage logical volume groups (1 found)
|
+-- Logical Volume Group **A0E3CC23-DB6F-4320-85F3-B51F83715937**
    =========================================================
    Name:         Fusion Drive
    Size:         559441313792 B (559.4 GB)
    Free Space:   556648685568 B (556.6 GB)
    |
    +-< Physical Volume 3EBCD92A-4D9C-4484-B737-C542EDF46F56
    |   ----------------------------------------------------
    |   Index:    0
    |   Disk:     disk1s2
    |   Status:   Online
    |   Size:     59678507008 B (59.7 GB)
    |
    +-< Physical Volume 303E620A-63B5-4174-85C7-B2BCBA494179
        ----------------------------------------------------
        Index:    1
        Disk:     disk0s2
        Status:   Online
        Size:     499762806784 B (499.8 GB)

Enter the command below, inserting your alphanumeric string for Logical Volume Group, and a name of your choice for Name of Fusion Drive (speech marks needed):
Code:
diskutil coreStorage createVolume Logical Volume Group jhfs+ “Name of Fusion Drive” 100%

Once the command completes, type:
Code:
diskutil list

You should see your Fusion Drive now in the list somewhere, along with the two drives which make it up, like this:

Code:
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                 *500.1 GB   disk0
   1:                        EFI                              209.7 MB   disk0s1
   2:          Apple_CoreStorage                     499.8 GB   disk0s2
   3:          Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                 *60.0  GB   disk1
   1:                        EFI                             209.7 MB   disk1s1
   2:          Apple_CoreStorage                     59.7  GB   disk1s2
   3:                 Apple_Boot Boot OS X         134.2 MB   disk1s3
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:       Apple_HFS Name of Fusion Drive   *556.6 GB   disk2

The first drive is the HDD, with half of the Fusion Drive, and the Recovery HD. The second drive is the SSD, with the other half of the Fusion Drive, and a helper partition called Boot OS X, which is created by the Fusion Drive process. The third drive is the Fusion Drive itself, now recognised as a separate entity by the system.

Now download Chimera from TonyMacx86 Downloads section and place the package on your desktop.
If you do not already have Pacifist, google it and download. Install Pacifist to /Applications.

Open Pacifist and select Open Package. Select the Chimera package on your Desktop. Navigate in the Pacifist window to the i386 folder, select it, and then Extract To… Desktop. Once this has completed close Pacifist, find the i386 folder on your Desktop and move the boot, boot0, and boot1h files out of it onto your Desktop.

Copy your Hackintosh’s /Extra folder to the Desktop too.

In Terminal, type:
Code:
cd Desktop

Followed by:
Code:
sudo su

And then:
Code:
diskutil list

Note the disk numbers of your SSD and HDD, and the IDENTIFIER of your Boot OS X partition, mine were disk0, disk1, and disk1s3, as shown above.

Now type the following three commands, replacing disk0 and disk1 with your own two drive numbers, and rdisk1s3 with r followed by your own Boot OS X IDENTIFIER (no space between r and the IDENTIFIER):
Code:
fdisk -f boot0 -u -y /dev/disk0
fdisk -f boot0 -u -y /dev/disk1
dd if=boot1h of=/dev/rdisk1s3

Note, you may have to ensure the two disks are mounted/unmounted to be able to execute some of these commands. If you get a Permission Denied message, try that using Disk Utility.

Now enter these commands (replacing disk1s3 with the IDENTIFIER of your Boot OS X partition):
Code:
diskutil mount disk1s3
cp boot /Volumes/Boot\ OS\ X/
cp -R Extra /Volumes/Boot\ OS\ X/
diskutil unmount disk1s3

You can now clone your previous install onto the new Fusion Drive using SuperDuper! or Carbon Copy Cloner if you wish, or you can install Mac OS X onto the drive with Unibeast and begin afresh.

Finished!

Notes:
With this setup, you do not need an /Extra folder at the root of your boot drive, you only need the copy on your Boot OS X partition.
Any changes to /Extra must be performed to the /Extra folder on your Boot OS X partition to have any effect.
To make this easier, enable Show Every Partition in Disk Utility by following the instructions in the article linked near the top of these instructions. Then you will be able to easily mount, edit, and unmount the Boot OS X partition at will.
You may need to set your boot drive order in the BIOS to ensure that your SSD is the first drive to be booted from.
Do not copy anything to the Recovery HD partition, or edit it in any way.
Do not repair the Fusion Drive using Disk Utility, as it wipes the files copied to the boot sectors and breaks it. You can however conduct repairs to your HD. That is, in Disk Utility, you cannot repair the first drive Fusion Drive on the left, but you may repair the subsection drive underneath it, Macintosh HD or Name of Fusion Drive or whatever yours is called.

Find My Mac can now be enabled.

However, in some cases, to keep Find My Mac enabled after a reboot you will also need to:
i) Install FileNVRAM.dylib to /Extra/modules (if you do not already have it).
ii) Reboot
ii) Download the file in the following thread by xenatt to /Downloads:
http://www.tonymacx86.com/general-help/105219-icloud-imessage-find-my-mac-nvram-patch.html
iii) Run this command in Terminal:
Code:
sudo sh ~/Downloads/iMsgPatch.sh
iv) Reboot

Credit goes to xenatt for this final section on keeping FMM checked after reboot when it does not automatically.

I created a Fusion Drive and Recovery HD using this method on a H61N-USB3, which did not require the steps to keep FMM enabled, and on a Z77-DS3H, which did.


Any suggestions or questions let me know.

Cheers
 
In the sense that what i would need to do is a clean install of maverick with a recovery partition on another drive then those i intend to use for the fusion drive (they are currently holding my 10.8.5 system and re not fusion drive at the moment. Set the new FDD, then clone the new maverick from the third drive that to the new fusion drive….After that once the systeme is working on the FDD and bootable on the fusion drive, can we erase the os on the first drive on which we install maverick?…This seems like a lot of OS version o a lot of drives?
 
I dont understand these instructions fully, so id be glad if someone could explain them in detail.

I personally have set up a custom fusion drive but have a problem with clover, in that i always have to mirror my EFI partition between both disks (HDD and SSD). I suspect, there is a way to set up the EFI partition so that if detects it for both disk as one (for the logical volume created for the fusion drive), but this exceeds my capabilities...
 
Status
Not open for further replies.
Back
Top