The Boot Camp Assistant will install Windows 10 to UEFI boot on a 2015 MacBook. This means the hybrid method of partitioning used with older Intel Macs is not employed. Therefore, you can boot to Windows and use the Disk Management (an extension of the Microsoft Management Console) to shrink the Windows partition and create free space for a Ubuntu install.
Note: The file I downloaded was named ubuntu-22.04.2-desktop-amd64.iso
.
Below are the steps to install Ubuntu. These steps were adapted from the answer posted by guru431.
Note: The last three steps are optional.
The Ubuntu installer always chooses the first EFI partition on the drive regardless of what you choose. This is why step 4 changes the first efi partition to a ordinary FAT32 volume. The installer will then put the Ubuntu boot files in the new EFI partition created in step 6. The first partition is changed back to EFI in step 9, thus undoing step 4. A second EFI partition is added to avoid overwriting a Windows boot file stored in the first EFI partition.
Go into Windows and use Disk Management to shrink its partition. The free space will be used by Ubuntu.
Boot from Ubuntu install flash drive. From the GRUB menu, select Try or Install Ubuntu
. If you wait 30 seconds, this will happen automatically.
When the "Install" popup appears, select Try Ubuntu
.
Open the Terminal application and enter the following command to change the first partition type from EFI to FAT32.
sudo sgdisk -t 1:0700 /dev/nvme0n1
When finished, quit the Terminal application.
Open the Install Ubuntu 22.04.2 LTS application and proceed with installing Ubuntu. During the installation, select the following when each appears.
- Install third-party software for graphics and Wi-Fi hardware and additional media formats
- Something else
Select the largest amount of free space and create a new partition. Next, click on the +
button, then select the following.
- Size:
315
MB
- Type for the new partition:
Primary
- Location for the new partition:
Beginning of this space
- Use as:
EFI System Partition
Again, select the largest amount of free space and create a new partition. Next, click on the +
button, then select the following.
- Size: Do not change this value.
- Type for the new partition:
Primary
- Location for the new partition:
Beginning of this space
- Use as:
Ext4 journaling file system
- Mount point:
/
Install Ubuntu.
After rebooting, open the Terminal application and enter the following command. This command changes the first partition type from FAT32 to EFI and removes any hybrid partitioning. (Actually, there should be not be any hybrid partitioning to remove. Therefore, most likely the -h EE
option does not change anything.)
sudo sgdisk -t 1:ef00 -h EE /dev/nvme0n1
Boot into macOS.
Goto the URL given below, then download and mount mac-icns.
https://sourceforge.net/projects/mac-icns/
Open the Terminal application and enter the following commands to assign an icon and label to Ubuntu:
sudo diskutil mount disk0s4
cp /Volumes/mac-icns/OSX10.11.6/os_ubuntu.icns /Volumes/EFI2/.VolumeIcon.icns
bless --folder /Volumes/EFI2/EFI/BOOT --label "Ubuntu"
diskutil unmount disk0s4
Note: During the installation of Ubuntu, the UUID of the FAT32 volume stored in the second EFI partition is recorded in the /etc/fstab
file. This should cause Ubuntu to keep using the second EFI partition even through upgrades and any changes to the Grub configuration.