So in the last post I discussed why the Mac Mini is the perfect machine for Linux and for Datacenters in general! One frustration some readers may be finding is that the networking chipset used by Ivy Bridge platform in Late 2012 Mac Mini’s doesn’t have native support in the Linux Kernel (as of now anyway). So its required to install a kernel module from the manufacturer/vendor (broadcom).
On their website they provide the “tg3” drivers for Linux kernels, however these are only good if you are running a Linux kernel < 3.5.x. If you take Ubuntu for example, 12.04 uses the 3.2.x stream, whereas 12.10 uses the 3.5.x stream and isn’t immediately compatible with the drivers on the broadcom page. This is due to the deprecation in 3.x and removal in 3.5.x of the
Read on for the fix, more and downloads.
The offending lines are
.get_sg = ethtool_op_get_sg,
.set_sg = ethtool_op_set_sg,
These last two relate to TCP Segment Offloading (TSO), something else that was deprecated/removed. So in short, removing the #include statement and commenting out the following 2 lines entirely, would work just fine. Better still, you can wrap the 2 lines in a simple conditional macro such as
#if (LINUX_VERSION_CODE < 0x30000) ... #endif
Lastly, search for the line
#ifdef NETIF_F_TSO and delete it. Now you should have a compilable tg3 driver than can be installed using DKMS on modern distributions or other methods. For a really good guide on how to install the driver using DKMS, see this post for a reference.
If you can’t be bothered to make any changes to the drivers, then accept the license from broadcom, then download one of the below files:
Download: Linux <= 3.2.x Kernels
Download: Linux >= 3.5.x Kernels
Installing Linux itself is usually very easy, on some distributions you’ll have to boot with
noacpi. Also, once installed, put the following into
setpci -s 0:1f.0 0xa4.b=0
This will make your Mac Mini automatically power on after a power outage, however, is only valid until the next reboot, thus why it should go in
One final note, many distributions (ubuntu/debian at least) have a Mac specific .iso image you can download. These are usually hidden away in a repo, but often have the suffix +mac.iso. These essential have some extra packages / alternative boot options and sometimes even have native efi installation/booting. So worth checking out. Maybe i’ll write a how to on efi booting at some point. Until then, enjoy!