Installing Ubuntu Server 12.10 on a Mac Mini (Late 2012)

0

This post is specific to installing Ubuntu 12.10 on a . There is another post, that is almost identical to this one that discusses the changes you have to make to install Ubuntu Server 12.04 on a Mac Mini (Late 2012)

If you got your hands on a recent Mac Mini (Late 2012), you may be tempted to install Ubuntu Server 12.10 on it. Most of the instructions on the internet is specific to installing Ubuntu Desktop. I have been scratching my head, trying to figure out how to get the Broadcom’s desktop NetXtreme Ethernet adapter built, installed and configured.

Here’s what I started with:

  • A with Ubuntu Desktop 12.04 or Ubuntu Desktop 12.10 installed
  • An application to create virtual machines, such as or VirtualBox
  • A DVD Writer and blank media
  • Mac Mini (Late 2012) with model identifiers of macmini6,1,macmini6,2 or macmini6,3
  • Internet access

Chances are that there are easier ways to do this and that I haven’t found it yet.

Creating custom installation media

Download Ubuntu Server 12.10

Create directories. When we are done, we’ll create a DVD using the contents of the custom-iso directory.

Mount the Ubuntu Server 12.10 installation media

Copy the contents from the installation media to our custom

Unmount the drive and delete the directory

Make the files and directories in custom iso writable.

Download and customize tg3 source code

Create the directories where we will store the source code of the drivers

Download the drivers from Broadcom. Assuming you downloaded the file to your home directory, unzip the file.

Extract the source

Copy it to the custom ISO folder

The source as is, doesn’t compile due to the Linux Kernel that Ubuntu 12.10 uses. Follow these instructions to modify the source code in ./custom-iso/src/tg3-3.124c/src so it will compile.

Using your favorite editor, create a file ./custom-iso/src/tg3-3.124c/dkms.conf with the following contents

At the end of the installation process, we’ll register, build and install the driver with DKMS, which will rebuild the driver whenever the kernel gets upgraded. There is a risk that an upgrade may render the driver unusable, so be aware of this you are going to use the Mac Mini for anything important. Before upgrading the kernel, you may want to test whether the driver will build and work in a virtual machine.

Obtaining additional packages

The first step would be to create a virtual machine with Ubuntu Server 12.10 installed and configured. It is unnecessary to customize it. For the purpose of this post, we’ll assume the virtual machine has an of 192.168.1.115 and that your username is johnd (as in John Doe). There is no need to install anything but OpenSSH.

Login to the virtual machine and clear out the apt cache.

Add any packages you’d like to have on the server

Going back to your own desktop computer, lets create directories necessary to store additional packages.

Copy the deb files from your virtual machines to the custom iso directory. Remember to replace the ip address and username with that of your own.

The packages necessary to build the tg3 driver, will be part of the installable media, making it possible for us to install them automatically.

Customize the Ubuntu Server installation media

Encrypt your

Using your favorite editor, create a file ./custom-iso/isolinux/ks-custom.cfg. Replace with the password you created earlier.

This is a kickstart file which automates most of the configuration. It will install the packages openssh-server, dkms, build-essential, linux-source, linux-headers-3.5.0-21, python-gi and python-apport from the cdrom. When the installation is done, it will copy the source from the installation media and use DKMS to add, build and install the driver.

In order to make it useful, we should add a menu. Using your favorite editor, edit the ./custom-iso/isolinux/txt.cfg and add the following entry:

Feel free to replace the Install Ubuntu Server entry if you feel adventurous.

Create custom installable media

First, lets create an ISO (ubuntu-12.10-server-custom-amd64.iso) from the custom iso directory.

You may want to create a new virtual machine and use this ISO to install Ubuntu Server 12.10. This may help you to diagnose most issues you may run into. Unfortunately, a virtual environment is very different than the real thing, so even if it installs fine in a VM, you may still encounter issues. For example, I had some issues doing automatic partitioning.

When you are ready for the real thing, write a DVD. It may work with a USB stick, but I have not verified it.

Installing from custom media

Go to your mac mini

  • if it is running, turn it off
  • press the ALT key on your keyboard, power on your mac mini, and release the key once you see a “boot menu” with a CD
  • Select the “Windows” CD. We’re installing Ubuntu, but Macs show “Windows” for any operating system it doesn’t understand.
  • Select “English”
  • Select “Automatically Install Ubuntu Server”
  • You’ll be warned that a network adapter could not be found, select to continue.
  • You’ll be asked to create partition; select use whole disk and configure LVM.
  • Wait for the installation to complete and the mac mini to reboot

Once you rebooted, you can login and configure . For example, if you want to use , add the following to /etc/network/interfaces

If you’d like to have a static IP address,

Be sure to replace the address, gateway, net mask and so forth. Finally, bring the interface up:

And you should be able to ping an external site (google.com). If not, start diagnosing the issues. One thing to note is that your sevrer will have the name “ubuntu”. You may want to change that. Save the DVD in a safe place, just in case you have to reinstall Ubuntu in the future…

References:

I had some help along the way to get me started:

I don’t endorse them, but credit is due where credit is due.

Share.

About Author

I'm a software developer originally from Cape Town, South Africa and now living in San Francisco, CA, USA.

Comments are closed.