26

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!

  • It is possible to have Apple's EFI load an Ubuntu EFI stub directly, without the need for rEFInd or GRUB 2. See this question for instructions. – Tanner Sep 05 '20 at 07:56
  • I have just installed debian 12 (in dual boot) on my old macbook and I also didn't want to mess with the boot loader. Hence, I left the boot loader as it was and installed debian on a different partition. The result was that when I start I get the normal debian starting screen. If I want to start into the old mac system I start with the option key held down. Maybe this is not fancy, but it is sufficient for me. – Nathanael Skrepek Feb 11 '24 at 18:25

2 Answers2

26

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/OSX10.11.6/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 06 '17 at 00: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 07 '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 02 '18 at 04:08
  • Ha... I like that - "1. Install Ubuntu". If only it were that simple for me! I've posted two questions on this with no answers so far (Q1 and Q2), but still don't have a solution. How about some details on your "Step 1"? – Seamus Jun 04 '20 at 09:44
  • @Seamus: The question was not on how to install Ubuntu. Your Q1 and Q2 links are to the same question, which at present has to two answers posted. I have posted answers on how to instal Ubuntu such has here. – David Anderson Jun 04 '20 at 13:23
  • @DavidAnderson: I goofed on the URL for Q2 - sorry about that. – Seamus Jun 05 '20 at 01:29
  • @DavidAnderson: Yes - 2 answers to Q1, but one was just posted since I commented to japhwil's answer. The one from May 25 did not help me, and the poster didn't respond to my request for clarification. – Seamus Jun 05 '20 at 01:37
  • @DavidAnderson: re your answer here: I recall seeing that answer, but I was confused by your reference to the use of the VirtualBox image. I don't use VirtualBox, and I thought at the time that it was another "rabbit hole". I suppose my pre-conceived notion was that if it didn't use an ISO d/l fm Ubuntu, it wasn't going to help me. I've just re-read the answer & still confused as to what you've done here. Let me study it further & I'll post any questions there. – Seamus Jun 05 '20 at 01:44
  • 1
    I installed Ubuntu on a Mac. When I went to post the steps, I wanted to include images. To do this, I installed Ubuntu in a virtual machine. This allowed me to capture images which I used in my answer. The instructions are for installing Ubuntu on an actual Mac. The steps given in the answer start where the OP left off in the posted question. I do not think you read the question before reading my answer. – David Anderson Jun 06 '20 at 18:28
  • @DavidAnderson: You are correct - I have seen the light! :) +1 – Seamus Jun 07 '20 at 07:43
20

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.)

Rod Smith
  • 44,284
  • 7
  • 63
  • 105
  • As I understand all of this: If dual-booting macOS & Linux, one must use either rEFInd (or alternative) or grub to boot the Linux kernel. - have I got that correct? – Seamus Jun 04 '20 at 09:55
  • 2
    @Seamus, there are other options besides those you've specified, but as a practical matter, something is needed to load the Linux kernel, and that "something" is usually either GRUB 2 or rEFInd. In theory, a Linux kernel with an EFI stub loader could be loaded directly by Apple's EFI, but this is a very awkward solution that's officially supported by few or no Linux distributions, AFAIK. See my page on installing Linux on EFI systems, referenced in my answer, for more details. – Rod Smith Jun 05 '20 at 13:20
  • Can rEFInd still boot macOS inside APFS partitions? I had a dual boot setup working but some grub update killed the dual. Holding Alt while powering on only shows a "Windows" icon which then says no OS found in a black screen. I can only boot directly into Debian if I set it at the top of the boot order via efibootmgr. – hyiltiz Oct 16 '20 at 05:07