Make existing external ubuntu drive bootable on mac os

bootmacbook proUbuntu

I have one Windows PC and Macbook.
I have installed Ubuntu on an external drive by using my Windows PC.
I can start Ubuntu on my PC when I plug the external SSD into my PC.
However, when I plug it into my Macbook 2019 and holding CMD R, I don't see that drive in the start up disks.

I have disabled secure boot & able to boot another SSD with Windows.
I want to do the same thing to my Ubuntu SSD.

I think the Ubuntu SSD does not have efi boot partition in it, therefore, my Macbook cannot see it as a bootable drive.

My question is:

  • How can I make my Ubuntu SSD bootable in Macbook 2019 (Ubuntu already installed in the external drive)

Best Answer

I have asked with T2-Ubuntu author about using Ubuntu for both Macbook Pro 2019 and my PC, and I got the below solution. I would like to post it here for people who:

  • Want to install Ubuntu on SSD

It is very convenient when we want to do our work on our personal Macbook and be able to continue working on a different PC when we travel or away from our personal Macbook.

This is the components I'm using:

  • SSD Hard drive: SSD Samsung 980 PCIe NVMe V-NAND M.2 2280 500GB
  • SSD box: ORICO USB4.0 M.2 NVMe SSD 10Gbps
  • Macbook Pro 2019 (16GB RAM)
  • T2 Ubuntu

The below steps are what I have taken:

  • Use Macbook to erase the SSD, if it has multiple partitions, remove ALL partitions.

  • Boot into Live Ubuntu OS using a Flash drive.

  • Clicks on Install Ubuntu to start installing Ubuntu.

  • Choose Minimal installation when Preparing to install Ubuntu screen shows up.

  • In Installation type:

    • Choose Something else to manually create disk partitions
    • Create the following partitions:
      • 16GB for Swap partition (My Macbook has 16GB RAM).
      • 1GB FAT32 for EFI (name it as EFI2)
      • ext4 for the rest of Hard disk to store data.
    • Choose ext4 drive for Device for bootloader installation
  • Wait for the installation complete & restart.

  • Unplug USB.

  • Boot into Ubuntu in SSD.

  • Open Disk tool and I got this: enter image description here

  • Use the cat /etc/fstab and I got this:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during installation
UUID=31b7379a-71b4-40b6-92ba-25ee018bd698 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=5F66-17ED  /boot/efi       vfat    umask=0077      0       1
# swap was on /dev/sda1 during installation
UUID=0e99845e-16de-4119-ab18-7bc2df5c52cc none            swap    sw              0       0
  • Use sudo ls /boot/efi/EFI command, I got this:
APPLE  BOOT  ubuntu
  • With the help of T2 Ubuntu author, I used the following command:
sudo mount /dev/sda3 /mnt
sudo cp -r /boot/efi/EFI /mnt
sudo rm -r /mnt/EFI/APPLE
sudo rm -r /boot/efi/EFI/BOOT
sudo rm -r /boot/efi/EFI/ubuntu
sudo sed -i "s/5F66-17ED/19D7-F9BE/g" /etc/fstab

Which sudo sed -i "s/5F66-17ED/19D7-F9BE/g" /etc/fstab does:

We basically changed the EFI partition for Ubuntu from internal drive to external. 5F66-17ED is the UUID of old EFI partition and 19D7-D9BE I'd UUID of new partition. I got the old UUID from fstab and and new UUID from a screenshot you sent me in a previous chat. The command replaces the old UUID with new one in the fstab file. Also, the T2 Ubuntu ISO and a nvme blacklisted option which is basically to make installation on external drives easier. It hides the internal drive from the installer and thus the EFI partition gets created in the external drive only. Basically you didn't follow the correct guide before, this encountered the issue.

Finally, it worked :)

  • Macbook Pro 2019: enter image description here

  • PC: enter image description here

Full discussion can be found here: https://github.com/t2linux/T2-Ubuntu/issues/86

P/S: I'm not an expert, the above steps were the ones I tried and was successful.

Hope this helps :)

Related Question