How to install Ubuntu 18.04 (and variants) on a 2007 Mac Mini

Introduction

I have an old Mac Mini lying around the house. It’s a 2007 model. I used it to try iPhone App development back in the day. It was the cheapest type of Mac at the time and it’s been a great machine. The size is just right for the use of a home entertainment machine with a built in DVD player. You can get a list of specs on Every Mac: https://everymac.com/systems/apple/mac_mini/specs/mac-mini-core-2-duo-2.0-specs.html

Since the Mac Mini is quite old and Apple dropped support for it in 2016, I can’t really get new versions of software. So decided to change the OS to Ubuntu 18.04. Due to the age of the hardware, I decided to go with a variant called Bodhi Linux which is designed to work with older computers.

Internet Research

Apple computers always have a funny way of booting. On a regular pc, you would just make a bootable usb, plug it in, and just install Ubuntu 18.04. Of course, this wouldn’t work (I already tried).

So off I went to the internet for some research. A lot of the websites I found required that I make the bootable USB from the Mac Mini or on a Windows machine. I didn’t really want to install things on my Mac Mini in case in the future, I want to install another operating system. I only use Ubuntu.

Ubuntu has a a startup disk creator. When I used it, the bootable USB keys couldn’t be booted up or read on Mac OSX.

I found this post on where user Spades gave a pretty good outline on what to do. I’ve quoted his answer below:

Okay, here’s an answer from 2018, that actually works (I did it on a 2,1 Mac Mini Late 2007). This took me three days of pain and agony and searching to find out how to do it. Hope this helps the three other people doing this within the next ten years.

OUTCOME
Ubuntu 18.04.3 (64-bit) installed on a Mac Mini 2007 (2,1) (2.0 GHz model).

PROCEDURE
Here are the steps I took. Well, the ones that made forward progress, anyway.

1) Get rEFInd working on your Mac Mini (This might not be strictly necessary, but I used it and it worked and I’m not reinstalling OS X and trying again without it).
2) Use Rufus to burn the Ubuntu 18.04.3 64-bit ISO (download link) onto a drive, making sure to use the GPT format, not the MBR format, and have the drive formatted to FAT32, not NTFS. I’d assume you could use UUI or Etcher, but I didn’t test them.
3) Download this file and put it in the /EFI/BOOT/ directory on your newly burned flash drive. (This step came after reading this very helpful article on the Ubuntu forums. I modified what it said to do and it worked perfectly, but do go ahead and check it for yourself if what I’m suggesting doesn’t work.) The reason we need this file is that the Mac Mini 2,1 is a 64 bit system that won’t do 64 bit EFI boots. So, we need this file to let the Mac Mini do a 32 bit EFI boot of the 64 bit Ubuntu ISO.
4) Go and plug the flash drive into your Mac Mini, and restart it. When the rEFInd screen comes up, select the fallback bootloader (boot manager? I don’t remember) on the flash drive you plugged in. It should have a nice orange icon. Then, when the GRUB screen comes up, select “Install Ubuntu”.
5) Profit or whatever.

I didn’t come across any of the issues involving GRUB being broken or not installed or anything, so it was just a clean install and use for me.
You can also install mbpfan, which will sort of make your fans work on the Mac Mini (I still need to figure out how to get it to run at startup).

Unfortunately, it was not a pure Ubuntu Solution as Rufus is windows software. However, from his steps, I could see that the there were a few things that was important.

  1. We need to do a 32 bit EFI boot as the Mac Mini can not do 64 bit EFI boots. (step 3)
  2. We need to make sure the partitions of the flash drive are set up with GPT format instead of MBR format (step 2)
  3. Use rEFInd (step 1) (I tried without and it didn’t work)

So below, are the steps that I took to install Bodhi Linux 5.0 onto the Mac Mini

Step 1: Prepare the USB key

We have to make sure the USB key is using GPT format. To do this, we will use the program GParted. You can install GParted by doing the following command in terminal:

sudo apt-get install gparted

Once done, open up GParted and select your USB (usually it’s /dev/sdx) where x is some letter. You can tell which is your usb key by the size.

Delete the partition on the USB drive. Then create a new partition by going to Device -> Create Partition Table. Make sure you select gpt as the type and not the default msdos.

Afterwards, make a new Fat32 partition that takes up the whole disk.

Step 2: Prepare the Ubuntu Image

We need to add a file named bootia32.efi in /EFI/boot to redirect EFI to boot in 32-bit mode. I’ve made a mirror of the file here (unzip the zip file). You can download the original on github.

Once you have the file, open up the ISO image and navigate to /EFI/boot. Then just add the file, bootia32.efi to the directory.

If you make the startup disk without putting the file into the /EFI/boot, you can’t just copy the file onto the USB as that directory is read only on the USB.

Step 3: Create the Ubuntu Startup Disk

Open up Startup Disk Creator, select the Ubuntu ISO image you modified, the usb drive you want it on, and click start. It’ll take a few minutes and your Ubuntu Startup Disk will be ready.

Step 4: Create A rEFInd Boot Disk

rEFInd is a boot manager. Since the boot manager on the Apple Mac Mini can not see our bootable usb, we need to use rEFInd to boot it up instead. We will use the USB Flash Drive Image file found here. I’ve put a mirror of the version I used here (this is version 0.12.0, the website might have a newer version).

You will need another USB Flash Drive to boot up rEFInd.

Plug it in, then follow the instructions in the rEFInd README file.

It’s basically one command using the dd command. You can find the name of your USB flash drive by going into gParted. It will be something like /dev/sda

STEP 5: Launch!

Plug in both USB flash drives into the Mac Mini. Hold down the alt key or super key if you’re using a Mac Keyboard. The boot up option screen should come up. Select rEFInd.

After rEFInd pops up, select your ubuntu image.

From there, the GRUB menu will display. You can try the live desktop first, or just jump straight to install.

In Closing

I hope this guide has helped those get Ubuntu working on an old Apple Computer. I haven’t tried it on any other computers, but it should work.

It’s important to have a pure Ubuntu method so you don’t need to install mac osx to make changes to the system.

Note: if you only have one flash drive available, you can check Spade’s comment below on a workaround.

2 Replies to “How to install Ubuntu 18.04 (and variants) on a 2007 Mac Mini”

  1. This was a pretty comprehensive tutorial, nice job! Only thing I would add is that if the user is limited on flash drives, or simply doesn’t want to burn rEFInd to a flash drive AND burn Ubuntu, there’s a way (https://www.rodsbooks.com/refind/installing.html#osx) to install rEFInd manually on MacOS. This was useful to me, as I didn’t have too many drives at my disposal, and I had to try things quite a few times, so it simply being the default boot option was useful.

    1. Hi Spades,

      That’s a great suggestion.
      I’ve made a note in the closing section for people to check your comment if they only have one flash drive available.

      Your answer on stack overflow really gave me a lot of insight to figure out how to install Ubuntu on my Mac Mini using only tools found in Ubuntu.

      Thanks for the insight and for visiting my blog.
      Jeffrey

Leave a Reply to Jeffrey Wong Cancel reply

Your email address will not be published. Required fields are marked *