Skip to content

Instantly share code, notes, and snippets.

@doop
Last active November 3, 2025 15:53
Show Gist options
  • Select an option

  • Save doop/decbfb2930628fe326e70cb659f6bea9 to your computer and use it in GitHub Desktop.

Select an option

Save doop/decbfb2930628fe326e70cb659f6bea9 to your computer and use it in GitHub Desktop.
Installing linux on a 2011 Intel mac mini

Installing linux (Debian) on a 2011 Intel mac mini

Apple have long stopped supporting the mid-2011 mac mini I had sitting in the living room, so rather than contribute to the e-waste problem I decided to stick linux on it. The general consensus seems to be that you should keep macOS bootable to make it easier to deal with any firmware issues down the line, so I wanted to set it up to dual boot. The documentation I was able to find on how to do this seemed scattered or out of date.

There are a number of little wrinkles to this process:

  • macOS quite reasonably assumes it'll be the only thing running on the machine; you need to install a boot manager to let you choose between macOS, linux, or whatever else. I went with rEFInd.
  • Something seems a bit off with the default video setup, such that when I first booted into Debian the screen went blank immediately after enabling kernel modesetting.
  • The mac mini wifi uses a Broadcom chipset with non-free drivers which you have to download separately. I solved this by putting them on a separate USB stick. It might be possible to get around this by just using the wired network - I don't know if this needs the nonfree drivers as well, and I didn't try it because I'd have had to carry everything downstairs and find a switch port to plug into.

At this point I've not tried to get graphics or sound working, because I only wanted a headless server box.

This isn't really difficult but it is a bit of a faff and you could wind up bricking your machine if you're not careful. Please back everything up beforehand, and bear in mind that these notes are primarily so I can remember what to do if I ever need to do this again rather than some sort of general user guide; I am not responsible for anything you do as a result. It's very likely that there are easier ways of doing some of these steps that I was unaware of.

Here's what I had to do in the end.

Ingredients

You will need the following:

  • 2011 mac mini (this might work for other sorts but I've not tried)
  • Two USB drives which you're prepared to wipe, one with at least 4GB capacity, and another one which can be smaller (at least 15MB)
  • Ideally another machine nearby you can use to look things up on, or re-write USB images etc
  • A cup of tea or the makings thereof
  • A few hours

Preparing from the macOS side

  • Firstly, upgrade macOS to the latest version available. In this case that meant High Sierra.
  • Download the rEFInd boot manager binary zip file from here
  • Unzip it and run the refind-install script. If you run it as a non-root user and you've already run sudo recently then it will take advantage of this, otherwise it will run sudo itself and prompt for a password.
  • Download http://lwfinger.com/b43-firmware/broadcom-wl-5.100.138.tar.bz2 and put it on the smaller USB drive.
  • Open Disk Utility and repartition the disk.
    • I went for the following partitions, not including the special partitions for EFI/restore which Disk Utility won't show you and which you should leave well alone!
      • resized the macOS partition to 200GB
      • 1GB for /boot
      • 32GB for swap
      • 100GB for /
      • everything else in one big partition which I planned to split up in LVM later
    • Note that once you set a partition type to eg "MS-DOS", Disk Utility will not let you change its size (I assume because it doesn't know how to do the equivalent of resize2fs ?). You can just leave everything as APFS.
  • Maybe reboot, admire your new rEFInd boot screen, and double-check that everything still boots into macOS ok.

Setting up an installer

  • Download the installer ISO image from here . You want the amd64 image of DVD number 1; you don't need any of the subsequent DVD images, just the first.
  • Plug in the larger USB drive and figure out which device it corresponds to. I did this by typing diskutil list and looking for the one saying "external, physical".
  • write the image by doing something like dd if=debian-12.6.0-amd64-DVD-1.iso of=<device> bs=1m .

Install Debian

  • Reboot; choose the USB image which should take you to the Debian installer.
  • If it asks you to supply extra firmware just say "no"; we will sort this out later. Tell it not to set up any network.
  • Set the install going and have that cup of tea while it runs.
  • Once the install process has finished, reboot
  • In grub, hit e to go to the screen where you can set kernel parameters to avoid the blank screen.
    • There should be a line saying something like linux /vmlinuz-6.1.0-23-amd64 root=UUID=<blah> ro quiet .
    • Change the params from ro onwards to ro nomodeset text
    • Press F10 to continue booting

Get the wifi working

  • Log in as root. Make sure the installation USB is still plugged in; fdisk -l will tell you which device it's on, then you can do something like mount -tiso9660 /dev/sdb1 /mnt/usb
  • Go into the mounted USB and dpkg -ifirmware/firmware-brcm80211_20230210-5_all.deb
  • cd pool/contrib/b/b43-fwcutter and then dpkg -i the two non-legacy debs.
  • Mount the smaller USB, untar its contents somewhere, then b43-fwcutter -w /lib/firmware broadcom-wl-5.100.138/linux/wl_apsta.o
  • Reboot.
  • Log in as root and check that nmcli d shows a disconnected wifi device
  • Connect to your access point with nmcli device wifi connect <network name> password <password>
  • It should now work! Check by eg ping www.google.com

Tweak the Debian config

  • You probably don't want to have to edit the kernel parameters every time, so:
    • edit /etc/default/grub to set GRUB_CMDLINE_LINUX_DEFAULT="nomodeset text"
    • run /usr/sbin/update-grub
  • You may have noticed that after running the Debian installer the machine booted straight into grub rather than going through rEFInd. I fixed this at the time by booting to macOS and reinstalling rEFInd; you could also fix it from the Debian side, or just live with it.

You're done! (more or less)

At this point you should have a working networked Debian install and what you do is up to you; the next steps I'd personally take would be something like:

  • update /etc/apt/sources.list according to the instructions and run apt-get update && apt-get upgrade
  • Grant sudo access to the non-root user with something like usermod -aG sudo <username>
  • Set up LVM
  • Make it boot into text mode rather than bringing up a GUI, with systemctl set-default multi-user.target
  • Remove any unnecessary packages by browsing the list in aptitude . Beware that when I tried to remove all the X11-related stuff it decided to take out network-manager - always carefully check the list of packages it wants to uninstall!
  • Install mbpfan and powertop and make sure power management is enabled, because you don't want your little living room server to be constantly and unnecessarily spinning its fan
  • Go have a stiff drink or other celebratory ritual of your choice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment