Thursday, 28 November 2019

Triple booting your MAC ... OSx Catalina + Ubuntu 19.10 (Eoan Ermine) + Windows 10 (Nov 2019 release)


While trying to have a triple-boot on my Mac, I faced several difficulties. Several pages on the net helped me to complete my task. I never noted the page addresses, but only made notes of my own. The following is a result of that. Since I did not note all the page addresses, I am unable to acknowledge all of them. But - yes, not a single of them worked on it's own (at least not for me). I had to do this several times to get it right. Hence putting a set of instructions below for some friends and family that are looking for similar solutions. I do not claim to be an expert and not do I guarantee any measure of success by doing this. Please follow the instructions at your own risk.


What you need:
              i.        Mac OS Catalina installer on Pen Drive
             ii.        Windows 10 ISO (This needs to be the latest release else bootcamp may not work)
It is easiest to download the Windows 10 ISO from MAC. Microsoft makes it available in the first 2 or 3 links if you search “Download Latest Windows ISO” on any search engine.
            iii.        Ubuntu 19.10 installer on Pen Drive (This needs to be the 64-bit desktop version)
Download the ISO from: https://ubuntu.com/download/desktop (scroll down and select correct version).
You could also use Rufus if you are more comfortable doing it from a windows installation
           iv.        rEFInd (to be downloaded later on Mac OS – step IV-A)

Preparing the SSD:
1.    Boot up with the Ubuntu installer and choose the “try ubuntu” option
2.    Use gparted to delete all the partitions on the MAC SSD (including the EFI Partition)
3.    Use gdisk to convert the SSD to GPT format
(If you find gdisk daunting – you can also use diskpart from a windows bootable USB)

Installing the various OS:

      I.        MacOS Catalina
1.    Install MacOS Catalina by booting to the installer USB and following the instructions.
2.    Disable System Integrity protection in the MAC
·         Reboot with and R keys pressed.
·         Open Terminal from Utilities menu
·         Type csrutil disable and press enter
CHECK: Now you should have a working Mac OS Catalina on your MAC

SAFETY STEP: You may want to boot into MacOS and take a snapshot using Time Machine

    II.        Windows via Bootcamp
1.      Copy the Windows Installer ISO to some folder in the MAC (say desktop)
2.      Run Bootcamp and load windows. Follow the Instructions
3.   STOP when the system asks to install bootcamp. You will need to prepare the SSD to install Ubuntu before you proceed.
4.   Open Windows Disk Management and partition the BOOTCAMP as per your need. Bare minimum: One additional partition of around 30GB formatted as FAT.
5.      Run bootcamp now. Remember – if you partition anything other than the MacOS partition later, you could lose all your data
ALTERNATIVE METHOD:  You could also install Windows via a Windows USB Installer and partitioned the drive as above. The trick in this method is to never allow windows to reboot while it is installing. Press the <ALT> or <OPTION> key and select windows manually each time the system is booting (At the time of installing Windows). Then you could manually install bootcamp drivers. 
        It is a good idea to copy the bootcamp drivers from OSXreserved partition during the first attempt to load windows via bootcamp. Copying the folders "$WinPEDriver$" and "Bootcamp" to the root of the windows installation USB enables loading the basic drivers. Bootcamp can be run/manually loaded from the "Bootcamp" folder post installation.

CHECK: Now you should have two operating systems now You should be able to reboot with the <ALT> or <OPTION> key pressed and choose between Windows and MacOS.

   III.        Installing UBUNTU
1.    Insert the Ubuntu Installer USB and reboot with the <ALT> or <OPTION> key pressed. Choose the option “EFI Boot” to boot from the Ubuntu USB
2.    Choose the option “Try Ubuntu” when asked.
3.    Run “Install Ubuntu” and choose “Something Else” option when asked. DO NOT change the partitions while installing.
4.    When asked where to install Ubuntu, Right-click the FAT32 formatted disk which was created for Ubuntu with the following options.
Partition Format: ext4
Assigned to: “/
Target for bootloader: /dev/sda1 (Could also be /dev/nvme0n1 … check the name of the disk displayed at the top right)
5.    Proceed to install and reboot.

CHECK: While rebooting with the <ALT> or <OPTION> key pressed you should get to choose between Windows and MacOS. However, when choosing the Windows option, you should get Ubuntu menu (grub menu). You may or may not be able to both boot to Ubuntu and Windows from here.

  IV.        Correcting the Boot Menu
MacOS and Ubuntu refuse to acknowledge each other’s existence. Hence as far as MacOS knows, there is only MacOS and Windows (as shown from the boot menu displayed by <ALT> or <OPTION> key. Once you choose Windows, Ubuntu takes over and displays its grub2 menu.
Had this been a dual boot system (Windows + Ubuntu), you would only need to correct the menu options to ensure that there is an entry for Windows and another for Ubuntu. This can be customized using Grub-Customizer in ubuntu. However, this would mean two hops to boot to ubuntu or Windows. So let us avoid grub2 altogether. In the next steps we will install rEFInd and delete grub2

A.    Installing rEFInd:
1.    Boot into Mac OS and download the rEFInd zip file from:
3.    Unzip the files to a folder, open terminal and navigate to that folder.
4.    On Terminal, type ./refind-install
5.    This should install rEFInd and you can check by rebooting.
CHECK: The refind menu should show-up now. If the ubuntu grub2 menu shows up, press <esc> and type exit. This should show the rEFInd boot menu.If the above two options is not happening, reinstall rEFInd and cross check again
B.    Deleting grub2 from MacOS
1.   Grub2 is in the EFI partition which hidden in MacOS. Therefore, we first need to mount it and make it visible. Use the following commands on terminal (assuming your disk is disk0s1)
mkdir EFI_mount
sudo mount -t msdos /dev/disk0s1 EFI_mount

2.    Open Finder and navigate to the mounted EFI folder. Go to the Ubuntu folder and delete all the files there. By now, grub2 will have been completely obliterated from the boot menu.
CHECK:  Reboot should show the rEFInd boot menu with all the options (windows, ubuntu and MacOS + many other unwanted items).

3.    As a last step, you need to delete the unwanted entries from rEFInd boot menu and customize it. 
     There is a whole tutorial at https://www.rodsbooks.com/refind/index.html. But let me just put some tips here to help you understand which sections to pay attention to …
a.    You can get access to the rEFInd files in the same manner as for deleting grub2 (by mounting the EFI folder)
b.    While rEFInd boot manager is displaying, select any option and press the minus key to delete that option.
c.     While rEFInd boot manager is displaying, select any option and press the <TAB> key to view advanced options.
d.    If you do not want to spend time learning how to customise rEFInd, the shortcut is to load a theme that is closest to how you want your rEFInd to look. Then change the icons, background and font to suit what you need.



                                                                                                                                        

Featured post

This "State-of-the-Mind" thing !! - part 1

The patient was gravely depressed. His attempt to commit suicide was just stopped by his family. He was crying and we could see that hi...