|Deletions are marked like this.||Additions are marked like this.|
|Line 98:||Line 98:|
|stick again. If booted from the USB stick, it will boots in EFI mode||stick again. If booted from the USB stick, it will boot in EFI mode|
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.
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)
Using any normal amd64 image written to CD/DVD, this machine will boot and install Debian easily. It boots in BIOS mode, and will then install correctly and boot that way. 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.
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.
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 ]].
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
$ 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
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
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).
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: