5

I know this is a super common issue, but if I am here it means I have already searched and tried many roads: unsuccessfully. I am trying to install Ubuntu on a MacBookPro 13" 2019, running MacOS BigSur, in a partition (nor VM nor bootcamp).

How I prepared Ubuntu live USB

  1. I have downloaded the latest stable version for Ubuntu at this time: Ubuntu 20.04.2.0 LTS.

  2. I then plugged in a 4GB USB and formatted it with Disk Utility as MS-DOS (FAT).

  3. Finally installed Etcher and burnt the ISO image into my USB.

  4. Restarted my Mac holding option key and booted into my USB (EFI boot).

How I installed Ubuntu

  1. From the first menu I selected "Try Ubuntu"
  2. Once in the desktop nor touchpad nor keyboard worked, so I plugged in an external mouse and enabled the on-screen keyboard to complete the installation
  • Open the Activities overview and start typing Settings.

  • Click on Settings.

  • Click Accessibility in the sidebar to open the panel.

  • Switch on Screen Keyboard in the Typing section.

  1. I clicked on the Ubuntu installer icon on desktop

  2. Selected language

  3. Selected Normal Installation and checked "Install third party software"

  4. When asked for the partition where to install Ubuntu to, selected other option/else

  5. I then created 2 partitions from Free Space

    • one of 512MB, "EFI" (from dropdown menu)
    • one of 30GB, ext4 (from dropdown menu), mounted to / (from other drop down menu)
  6. I then made sure the disk where to install boot loader was set to the disk rather than the specific EFI partition I made (i.e. /dev/nvme0n1 and not /dev/nvme0n1p3)

  7. Clicked Install now

  8. The installation fails at the grub2 step

Notes

  • I already tried to uncheck " Install third party software"
  • I already tried to select "Minimal Installation" rather than Normal
  • WiFi won' t work either, so I later tried Ethernet cable and network connection now works
  • I completely erased my disk and reinstalled MacOS (I have of course a backup of my files)

Video of installation process

Watch the video.

Screenshot of last error messages

Error messages New warning message

10
  • 1
    Do not know Mac, but it looks like an issue writing entry into UEFI. Does Mac have UEFI Secure Boot? Or some setting that prevents or allows changes to UEFI.
    – oldfred
    Feb 27, 2021 at 14:33
  • The only thing I could think about is the SystemIntegrityProtection (SIP) but I thought it would affect the MacOS partition only: may it be it affects the whole disk instead?
    – FET
    Feb 27, 2021 at 14:35
  • Found this, but since Mac do not know details. support.apple.com/en-us/HT208198 Ubuntu uses the Windows keys or may now have its own also. And a way for a user to add his own keys. wiki.ubuntu.com/SecurityTeam/SecureBoot & wiki.ubuntu.com/UEFI/SecureBoot
    – oldfred
    Feb 27, 2021 at 14:40
  • @oldfred that is correct, you need to allow external boot, however I already set this else I wouldn’t have been able to boot into that Ubuntu Flash USB :)
    – FET
    Feb 27, 2021 at 14:50
  • I’m confident it may have been the SIP the cause of everything, as it always is
    – FET
    Feb 27, 2021 at 14:51

3 Answers 3

7

I was having exactly the same problem whilst installing Ubuntu 20.04.2.0 LTS on a 2020 MacBook Pro with a 2 GHz Quad-Core Intel Core i5 processor using macOS Big Sur Version 11.1. After spending two days trying to get it to work I finally found a solution. Be warned it is a long process.

From my research I found that the issue is due to the Mac bootloader expecting the EFI partition to be formatted as HFS+ where the Ubuntu installer formats it as VFAT (as stated by Rohith Madhavan here).

To get around this issue I found three possible solutions:

  1. Use Rohith Madhavan's method.
  2. Swap your bootloader from GRUB to rEFInd.
  3. Install Ubuntu on an external SSD using Floris van Breugel's method.

