I currently have three OSes installed on my 2017 MacBook Air: macOS, Ubuntu, and Windows 10. I couldn't boot into Ubuntu without rEFInd, but I strongly prefer the default boot manager, because I want to use the firmware password (which rEFInd doesn't have).
Is there any way for the macOS boot manager to recognize Ubuntu without using a third-party boot manager?
NOTES:
- I don't want Ubuntu set as my default OS as an alternative. I just want it to appear in the boot menu.
- I don't mind if it just goes into GRUB. As long as it somehow can load the kernel, it's fine.
The output from the command diskutil list
.
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.3 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 242.6 GB disk0s2
3: Linux Filesystem 49.9 GB disk0s4
4: Microsoft Basic Data WinData 75.1 GB disk0s5
5: Microsoft Basic Data Windows 125.1 GB disk0s6
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +242.6 GB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD 74.0 GB disk1s1
2: APFS Volume Preboot 25.1 MB disk1s2
3: APFS Volume Recovery 506.6 MB disk1s3
4: APFS Volume VM 2.1 GB disk1s4
Best Answer
Alternative Second Answer
This second answer differs from my first answer in the following ways.
The second EFI partition is replaced by a HFS+ partition.
The label displayed in the Startup Manager will be "Ubuntu" instead of the generic "EFI Boot".
I will assume the following:
I will offer two ways to solve your problem. Each has it pros and cons.
The Mac Startup Manager will display an operating system if you place the .efi file in the right location. This location is the
System/Library/CoreServices
folder of the volume in a HFS+ partition. The file name must beboot.efi
. Furthermore, you can customize the icon displayed for the operating system by placing a.VolumeIcon.icns
file in the root folder of the volume in the HFS+ partition.The First Way.
refind-bin-0.11.2.zip
and this file was downloaded to your~/Downloads
folder.Mount the new HFS+ partition, by entering the following command.
The new HFS+ partition will have the volume name
Ubuntu
.Install rEFInd into the volume on the new HFS+ partition.
Configure the TextEdit application. Open TextEdit, then navigate to the "Preferences..." window. Uncheck all the "Options", as shown below. When finished, quit TextEdit.
Use the command below to navigate to the folder containing the
refind.conf
file.Make a backup copy of this file.
Add write permissions to the
CoreServices
folder and therefind.conf
file.Open the file in the TextEdit application.
In this volume, edit the
System/Library/CoreServices/refind.conf
file to silently boot grub (which will intern boot Ubuntu). This can be accomplished by adding the following lines to the end of therefind.conf
file. You should be able to just cut and paste these lines. When finished, save the changes, then quit TextEdit.Unmount the new volume named
Ubuntu
, by entering the following commands.Pros: Ubuntu is unaffected, so any Ubuntu updates will not require attention.
Cons: You need to use the third party boot manager rEFInd.
The Second Way.
Mount the original EFI partition and the new HFS+ partition, by entering the following commands.
The original EFI partition will have the name
EFI
and the new HFS+ partition will have the nameUbuntu
.In the new volume named
Ubuntu
, create the foldersEFI/ubuntu
andSystem/Library/CoreServices
, by entering the following commands.Copy the files
grub.cfg
andgrubx64.efi
to the new volume namedUbuntu
. The commands needed are given below.Unmount the original EFI partition and the new HFS+ partition, by entering the following commands.
Pros: You do not need to use the third party boot manager rEFInd.
Cons: If the
grubx64.efi
orgrub.cfg
is updated, you have to manually copy these files to new volume namedUbuntu
.Adding a Custom Icon
The steps below will add the following Ubuntu icon to the Startup Menu.
mac-icns.dmg
. I assume this file downloaded to your~/Downloads
folder.Mount the volume named
Ubuntu
by entering the following command.Use the Finder application to copy the
os_ubuntu.icns
icon file to the root folder of the volume namedUbuntu
. Alternatively, you can use the command shown below.Rename the
os_ubuntu.icns
icon file to.VolumeIcon.icns
. This can be accomplished by entering the following command.Note: Files starting with a period (
.
) do not normally appear in a Finder application window.Use the Finder application to eject the EFI System partition with the volume name
Ubuntu
. Alternatively, you can use the command shown below to unmount the volume.Use the Finder application to eject the volume named
mac-icns
.Adding a HFS+ Partition
Enter the command below in a Terminal application window. The will create a "Mac OS Extended" volume named "Ubuntu" in a new partition.
Get the volume UUID for the volume named "Ubuntu" by entering the command below.
The output should be similar to what is shown below.
Next, prevent this new volume name "Ubuntu" from automatically mounting, by entering the following commands. Substitute your UUID for the one shown below.
Use the Finder application to eject this new volume. Alternatively, you can enter the command shown below to unmount this volume.
If you need me to expand on any of the above steps, let me know.