Replacing macOS with elementary OS. Computer boots normally into elementary OS, but boot menu (option key on boot) doesn't show anything 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 &amp;&amp; sudo systemctl enable startup-manager-fix.service &amp;&amp; sudo systemctl start startup-manager-fix.service &amp;&amp; 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.
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.



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



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



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 


Create a BOOT folder in the EFI folder.
Copy from the grubx64.efi file from the ubuntu folder to the BOOT folder.
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.



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


Restart your Mac and immediately press and hold the option key on your keyboard.
Release the option key when you see the Startup Manager window.
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.



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.



Next, you will need to make the following modifications.


If the BOOT folder does not exist, then create this folder. Otherwise, remove the contents of this folder.
Copy the contents from the refind folder to the BOOT folder.
Rename the refind_x64.efi file in the BOOT folder to BOOTx64.EFI.
Right click on the refind.conf file in the BOOT folder and then select Open in Scratch.
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

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.


Restart your Mac and immediately press and hold the option key on your keyboard.
Release the option key when you see the Startup Manager window.
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.