Install rEFInd on another partition
This answer applies to Yosemite (OS X 10.10). If you are using El Capitan (OS X 10.11), then you would be better of installing rEFInd in a EFI partition.


In your example, the command would be as shown below.

./install.sh  --alldrivers  --ownhfs  /dev/disk0s5.


I assume disk0s5 has been formatted "Mac OS Extended (Journaled)". I don't think I would use a 17.1 GB partition. The rEFInd partition on my Mac is 134 MB in size.

If you need to write to disk0s5 while booted to Ubuntu, you may have to disable journaling. This usually happens when you need to modify refind.conf.

To turn journaling off, do the following using the Disk Utility application.


Highlight the partition.
Press and hold the "alt/option" key.
From the menu bar select "File->Disable Journaling"
Release the "alt/option" key.
You may have to quit and reopen the Disk Utility to see the change.


To turn journaling on, you need to highlight the partition and click on the "Enable Journaling" button. To see the change, you may have to quit and reopen the Disk Utility application.