5

I want to replace macOS with elementary OS on a Mac.

I formated the entire hard disk, inserted the elementary OS bootable USB, selected EFI boot on the boot loader (only option) and installed elementary OS. Everything works well.

The computer boots normally into elementary OS, but if I press the option key on boot, nothing shows on the bootloader.

If I install, choose something else and create just the root and swap partition i get a Windows partion on the boot loader. This leads me to think that is something related to installing in the EFI mode.

Does anyone know what could be happening?

Also, why when I insert the live USB, I only get the EFI option and not the windows (bios mode) option when I press the option key?

Edit:

The first method provided by David Anderson worked.

I just want to add that i made a systemd service to clone the grubx64.efi on every reboot/shutdown so that even if this file gets updated, BOOTx64.EFI are updated as well. This will also automate the solution given by David.

This is what i did:

1 - Create a file named startup-manager-fix.service with the following text:

[Unit]
Description=Show EFI Install in Apple Startup Manager
After=rc-local.service

[Service]
Type=oneshot
RemainAfterExit=true
ExecStop=-/bin/mkdir /boot/efi/EFI/BOOT/
ExecStop=/bin/cp -a -f /boot/efi/EFI/ubuntu/grubx64.efi /boot/efi/EFI/BOOT/BOOTx64.EFI

[Install]
WantedBy=multi-user.target

2 - Copy the above file to the folder /etc/systemd/system/

3 - Open the terminal and insert this command to activate the service that will sync both files.

sudo systemctl daemon-reload && sudo systemctl enable startup-manager-fix.service && sudo systemctl start startup-manager-fix.service && sudo systemctl daemon-reload

4 - reboot and the next time you access the apple boot selector (press the option key on startup) the elementary OS ( or other Ubuntu based distro) EFI Installation should be present.

Thanks again to David for the solution.

6

Note: In the examples below, the download elementary OS installation was named elementaryos-0.4.1-stable.20180214.iso. The images were created using VirtualBox 5.2.16 r123759 (Qt5.6.3).

Why does nothing appear in the Startup Manager when installing for an EFI boot?

As you have discovered, Macs can be configured to boot operating systems that do not always appear in the Startup Manager. This can be corrected. Let us start with normal EFI booting install of the elementary OS. Right click on the icon labeled Files in the Applications menu, then select New Windows as Administrator, as shown below.

j1

Under Devices, click on File System. You should get a window similar to what is shown below.

j2

Next, open the the following folders: boot, efi, EFI and finally ubuntu. You should get a window similar to what is shown below.

j3

When your Mac boots, the software stored in the grubx64.efi file is executed. Unfortunately, this file has a name and is stored in a folder that will not be recognized by the Startup Manager. Therefore, noting appears when you hold down the option at startup. One simple solution would be to

  1. Create a BOOT folder in the EFI folder.
  2. Copy from the grubx64.efi file from the ubuntu folder to the BOOT folder.
  3. Rename the grubx64.efi file in the BOOT folder to BOOTx64.EFI.

The image below shows the contents of the BOOT folder after having followed the above steps.

j4

Finally, follow the steps given below to insure the Mac boot loader executes the BOOTx64.EFI file.

  1. Restart your Mac and immediately press and hold the option key on your keyboard.
  2. Release the option key when you see the Startup Manager window.
  3. Hold down the control key while selecting the internal disk icon labeled EFI boot

The elementary OS will now appear in the Startup Manager as an internal drive icon with the label EFI boot.

The above solution has one problem: The elementary OS has no idea you made these changes. Therefore, any updates to the grubx64.efi file will not be automatically copied to the BOOTx64.EFI file. A better solution, that avoids this problem, is given below.

First, use the Epiphany Web Browser to download the rEFInd Boot Manager. In my case, the file refind_0.11.3-1_amd64.deb was downloaded to my Downloads folder. When finished, quit the Epiphany application.

Next, right click on the icon labeled Terminal in the Applications menu, then select New Window. You should get a window similar to what is shown below.

j6

In the Terminal window, enter the following commands. If you downloaded a different file or downloaded to a different folder, then make the appropriate substitutions. When finished, quit the Terminal application.