Option one was posted seven years ago and required adding an unsigned repository to my Ubuntu installation (which I wasn't willing to do for security reasons). I didn't understand the full implications of swapping from GRUB to rEFInd so I wasn't comfortable using option two and finally, I didn't want slow memory access by using an external SSD so I didn't want to go with option three.

My final solution was to use parts of options one and three to make my own GRUB config file formatted in HFS+ so that I could boot Ubuntu from a partition on my internal SSD.

Backup

Whilst the process shouldn't cause you any issues, if a mistake occurs it could wipe your drive. As a result, it is always safest to back everything up before progressing.

Installing Ubuntu

  1. Open up Disk Utility on your Mac.
  2. Select your Apple SSD drive (make sure to select the parent drive not the container).
  3. Select "Partition".
  4. Hit the plus button and create a new partition called Ubuntu Boot Loader with format Mac OS Extended (Journaled) and size 128MB. This will serve as the location for your Ubuntu bootloader later on.
  5. Hit the plus button again and create another new partition called Ubuntu with format MS-DOS (FAT) and allocate it the memory size you want your Ubuntu installation to have (I would recommend no smaller than 50GB).
  6. Download Ubuntu from here.
  7. Plug in a USB and go to Disk Utility. From here locate the USB, hit Erase, select the format MS-DOS (FAT) and choose the scheme GUID Partition Map then hit Erase.
  8. Use Etcher to flash this ISO file onto a USB. Be warned this will wipe the entire USB (see this for more details).
  9. Restart your computer hitting Cmd+R on reboot. This will put you into recovery mode.
  10. Sign into your account, go into the menu location Utilities, select the first thing in the drop down menu and change the settings to No Security and Allow booting from external drive.
  11. Turn off your computer.
  12. Plug in your bootable USB drive and turn on your computer whilst holding down the Option key.
  13. Select the EFI boot drive (should be yellow). It might show you a warning saying Update Required. Hit the Update option. This will restart your computer. Make sure you are holding Option when it turns back on. Then click on EFI boot again.
  14. Follow steps one to five from here.
  15. On the Installation Type page select Something Else.
  16. Locate the MS-DOS (FAT) partition you made and hit minus.
  17. Select Free Space and hit plus.
  18. Create your Linux memory space by choosing how many GBs you want, choose Ext4 Journaling File System, check Format the partition and have the mounting point as /.
  19. Select Free Space and hit plus.
  20. Create your Linux swap space, use the remaining memory and choose swap as the format.
  21. Under Device for boot loader installation select the partition where your ext4 formatted memory is.
  22. Hit Install Now.
  23. Continue the installation process. You will again see the grub-install /dev/nvme**** failed warning but don't worry. Just hit restart. You will be asked to remove the USB and then hit Enter.

You will now have Ubuntu installed on your computer, but your GRUB bootloader won't be able to open it without some help.

Getting into Ubuntu

  1. Restart your computer and hit the Option key when booting.
  2. Select the EFI boot drive (this is your Ubuntu installation).
  3. You should be displayed with a GRUB terminal.
  4. Follow these steps that Rohith Madhavan outlines:

At the grub console, type ls

grub> ls

(memdisk) (hd0) (hd0,msdos) (hd1) (hd2) (hd2,gpt3) (hd2,gpt2) (hd2,gpt1)

You may not get exactly the same results as this, but you’ll have some similar options.

Now, find the partition which contains your user's home directory.

grub> ls (hd2,gpt2)/home

rohith/

Keep trying until you find it.

The result from the last step has two parts: (hdX,gptY). You need to keep the hdX part, but go through all the gptY options looking for a /boot/grub directory.

grub> ls (hd2,gpt2)/boot/grub

unicode.pf2 [...] grub.cfg

Now you want to set this as your root for further commands.

grub> set root=(hd2,gpt2)

The only way to boot properly was to use the UUID of the drive. To get it -

grub> ls -l (hd2,gpt2)

Note down the UUID. You'll have to type it manually in the next step.

grub> linux /boot/vmlinuz .efi.signed root=UUID=〈the UUID from above〉

The GRUB console can do tab completion, so if you just type out the vmlinuz part and hit tab, then hit . and tab again, you won't have to type the whole file name. make sure that the efi.signed part is present.

Now, set the initial RAM disk

grub> initrd /boot/initrd〈...tab here!...〉

You should be able to boot with the command

grub> boot

You will now be in your Ubuntu installation as if everything was installed correctly. But every time you restart you have to repeat this process. To work around this you can do the following.

If you are experiencing issues:

Confirm that the UUID you received from before is located in your distribution's grub.cfg under /boot/efi/EFI/ (ex. /boot/efi/EFI/ubuntu/grub.cfg) in the line search.fs_uuid SYSTEM-PARTITION-UUID-HERE root. If not, copy-paste the line with the current value and prepend with a comment line (#), and on your new line, replace the SYSTEM-PARTITION-UUID-HERE with your UUID of your ubuntu partition.

Permanently Fixing the GRUB Issue

Here you want do reformat the VFAT boot loader that the Ubuntu installation made by default to HFS+. This can be done by making your own boot loader config using GRUB. The method I used was the same as what Floris van Breugel did (but on my internal SSD instead of an external SSD).

  1. Following the instructions starting from the heading Making Ubuntu bootable part 1 from this all the way to the end of Turn SIP back on (for security). The only changes are the disk your should reference is your internal Ubuntu Boot Loader partition (you do not need an external drive with this partition.
  2. Restart your computer holding down the Option key during boot-up. You will now have two EFI boot drives. Go into the far left one. It should say you need to install an update for this to work. Click Update.
  3. During reboot hold down the Option key again and then select the middle EFI boot drive. This will take you to the GRUB screen again. Wait a minute or two and it should then take you to the Ubuntu loading screen.

YOU ARE ALL DONE. You should now be able to boot Ubuntu and MacOS now.

Hope this works for you.

3
  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Jeff Schaller
    Mar 4, 2021 at 2:16
  • Even after doing this, I get a blank screen when selecting the drive. Any idea? Jan 18, 2022 at 23:35
  • if you've come here from the makeuseof 2022 article and cannot get grub to find ubuntu consistently... You'll want to ensure the UUID used in this answer to get you into ubuntu is in /boot/efi/EFI/ubuntu/grub.cfg where search.fs_uuid has the same UUID as your partition. This will consistently load Linux by default :)
    – Cole Busby
    Aug 9, 2022 at 17:30
2

TLDR...

This may or may not be an "answer" - I'll leave that for you to decide. And you should know that I have not tried to install Ubuntu on a T2-equipped Mac, but I do believe it can be done. I'm not going to try to work through all of the details with you. What I will try to do is get you pointed in the right direction & try to clarify any points of confusion. And I'll ask one thing in return: If this "answer" helps you successfully install Ubuntu on your 2019 MBP, I want you to submit a pull request against my GitHub page with your install procedure.

The basis for my install procedure was this answer on Ubuntu SE. Note that it references the rEFInd SourceForge site where you'll find downloads, instructions for installation and a support forum.

My Mac was different, and the install procedure I documented on GitHub reflects some of the differences between the 2018 Mac Mini and my 2011 MBP. There will be other differences between your 2019 MBP, my 2011 MBP and the 2018 Mac Mini. Hopefully you will find enough common ground between all of these sources to achieve your objective.

The T2 chip in late-model Macs can be coaxed into supporting a Linux installation on late-model Intel-based Macs 1, 2. The only fly in the ointment for late-model Macs that I am aware of is that there is presently no Linux driver for the proprietary PCIe SSD chips Apple uses. Details here.

What does that mean? It means that Linux must be installed on an external drive. This can be done with a USBC-to-SATA adapter. This adapter is advertised as 10 Gbps; I've found it to be slower than the PCIe SSD, but not objectionable.

USBC-to-SATA adapter

For me, the installation procedure was arduous. Apple's documentation is perpetually out-of-date due to annual OS upgrades, Ubuntu's docs were misleading, and I didn't want to brick my MBP. As "insurance" I bought a new SSD to install on in case something went wrong. I believe there are restoration procedures if you decide to abandon this quest, but you'll need to find that guidance somewhere else. You definitely should make a good and complete backup - and know how to do a restoration - before you begin.

If all of this sounds discouraging, perhaps you should reconsider. In my case, I felt the risk was worth taking. My assessment - based on Apple's recent history and current trends with the Mac - is that Apple will render my hardware as unfit for purpose in the not-distant future, and so there is little to lose. They seem quite intent on a drastic overhaul, but we've no idea where that will leave us as users.

Hope that's useful.

11
  • Hello, thanks for sharing. However found out on a website it’s not possible - to date - to install Ubuntu on a MBP’ SSD if it’s a 2018 or later model... thus I do have a private qnap server I use to backup my MBP and I just finished restoring it 🥲 Might try again in a not so distant future but for now I’ll stick to a VM :(
    – FET
    Feb 28, 2021 at 7:13
  • 1
    @FET: Can you link to the source that said it's not possible?
    – Seamus
    Feb 28, 2021 at 7:17
  • @FET: Apparently the problem isn't the T2 chip, but the fact that there is currently no driver in Linux that can talk to the PCIe SSD devices. Oddly, Apple has provided a driver for Windows, but not Linux. And so it seems the full story is that you can install & run Linux, but until a PCIe driver is available for Linux you'll have to run from an external drive. Which might not be too awful with this adapter.
    – Seamus
    Feb 28, 2021 at 7:53
  • So you also think your other solution wouldn’t work? @Seamus
    – FET
    Feb 28, 2021 at 8:00
1

It appears your install media didn’t boot in efi mode you can run this command to verify it is booted in efi mode.

[ -d /sys/firmware/efi ] && echo "UEFI mode" || echo "Legacy mode

If your in legacy mode try creating you usb media with a different tool there are several tutorials of creating uefi enable installation media and then before installing verify the boot mode again.

You can use the following commands to check also there a little easier to read then the one above.

test -d /sys/firmware/efi && echo efi || echo legacy

or longer but easier to understand

if test -d /sys/firmware/efi;then echo efi;else echo legacy;fi

1
  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Jeff Schaller
    Feb 27, 2021 at 22:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .