15

I think the title quite sums up the content of this post. I'd like to dual-boot a macbook pro 13' without having to use a third party boot loader. All the tutorials I've found use rEFIt o rEFInd to successfully boot Linux when it's been installed, but I'm not comfortable with the idea of wiping out the default Apple's boot-loader when, for me, it's the best thing when it comes to boot-loaders that I've ever seen.

Is there any way to make this?

Thanks!

17

Ubuntu installs grub and other files in the first EFI System partition on a Mac computer. Normally, this is the first partition on a Mac computer. The process of making the Ubuntu appear on the Startup Manager is a fairly trivial. The steps are given below.

Note: Starting with Ubuntu 18, the installer software should automatically create the files necessary to boot Ubuntu on a Mac. Therefore, Ubuntu 18 and later users should be able to skip steps 5 and 6.

  1. Install Ubuntu.
  2. When finished, restart and hold down the option key to invoke the Startup Manager. Select to boot from the OS X (or MacOS) volume.
  3. Open a Terminal application window.

  4. Mount the EFI System partition by entering the command given below.

    diskutil mount disk0s1
    
  5. Create a folder named Boot in the folder /Volumes/EFI/EFI. You can use the Finder application or enter the command given below.

    mkdir /Volumes/EFI/EFI/Boot
    
  6. Copy the file grubx64.efi from the folder /Volumes/EFI/EFI/ubuntu to the folder /Volumes/EFI/EFI/Boot. Next, rename this file bootx64.efi. This step can be accomplished by using the the Finder application or by entering the command given below.

    cp /Volumes/EFI/EFI/ubuntu/grubx64.efi /Volumes/EFI/EFI/Boot/bootx64.efi
    
  7. (Optional) Download a collection of icons from the sourceforge web site Mac icns. Use the Finder application to open the downloaded file mac-icns.dmg, then enter the command below to copy the Ubuntu icon file os_ubuntu.icns to the EFI System partition.

    cp /Volumes/mac-icns/os_ubuntu.icns /Volumes/EFI/.VolumeIcon.icns
    

    This will add the following Ubuntu icon to the Startup Menu.

    os_ubuntu.png

    Note: When finished, you can use the Finder application to eject the mac-icns volume.

  8. Use the Finder application or enter the command below to unmount the EFI System partition labeled EFI.

    diskutil unmount disk0s1
    
  • 1
    +1 Worked perfectly for me to install Linux Mint 18 as a dual boot with macOS Sierra on my 2014 Macbook Air – setholopolus Dec 20 '16 at 14:16
  • How does step 7 work? Why would that only change the icon for the Ubuntu partition? Can I also change the icon for Macintosh HD so that there's a Sierra logo for the Mac partition and an Ubuntu logo for the Linux partition at the startup menu? – Arc676 Jan 6 '17 at 0:59
  • OK now I have the Ubuntu icon where you specified and a Mac icon in / on my Sierra partition. The Mac icon appears for Mac HD and the Ubuntu one for the other partition. However, I have a feeling that putting the icon where you specified just makes it the default icon because putting the icon in the root of the Ubuntu partition didn't work. What if I were to install a third OS? – Arc676 Jan 7 '17 at 13:39
  • 1
    @Arc676: Installing a third OS may require a second EFI partition. There is no limit to the number of EFI partitions you can have. An example, of a second EFI partition, can be found at this answer. – David Anderson Dec 26 '17 at 19:16
  • This answer saved me from insanity. I spent at least 4 days trying to solve an issue with my iMac. Basically, rEFInd corrupted the native display drivers of the iMac. Not sure how but it would make the default resolution be the lowest resolution. The solution to that problem would delete the rEFInd. Reinstalling rEFInd would corrupt the drivers again, and so on and so forth. Thanks @DavidAnderson. – jnkrois Feb 2 '18 at 4:08
13

Be aware that neither rEFIt nor rEFInd damages, much less "wipes out," the default Apple boot loader; indeed, both rEFIt and rEFInd simply insert themselves into the boot process and then launch Apple's boot loader themselves.

Fundamentally, rEFIt and rEFInd are boot managers. A boot manager presents a menu or some other user interface tool to enable you to select which OS to boot. Most EFIs, including Apple's, include their own boot managers; however, these built-in boot managers are usually very primitive. On a Mac, you launch the built-in boot manager by holding down the Option (or Alt) key as the computer starts up (when the startup chime sounds). The Mac's built-in boot manager is awkward to access and limited in its capabilities. I presume this is what motivated Christoph Pfisterer to create rEFIt. I forked rEFIt into rEFInd after rEFIt fell into disrepair. I was more motivated by boot issues on UEFI-based PCs, but rEFInd remains a way around the limitations of Apple's boot manager.

A boot loader, by contrast, loads a kernel into memory and transfers control to it. A boot loader does not need to interact with the user directly (although it could). Neither rEFIt nor rEFInd is technically a boot loader, although the Linux kernel creates a blurred line, because it includes a feature (the EFI stub loader) that enables it to function as its own EFI boot loader. Also, some boot loaders, such as the GRUB 2 boot loader that's popular with Linux distributions, function as boot managers as well as being boot loaders.

If you're dual-booting Ubuntu and OS X (or macOS, as it's been recently re-named) on a Mac, it's a practical necessity to add something to the boot process. You could rely on Apple's boot manager to control which OS to boot, and in that case no non-Apple tool would be involved when booting OS X. You'd still need something (GRUB, rEFInd, or some other boot loader or boot manager) to launch a Linux kernel, though. Given that most of these tools are more convenient to use than is Apple's built-in boot manager, most users leave them set in the boot order such that they're called before the OS X boot manager.

If you simply dislike rEFInd, you can certainly do without it. You could rely on GRUB 2's boot manager features, or you could install another tool, like gummiboot/systemd-boot. In theory, if you install Ubuntu in EFI mode, it should install GRUB 2 in a way that will make it the default boot manager, and it should provide options for booting both Ubuntu and OS X. In practice, I'm not sure that will work -- Apple does everything a little differently, and so few enough people do it this way that I can't promise it would work. You could try it, though, and then fix any problems you encounter after the fact. I recommend learning more about EFI booting before you start, though, so that you don't make some basic mistake like booting the installer in BIOS mode or setting up your partitions in the wrong way. You might start with these pages:

If you decide to stick with the more traveled path of using rEFInd, be sure to check the date of any instructions you follow. Some very old pages are still out there, and they usually fail to address new issues like System Integrity Protection (SIP); or they describe using the abandoned rEFIt rather than the newer rEFInd. (Although rEFIt can still be made to work with newer OS X versions, doing so may require jumping through undocumented hoops.)

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.