cd Downloads
sudo dpkg -i refind_0.11.3-1_amd64.deb

The result, of running the above commands, was the creation of the refind and tools folders in the EFI folder, as shown below.

j5

Next, you will need to make the following modifications.

  1. If the BOOT folder does not exist, then create this folder. Otherwise, remove the contents of this folder.
  2. Copy the contents from the refind folder to the BOOT folder.
  3. Rename the refind_x64.efi file in the BOOT folder to BOOTx64.EFI.
  4. Right click on the refind.conf file in the BOOT folder and then select Open in Scratch.
  5. Add the following lines at the end of the opened refind.conf file.

    #
    # Added to make rEFInd silent. 
    #
    menuentry "Elementary" {
        icon \EFI\BOOT\icons\os_elementary.png
        volume "EFI"
        loader \EFI\ubuntu\grubx64.efi
        ostype Linux
        graphics on
    }
    timeout -1
    hideui all
    scanfor manual
    
  6. Close the refind.conf tab and quit the Scratch application.

Finally, follow the steps given below to insure the Mac boot loader executes the BOOTx64.EFI file.

  1. Restart your Mac and immediately press and hold the option key on your keyboard.
  2. Release the option key when you see the Startup Manager window.
  3. Hold down the control key while selecting the internal disk icon labeled EFI boot

Now, when you select the internal disk icon labeled EFI boot in the Startup Manager, rEFInd will silently boot elementary OS.

Why does an icon with the Windows label appear in the Startup Manager when installing for an BIOS boot?

Orignially, when Apple first allowed Windows to be installed on Macs, Windows had to be installed for a BIOS boot. Therefore, Apple used Windows as the label displayed in the Boot Manager when any BIOS booting operating system was installed. This convention was repeated in all Macs until 2015, when Apple started shipping Macs that could no longer BIOS boot.

  • Thank you very much for your detailed answer. I will try it and i tell you how it went. "The above solution has one problem: The elementary OS has no idea you made these changes. Therefore, any updates to the grubx64.efi file will not be automatically copied to the bootx64.efi file. A better solution, that avoids this problem, is given below." What if i put this on the rc.local executable? Would't it update every time i boot the computer? Do you know why i don't see the bios installation option on the bootloader when i insert the live usb? Thanks again. – Daisuke Jigen Aug 7 '18 at 21:45
  • The grubx64.efi and BOOTx64.EFI files execute before the rc.local file. If an update changed grubx64.efi in a way that would require grubx64.efi to be copied to BOOTX64.EFI, the copy operation stored in rc.local would not execute beforeBOOTX64.EFI executes. Basically, grubx64.efi and BOOTx64.EFI are GRUB files, where as rc.local is a linux file. GRUB executes before linux. – David Anderson Aug 7 '18 at 23:41
  • The Mac firmware can not BIOS boot from a USB port. The firmware in certain Mac models can BIOS boot from an optical drive or from an internal drive. One workaround would be to BIOS boot a USB drive from VirtualBox and install to an internal physical drive. This method should only be employed by experienced Mac users. Also, in practice, one would use an ISO file instead of a USB drive. – David Anderson Aug 8 '18 at 0:01
  • Another problem with using rc.local would be if an update or upgrade of elementary OS changed, replaced or removed the rc.local file. In such a case, the copy operation could be eliminated. The rEFInd Boot Manager eliminates this problem. The rEFInd Boot Manager does not actually boot load anything. What happens is that rEFInd tells the Mac boot loader the correct files to boot load. When your Mac starts up, the Mac boot loader boots rEFInd. Next, rEFInd instructs the Mac boot loader to boot GRUB. The Mac restarts and the Mac boot loader boots GRUB. Finally, GRUB boots elementary OS. – David Anderson Aug 8 '18 at 0:41
  • Thanks again for the detailed explanation. Is there a problem if the grubx64.efi and BOOTx64.EFI contents don't match? Isn't the BOOTx64.EFI just for showing the "efi boot" disk in the apple bootloader? Thanks again for your time. – Daisuke Jigen Aug 8 '18 at 1:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .