Refind For Mac

Disclaimer: This has the potential to destroy all the data on your drive. Make sure you have adequate (and verified working) backups before you proceed. You have been warned!

Refind (rEFInd) on Mac High Sierra/Leap 15.2. Hardware is mid-2011 Mac Mini. Partitioned Mac, installed Refind, then Leap 15.2 OS. Nothing after restart from Leap install. Used option key cold start to get back into Mac OS. Reinstalled Refind, restarted and was able to choose Leap from Refind menu. After doing usual post-install config stuff in. HowTo install rEFInd 0.10.4 on your MacBook Pro 13,2 (2016 with Touch ID) running on Mac OS Sierra. If necessary, mount the ESP or rEFInd-specific HFS+ volume, as described in Installing rEFInd Manually Using Mac OS X. (The mountesp script that comes with rEFInd will handle this task.) Verify that rEFInd is installed in the directory noted in step #1. If a refind.conf file is present, rEFInd is almost.

That being said this should leave all of your data untouched.

Refind For Mac

Background:

I have a mid-2012 15” non-Retina Mac book pro with a 1TB hard drive. I decided that I wanted to make my system faster by replacing the hard drive with an ssd and while I was at it I decided I also wanted to have Windows and Ubuntu partitions. Doing it this way meant that I had no data on the SSD while I experimented with partitions and boot managers although everything I did should be possible on a drive with an existing system.

Goals:

  • Multiple OSs installed with the ability to add more
  • A nice, manageable boot loader
  • Full disk encryption for macOS using filevault

Requirements:

  • A Mac running a recent-ish version of macOS
  • A linux ISO or install disk (Any should work but I picked Ubuntu Desktop)
  • A windows iso or install disk
  • An extra flash drive (may not be needed but can be very useful)
  • A macOS installer for your chosen version of macOS (can be downloaded from the App Store)
  • A second computer (again, may not be needed but also might be essential for troubleshooting)
  • A copy of rEFInd
  • a wired internet connection (in my experience this was necessary in order to get wifi working on Ubuntu but you mileage may vary)

Part 1: Installing rEFInd

These instructions assume an x86_64 architecture, if you for some reason have something different then you will need to pick a different set of files to copy across.

  1. Disable System Integrity Protections: this sounds bad but in order to mess with the EFI boot loader you have to do this.
    1. Boot into recovery mode
    2. Open terminal
    3. Run the command: csrutil disable to disable SIP
  2. Mount the EFI partition.
    mkdir /Volumes/ESP
    mount -t msdos /dev/disk0s1 /Volumes/ESP
  3. Create a directory called REFIND in the EFI volume at /EFI/REFIND
  4. Copy the right files.
    All paths are from the root of the rEFInd directory that you downloaded and all the files go into the directory you just created.
    • refind/drivers_x64/
    • refind/icons/
    • refind/refind_x64.efi
    • refind/tools_x64/
  5. Copy the sample config file to the same place as the other files and rename it to refind.conf
  6. Bless rEFInd.bless --mount /Volumes/ESP --setBoot --file /Volumes/ESP/EFI/REFIND/refind_x64.efi --shortform

Part 2: Partitioning

Note: For reasons best know to itself, Windows refuses to install on a partition numbered higher than 5 (eg. disk0s5). MacOS wil be installed in one of the first partitions since it is already installed and linux doesn’t care where you install it to. Don’t worry about accidentally removing the recovery partition, you can get it back later and removing it my make it easier to get windows to install.

Part 3: Windows

Refind for mac

I felt that windows was the most likely to cause problems so I decided to do it first to minimize my losses if it failed and wiped everything.

Boot Camp drivers

In order for windows play nicely with mac hardware you need to install the bootcamp drivers.

RefindRefind for mac download
  1. Open Boot Camp Assistant and click continue.
  2. On the second page select the option to download the latest Windows support software from apple an follow the instructions. This shouldn't do anything to your hard drive.

Installing Windows

  1. Restart the machine to get to the rEFInd menu
  2. Insert the Windows install media and press escape to make reFind regenerate its list of boot options.
  3. Select the Windows installer.
    There will probably be two options where one of them is labled legacy. I have always avoided the legacy options and had good experiences so I would recommend picking the other option.
  4. Once inside the installer, select advanced/custom install
  5. Select the correct partition and reformat it to ntfs.
    If it then complains about the partition table just restart the machine and it might work the second time. If not then you could try repartitioning the drive again.
  6. Finish the installation then install the bootcamp drivers once windows has booted
  7. Fix rEFInd

Refind For Mac Download

Part 4: Linux

Mac

The Linux installation process is similar to windows but it doesn't care which partition it is installed into. The exact process will vary between distributions but you will probably want to select the advanced option to make sure it only touches the correct partitions. If there is an option, I would recommend enabling proprietary drivers as this may help make wifi work. After the install is finished you will need to fix rEFInd again.

Part 5: Filevault

Try enabling it normally. (Hey, it might work, who knows!)If it complains about a lack of recovery disk then complete the section on recreating the recovery partition and try again.

Refind For Macbook Install In Debian

Fix rEFInd

Whenever you install a new OS or somtimes when you install updates, one of the operating systems may decide that you EFI boot selection is all broken and that it needs to be fixed. When this happens then when you reboot it will boot straight into that OS and skip rEFInd. Instructions for how to fix this are below and there is a script in the attached file.

  1. Restart and hold down the option key.
    This tells the hardware to skip straight to the mac bootloader, allowing you to bypass your broken EFI settings.
  2. Select your macOS partition to boot from.
  3. Open terminal
  4. Mount the ESP volume:
    mkdir /Volumes/ESP
    mount -t msdos /dev/disk0s1 /Volumes/ESP
  5. Bless the reFind programbless --mount /Volumes/ESP --setBoot --file /Volumes/ESP/EFI/REFIND/refind_x64.efi --shortform

Everything should be fixed now and rEFInd should work as normal

Recreate Recovery Partition

  1. Download the Recovery Partition tool
    This tool is very simple and does exactly what it claims to do. The only downside in my experience is that it gives no indication of progress.
  2. Run it. You may need to provided it with an installer for your current version of macOS.
  3. Check to see if it worked.
    Restart and hold option. If it worked you should see an option to boot into recovery mode.

Refind For Mac M1 Download

What Next

If you got this far then you should still have a working macOS install and in addition you should now be using rEFInd and have one or more other operating systems installed. At this point adding, removing, or changing which OSs you have should be fairly simple and rEFInd should automatically detect them. From time to time installing updates will break you rEFInd configuration but when that happens just follow the instuctions to fix it and everything should be ok. Unfortunately System Integrity Protections are still disabled but if they are enabled again they will make it impossible to fix rEFInd and may break things.

References

  • rEFInd By Roderick W. Smith
  • Recovery Partition by Christopher Silvertooth
  • Probably a few other guides that I have since lost the links to
Hardware is mid-2011 Mac Mini. Partitioned Mac, installed Refind, then Leap 15.2 OS. Nothing after restart from Leap install. Used option key cold start to get back into Mac OS. Reinstalled Refind, restarted and was able to choose Leap from Refind menu. After doing usual post-install config stuff in Leap I rebooted and once again got blank screen. Same option key cold start got me back to Mac OS, same reinstall of Refind and restart got me menu again.
While in Leap I visited Sourceforge rEFInd page and downloaded the RPM file, then installed through YaST. This did not change anything. I eventually looked at Leap YaST Boot Loader Settings and unchecked 'Enable Secure Boot Support'. This gave me a better result, although not completely what I expected.
My current status is as follows: If I reboot Leap I do not receive the Refind menu but see the normal Leap 15.2 startup and OS load. The only way I can load Mac High Sierra is by using the option key during cold start or restart and choosing Mac OS. If I reboot from the Mac OS I get the normal Leap 15.2 startup and OS load.
My expectation and goal with this dual-boot system is to see the Refind menu after restarting either of the installed operating systems. Fairly sure I'm missing something here, with the inclination that I need to do something further with the Refind installation on the Leap side. I thought the Boot Loader drop down list in the YaST Boot Loader Settings might have an entry for Refind but it doesn't, and I'm not sure what 'Not Managed' is for. I didn't see any other settings in here that seemed relevant. System is usable at this point so that's good.