Refind not working on dual boot macos/ubuntu

I have installed Ubuntu on my macbook air with OSx Sierra after installing Refind and partitioning.

Before Ubuntu, Refind was working. But after Ubuntu was installed, my mba boots directly into Ubuntu instead of showing refind. If I wanted to boot to macOS, I need to press option key when starting, rendering refind useless.

How can this be rectified?


You've run into what I call a "boot coup" -- see this page of the rEFInd documentation for details. You may be able to get rEFInd booting again by typing sudo refind-mkdefault in an Ubuntu Terminal window. If that doesn't work, you could try re-installing rEFInd from either OS X (preferred) or Ubuntu (if necessary). The page referenced earlier provides additional methods of recovery.

Given the order in which you installed software, you may want to install the ext4fs (or whatever filesystem holds your kernel) driver for EFI, as described on the rEFInd drivers page. As it is now, chances are this driver isn't installed, which means rEFInd will boot Ubuntu only via GRUB; but a more direct boot of the kernel is sometimes more reliable and easier to maintain. To do this more direct boot, though, the EFI filesystem driver is required.


Open a terminal, run efibootmgr -v. Find the BootXXXX item that matches the refind entry (the path at the right will have \EFI\refind\refind_x64.efi in it). Then run efibootmgr -o XXXX,YYYY where the XXXX is the refind entry and YYYY etc are others.
NOTE you will need to do this each time the kernel is updated.