Translation(s): none

(!) ?Discussion


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.

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:

   1 #!/bin/sh
   2 echo "# set ICH7-M SATA Controller to AHCI mode"
   3 echo "setpci -d 8086:27c4 90.b=40" 

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 debian-mac-8.4.1-amd64-netinst.iso at http://cdimage.debian.org/cdimage/.jessie-test/amd64/iso-cd/. Exact machine description at http://www.everymac.com/ultimate-mac-lookup/?search_keywords=Macmini2,1

Macmini 3,1

Using any normal amd64 image written to CD/DVD, this machine will boot into BIOS mode and install Debian easily. You must boot from CD/DVD to boot into BIOS Compatibility mode; booting from USB causes the 3,1 to boot into EFI mode. Debian installs fine in EFI mode, but freezes on boot when the nouveauFB driver tries to load due to the lack of a video BIOS. Nouveau is a 'known issue', alternatively install nvidia or other driver and blacklist nouveau.

Once installed, there's quite a delay before the GRUB menu comes up (~30s or so) - be patient!

(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.

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.

Older / obsolete information

Firmware and elilo

If you are unwilling or unable to update the machine's firmware, elilo (the EFI Linux Loader) can be used to boot the Mac mini. However, this requires a specially prepared kernel and has some drawbacks (like not having 2D/3D accelerated graphics.) James McKenzie published a hack to elilo that activates the Video BIOS without activating the full BIOS compatibility mode. This actually allows the accelerated drivers to work without booting through LILO/GRUB. Unfortunately it hasn't been updated in months.

Installing with rEFIt or rEFInd

Tested on Mac Mini 3.1 2009 OS X 10.8.2

Install rEFIt or rEFInd (a more recently-updated fork). This will be removed but is needed briefly, later. (Note that you can install rEFIt on a USB stick and boot from that, which is especially useful if your goal is to have just Debian on the system as it simplifies partitioning).

Open Disk Utility and add Debian Partition with Format MS-DOS(FAT) then,

Bless this partition:

$ sudo bless -mount /Volumes/DEBIANHD -setBoot

Download your chosen .iso

convert .iso to .img

$ hdiutil convert -format UDRW -o ./debian-xxx.img ./debian-xxx.iso

then

$ diskutil list

note Debian partition identifier ie disk0s4

unmount Debian partition

$ diskutil unmountDisk /dev/disk0s4

copy img to Debian partition

$ sudo dd if=debian-xxx.img of=/dev/disk0s4 bs=1m

reboot and now use Refit to select and install Debian.

Install Grub on Debian partition /dev/disk0s4 not MBR see installation guide.

reboot and use refit "Partition Tool" to resync GPT/MBR tables

reboot into OS X and remove Refit

reboot holding alt key to boot into Grub

a very similiar process can be used to create a bootable USB: Insert USB and Partition Disk, not Volume using the Option: GUID Partition Scheme.

Bless USB $ sudo bless -mount /Volumes/DEBUSBGUID -setBoot

unmount USB $ diskutil unmountDisk /dev/disk1

copy img to USB $ sudo dd if=debian-xxx.img of=/dev/disk1 bs=1m

Known Issues

On the Mac mini (late 2006 model) with Debian 4.0r3 I was unable to get the full 1920 x 1200 resolution on my Apple Cinema HD Display (23".) I was able to resolve it by using the 915resolution package. Debian 4.0r4 is expected to make updated software available, so the 915resolution package may longer be necessary at that point.

With the mid-2009 (macmini 3,1) model, you need a "testing" installer to get a recent enough kernel for reboot to work (with kernels from lenny and prior a hard power-off is needed after shutdown).

Sound

The chipset of Macmini1,1 is STAC9220/STAC9921. With Lenny (only), I notice white noise/whitle on the right channel. The following seems to fix it for me :

echo "options snd-hda-intel model=macmini" >> nano /etc/modprobe.d/alsa-base

Keep in mind to remove this line when you will upgrade to Squeeze.

mid-2010 model Mac Mini

There is a very good step-by-step guide here. Use regular install disks.

Helpful kernel flags:

reboot=p nouveau.modeset=0

macmini2,1 installation specials and pain

I found that none of the methods mentioned above or elsewhere would allow me to boot my installation media on my macmini2,1 Intel core due 1.8GHz. My machine has a broken internal CD drive so I have attached an external firewire connected DVD burner. This works perfectly for normal use and the rEFInd appears to recognise boot disks in it. however, when the disk is selected at boot time "boot legacy OS from entire disk" I would get a black screen with "no boot device found" (or something similar). Same with USB drives created from ISO or DMG (as described above).

Eventually I made some progress by using the step given above to convert a debian netinst 8.3.0 ISO into DMG and copy with DD to a whole USB drive AND burned same to a DVD. I installed rEFInd with the default refine-install script. If I booted and selected the CD or the USB drive legacy OS option it failed with errors about how MAC EFI did not properly support booting from external drives. So I powered off and on again. I then booted the machine and selected the USB drive fallback boot option.

Oddly this appeared to boot but then started using the DVD as well to read some files. I suspect the boot sequence gets confused about which devices it needs to read from, and having the same image in two places satisfied it.

The debian install is now progressing. Hooray!

macmini3,1 8Gb of RAM and CPU soft lock-ups on network

It appears that the issue happens only when installing full 8Gb of RAM into this particular model, does not happen with 1 or 2 gigs. If you install the system, reboot and immediately notice the console messages like "BUG: soft lockup - CPU#0 stuck for ...", this may be because of the ethernet module for MCP79 (Nvidia) chipset.

How to confirm: unplug your Ethernet cable and reboot. Boot normally. If you plug the cable in and get this message immediately, this is the root cause of your troubles.

How to fix: disble MSI/MSIX interrupts by setting "msi=0 msix=0" parameters for "forcedeth" module.

macmini3,1 installing from USB

Recently I had to reinstall Linux on my late 2009 Mac Mini 3,1 because of the SSD drive death. Many people complain that not all installers start successfully on these machines. In addition to that, it appears that my DVD drive is no longer working well. I have tried a number of different options and found one that worked: booting using debian-9.13.0-amd64-i386-netinst.iso (yes, multi-arch) image written to USB stick (hold "option" key at startup) and then upgrading to the releases 10 and 11. Booting from similar 10 and 11 installers was not possible, the computer would freeze after starting the installer no matter what I tried. Debian is still the best option for these machines, as it installs the minimal amount of packages and services - assuming you want to make a nice little server from it.



CategoryMacintoshComputer