Installing Debian on a Mac Mini
This page describes how to install Debian on an Intel-based Apple Mac Mini. For more information about Debian on the earlier PowerPC-based model, see MacMini.
Contents
Check and update firmware
Verify that your computer has the latest firmware: http://support.apple.com/kb/HT1237 . This is important - some older versions of firmware won't provide some of the underlying support that you'll likely need to install Debian.
Recent firmware adds a BIOS compatibility mode, including detection of BIOS-bootable disks and CDs in the built-in boot volume chooser. In addition, if you want good graphics support in Linux, you must boot it using the BIOS compatibility mode. This is because the X.org / XFree86 drivers for Intel and ATI, as well as the Linux text console, rely on the Video BIOS and Apple's firmware only provides a Video BIOS when booting in BIOS compatibility mode. Without it, you only get unaccelerated frame buffer graphics. Booting in the BIOS compatibility mode also means using either the LILO or GRUB bootloaders, and having an MBR partition table (either hybrid GPT/MBR or plain MBR).
In consideration of all of the above, updating the computer's firmware is the simplest way to easily install and boot Linux and also get 2D/3D graphics acceleration. To enter the builtin boot menu, hold the "Option" key while booting. This gives the option of installing rEFIt (or other EFI bootloaders?) on a USB key. You must use OS X's "bless" utility to change NVRAM entries allowing this to boot. It's also possible to boot wheezy installers from a USB key in this manner.
Installing Debian - the simple way
Recent versions of Debian (at least from 8/Jessie onwards) should install and work reasonably well on most Mac Minis without needing any other software to help with setup, assuming that you only want to be able to boot Debian. However, if you do want to dual- or triple-boot with other OSes (e.g. Mac OS X) then you'll be more at the mercy of the other operating systems. See below for more detailed instructions.
The best way to start the Debian installer varies a lot, depending on the age of your hardware.
Macmini 1,1
The oldest Mini (macmini1,1) is typically the most problematic, due to bugs in its firmware. When booting off CD/DVD, if there is more than one El Torito boot record on the disc then the firmware gets confused. It tried to offer a choice of the boot options, but it locks up instead. Unfortunately, all of the normal Debian installer options for both i386 and amd64 now include 2 El Torito boot records (one for BIOS boot, and one for EFI boot). Specifically as a workaround for this broken firmware, there is now a new flavour of i386 netinst image. Look for debian-mac-XXX-netinst.iso. This image should boot and install happily on a macmini1,1, giving you a normal Debian installation when it's finished, booting in BIOS mode using GRUB. There's quite a delay before the GRUB menu comes up (~30s or so) - be patient!
(Tested on a macmini1,1: Intel Core Duo 1.66 GHz, 1GB RAM, using the jessie-DI-rc3 mac netinst for i386. Exact machine description at http://www.everymac.com/ultimate-mac-lookup/?search_keywords=ym6465s2w0a)
If you change the disk by an SSD, you might want to switch the SATA Controller to AHCI mode by adding the following Code to /etc/grub.d/01_setpci_ahci:
This is necessary to enable trim support on the disk.
Macmini 2,1
This revision is nearly identical to Macmini 1,1; but is factory-equipped with 64-bit capable CPU and a slightly different firmware from Macmini 1,1. There were no firmware updates from Apple for this model, so no updates are necessary. This machine will experience the same hangup as the Macmini1,1 when attempting to boot the standard i386 and amd64 install images. The same image as used above will successfully in the Macmini2,1; but there is now a new flavour of amd64 image that will successfully boot and happily install on this system. Look for debian-mac-XXX-amd64-netinst.iso Also like the Macmini1,1; there will be an approximate 30 second delay before booting via BIOS emulation, for both booting from the CD and from the installed system thereafter.
(Tested on a macmini2,1: Intel Core 2 Duo 2.0 GHz, 4GB RAM, using the jessie 8.4.1 (mac) ISO. Exact machine description at http://www.everymac.com/ultimate-mac-lookup/?search_keywords=Macmini2,1
Macmini 3,1
Unlike the 32-bit EFI macmini1,1 and 64-bit EFI macmini2,1, the macmini3,1 is the earliest Mac Mini that can boot installers up to Debian 9 Stretch easily using any normal i386, amd64, or multi-architecture image written to CD, DVD, or USB drive. Using the 'C' key at startup with a CD/DVD loads the El Torito boot record for BIOS-compatible boot (which also activates video BIOS support). Using the 'Option' key at startup to open Startup Manager can provide more options, depending on the install medium. For USB drives, the 3,1 only works with the EFI boot El Torito boot record and displays a USB icon labeled 'EFI Boot.' If Startup Manager is first opened without any disc loaded in the drive, inserting a Debian installer CD/DVD will often give a choice between the two available El Torito boot records - 'Windows' to do a BIOS boot with video BIOS support, and 'EFI Boot' to do an EFI boot without video BIOS support.
The NVIDIA 9400M graphics are supported by the nouveauFB driver up through Debian 9 Stretch. Changes to the nouveauFB driver beginning with Debian 10 Buster cause a failure to finish loading the installer after an EFI boot, due to the missing video BIOS support. After selecting to do either a Graphical install or a text-based Install, the kernel will start to load before the screen freezes and the computer hangs. After a BIOS boot to activate video BIOS support, the nouveauFB driver also runs into problems while loading the Live desktop environment because the display goes to sleep and cannot be woken back up. If you will be using a desktop environment you can install Debian 9 Stretch first, install the proprietary, closed-source nvidia driver or another graphics driver (if one has become available), blacklist nouveau, and then upgrade to Debian 10 Buster. If you don't need graphics support for a desktop environment and will be working strictly from the command line interface, it is possible to upgrade from Debian 9 on up through subsequent releases to the current release (Debian 13).
Once installed, there's quite a delay before the GRUB menu comes up (~30s or so) - be patient!
It can also take a couple of minutes before the graphical login screen is displayed on first boot after install, and another couple of minutes after login before the desktop is displayed.
(Tested on a macmini3,1: Intel Core 2 Duo 2.0GHz, 1GB RAM, using the jessie-DI-rc3 netinst for amd64. Exact machine description at http://www.everymac.com/ultimate-mac-lookup/?search_keywords=ym9035my19x.
(Tested on a macmini3,1: Intel Core 2 Duo 2.0GHz, 4GB RAM, using debian-9.13.0-amd64-i386-netinst.iso at https://cdimage.debian.org/mirror/cdimage/archive/9.13.0/multi-arch/iso-cd/.)
Macmini 4,1
Using an amd64 image, this machine will boot and install Debian easily. Oddly, it boots differently depending on the boot media. If using a CD, it boots in BIOS mode (and will then install correctly and boot that way). If booted from a USB stick, it boots in EFI mode and will also install correctly and boot that way.
(Tested on a macmini4,1: Intel Core 2 Duo 2.4GHz (P8600), 2GB RAM, using the jessie-DI-rc3 netinst for amd64 in each case. Exact machine description at http://www.everymac.com/ultimate-mac-lookup/?search_keywords=c07cvl01dd6h.
The Nouveau video driver doesn't support HDMI audio with the ?GeForce 320M video chipset. If you need HDMI audio, you'll have to install nvidia-legacy-340xx-driver and do without Wayland support.
(Tested on a macmini4,1 with Buster 10.5 for amd64)
Macmini 5,3
This machine has no CD drive, so just use the amd64 image on a USB stick again. If booted from the USB stick, it will boot in EFI mode and will install correctly and boot that way.
(Tested on a macmini5,3: Intel Core i7 2.0 GHz (I7-2635QM), 8GB RAM using the jessie-DI-rc3 netinst for amd64 again. Exact machine description at [[http://www.everymac.com/ultimate-mac-lookup/?search_keywords=c07g39r7djy7 ]].
Macmini 6,1
This machine also has no CD drive, so just use the amd64 image on a USB stick. Note that Debian wags its finger at you if you used unetbootin to make the bootable usb stick. When booting from the USB (hold down Option during BIOS bootup), it will boot in EFI mode. You have the option to do a 'taste test' on your mac mini using Debian live preview or do a full Debian Install.
On Full Install, Debian installer will alert you that your Wifi card is not supported because you need non-free firmware, and it will give you the option of inserting yet another USB stick containing the following file or files: b43/ucode29_mimo.fw b43-open/ucode29_mimo.fw
Otherwise, you can install the Broadcom wifi drivers after the rest of the Buster install is complete. Instructions for performing the Broadcom Wifi card installation after the fact are on the Debian wl page: wl
SW and HW details: Image: debian-live-10.3.0-amd64-gnome.iso HW: Tested on a 2012 mac mini 6,1 Intel Dual Core i5 2.5 GHz, 16GB RAM, Broadcom 4331 Wifi card. Single-boot on 480 GB Solid-State HDD. Exact machine description at https://everymac.com/systems/apple/mac_mini/specs/mac-mini-core-i5-2.5-late-2012-specs.html.
Dual/Triple Boot
If you're not planning to dual boot OS X and Debian (or triple boot OS X, Debian and Windows), you can skip this section - use the simple instructions above.
Otherwise, Mac OS X 10.4.6 and later have online resizing of HFS+ volumes and support for hybrid GPT/MBR partition tables in Disk Utility. To boot multiple operating systems, use OS X's tools to split up your drive and make room for everything. Remember that booting in the BIOS compatibility mode means having an MBR partition table (either hybrid GPT/MBR or plain MBR) so be sure to make the needed changes to your hard drive before continuing. Remember to select the GRUB bootloader from within the Debian installer so that you can access the BIOS compatibility mode described above.
If you make changes using any of the Linux partitioning tools (even just the type of a partition) and are using GPT you need to reboot and use gptsync or "Partition Tool" from rEFIt to resync GPT/MBR tables and then re-run the installer. If you forget to do this, installing the boot loader will fail.
For dual or triple boot situations, hold down the Option key on your keyboard and the built-in boot volume chooser will let you select what you'd like to boot from.
