Steps to create a triple boot Mac without extra software
Start with a MacBook Pro with only macOS installed
- Open Boot Camp Assistant
- Follow the instructions
- Set the size of the Windows partition
- Finish the whole installation of Windows
- Boot back into macOS
Note: this is for APFS only
- Start in macOS
- Open terminal
- Enter the following command to create the dummy partitions
use the following if you want a swap partition
sudo diskutil apfs resizeContainer disk0s2 400G exfat DUMMY1 200M exfat DUMMY2 200M DUMMY3 200M
use the following if you do not want a swap partition
sudo diskutil apfs resizeContainer disk0s2 400G exfat DUMMY1 200M exfat DUMMY2 200M
- Launch the Linux installer
- Open a terminal Note: Might need a live disk if the installer doesn't have a way of getting to a shell
- Enter the following commands to save the current EFI files to a different folder
sudo -i
mkdir efi
mount /dev/sda1 efi
mv efi/EFI efi/EFI.win
umount efi
rmdir efi
exit
-
Start the installation of Linux
-
When you get to the partition screen select manual
-
Delete the
DUMMY
partitions created in Step 3 -
Create a new partition with a size of
210MB
and make the partition typeEFI System Partition
-
Create the root partition at the size you prefer based on Step 3
-
Create a swap partition if wanted
Note: Use either the rest of the partition size or set a specific size
-
Finish the installation
-
When the system reboots it should go directly into Linux
-
Open a terminal and enter the following commands to move the Linux EFI files to the new EFI Partion
sudo -i
mkdir efi
mount /dev/sda3 efi
mv /boot/efi/EFI efi
mv /efi/EFI/{linux_distro} /efi/EFI/Boot
mv /efi/EFI/Boot/grubx64.efi /efi/EFI/Boot/bootx64.efi
mv /boot/efi/EFI.win /boot/efi/EFI
umount efi
rmdir efi
Note: if the folder under /efi/EFI
is named boot
already enter the following.
sudo -i
mkdir efi
mount /dev/sda3 efi
mv /boot/efi/EFI efi
mv /boot/efi/EFI.win /boot/efi/EFI
umount efi
rmdir efi
- Set a label for the new EFI partition with the following
fatlabel /dev/sda3 EFI2
- Get the UUID for
sda1
andsda3
with the following command
blkid /dev/sda1 /dev/sda3 | awk 'NR==1{print $1,$2} NR==2{print $1,$2}'
- Edit the
/etc/fstab
file and replace the UUID from/dev/sda1
with the UUID from/dev/sda3
- Make sure the drive is not using hybrid partitioning. This can be accomplished by entering the command given below.
gdisk /dev/sda
This command is interactive. The interactive commands you will need to enter when prompted by gdisk are given below.
x
n
w
y
- Exit out of the terminal and restart the Mac and boot into the Mac partition. This can be done by holding the
⌥/Option/Alt
key down and selecting macOS partition - Download a collection of icons from the sourceforge web site
Mac Icons and open the
mac-icns.dmg
file. - Open terminal and enter the following command to mount the EFI partition
/dev/disk0s3
containing the Linux boot files.
sudo diskutil mount disk0s3
- Enter the following command to copy your Linux Distro Icon to the Linux Boot Partition
cp /Volumes/mac-icns/OSX10.11.6/os_{linux_distro}.icns /Volumes/EFI2/.VolumeIcon.icns
- Enter the command to change the label that will be shown below the Linux Distro icon on the Startup Manager menu.
bless --folder /Volumes/EFI2/EFI/Boot --label "{linux_distro}"
Note: you can change the icon for the Windows partition by repeating Steps 22 and 23 for
disk0s1
and the folder would be/Volumes/EFI/
in Step 23