Slackware on the Mac mini

A thunderstorm destroyed my first Slackware Mac mini, acquired in April 2008. The following text has been updated to describe its replacement. The installation procedure is much easier now due to improvements in Linux drivers and Slackware init scripts.

This text describes how I installed Slackware Linux on a Mac mini. Most of the information needed to do this comes from the documentation of the software components involved, and from various hints and tricks on web pages found by googling. A few things I had to figure out for myself.

The software includes drivers that are specific to the current (as of August 2008), third-generation Mac mini hardware. Do not use this procedure for other Mac mini models without making changes appropriate for differences in hardware. This procedure is so far only known to work on Mac minis equipped with the following hardware:

The Mac mini I worked with was a 1.83 GHz, 1G RAM, 80G disk, combo-drive model. It's purpose in life is being a TV computer (often called a "HTPC" by people who love fancy labels). More details on how to turn a Linux-powered Mac mini into a TV computer are found on my web page The Mac mini as a digital video recorder.

Note: the instructions that follow apply to MacOS X 10.5 (aka Leopard) and Slackware 12.1 in its 64-bit incarnation known as Slamd64 12.1. Some of the steps may be different if you use other Slackware versions.

And a final disclaimer: This is not a tutorial on Linux or Slackware. It is assumed that you have installed and used Slackware before. If you are more familiar with some other Linux distribution such as Debian, Gentoo, or Red Hat, the information below will probably still be useful, but you will have to "translate" things that are slackware-specific (like for instance how the init/rc scripts are organized).

Prepare the Mac mini for dual-boot

This preparation is of course not necessary if you decide to wipe MacOS from the hard-disk and run only Linux. Take a look at if you want to consider alternative booting options. However, I recommend keeping MacOS even if you only run Linux, since it makes it easy to upgrade firmware (e.g. firmware for the power management system).

Install Linux

Install drivers for wireless networking

Install a new kernel

This is an optional step, and it can be done later if you prefer. I like to compile the latest stable kernel on a new machine, just to make sure that I have fresh drivers in case I need to troubleshoot anything. This is how I do it:

Detach the console

This is an optional step. If you intend to use the machine as a "headless" server, or as a keyboard- and mouseless TV computer, then this is the point where you can safely detach the keyboard, mouse, and monitor, and just trust the network from here on.

Configure X11

This is an optional step. Nothing special is needed in order to connect with a VGA or DVI monitor, but specifying Driver "intel" in Section "Device" in /etc/X11/xorg.conf will enable a driver that knows about this particular hardware.

There are some "quirks" involved when configuring X11 for TV output via Apple's DVI-to-video adapter. This is not unexpected since all types of TV output for some reason seems to be associated with idiosyncracies, regardless of the actual hardware.

TV output on the Mac mini is covered in detail on my web page TV Output on a Linux Mac mini.

Configure sound

Sound works out-of-the-box with the latest Linux kernels. But it's always a good idea to initialize the ALSA settings properly. Do the following commands:

alsactl store

You use alsamixer to unmute the Master and Front controls, as well as any other ones that you want. Unmute by pressing the "M" key on your keyboard. Press it again and it becomes muted. You probably want it unmuted. Press the "Escape" key to terminate, and do alsactl store to store your settings.

For some reason, the full volume range does not seem to be available to ALSA unless you first boot into MacOS and turn up the volume all the way in the Sound settings in System Preferences. Make sure you do this for the Headphones output if that's what you are going to use when running Linux.

Also make sure that your non-root local users are members of the group audio so they get write permission to /dev/dsp and the other audio devices. Membership in the groups video and cdrom is also recommended.

Final adjustments


Energy profile

One good reason for using a Mac mini is that it uses very little electricity. I made a couple of simple measurements, while running Slackware.

Energy profile for my Iomega MiniMax external drive, containing a Seagate ST3750840AS 750 GB disk: