The process is roughly the same as my previous instructions for Ubuntu 8.04, but the write-up is more detailed to address the questions I have received last time. So don't the post length scare you!
Outline
The article starts with a warning describing the shortcomings of installing Ubuntu on the newest Mac Mini model. That is followed by a step-by-step guide for installing Ubuntu which should work on any Mac (tested only on Minis though). The post ends with instructions on how to restore your dual-boot solution if Mac updates break it, and a list of (community-contributed) tricks for getting some hardware to work on the latest Mini.
Warning (skip if you're sure you want Ubuntu)
Ubuntu is not ready for the new Mac mini (model MacMini3,1 with 5 USB ports). This is based on the latest versions of Ubuntu 9.10 (software updates installed as of December 22, 2009), and Ubuntu 10.04 Alpha 1.
Shutting down or rebooting does not work. The system hangs after performing all the shutdown tasks, and has to be power-cycled manually (hold the power button for 4 seconds and release it to force it to power off). This limits its use as a server, because it cannot be rebooted from ssh (needed for software updates).
Wireless does not work right after installation, so Ethernet is needed, at least for bootstrapping. Once the system gains Internet access, it offers to install a Broadcom STA wireless driver which works on Ubuntu 9.10 and later.
Method
Getting Hardware to Work (community-contributed)
Warning (skip if you're sure you want Ubuntu)
Ubuntu is not ready for the new Mac mini (model MacMini3,1 with 5 USB ports). This is based on the latest versions of Ubuntu 9.10 (software updates installed as of December 22, 2009), and Ubuntu 10.04 Alpha 1.
Shutting down or rebooting does not work. The system hangs after performing all the shutdown tasks, and has to be power-cycled manually (hold the power button for 4 seconds and release it to force it to power off). This limits its use as a server, because it cannot be rebooted from ssh (needed for software updates).
Wireless does not work right after installation, so Ethernet is needed, at least for bootstrapping. Once the system gains Internet access, it offers to install a Broadcom STA wireless driver which works on Ubuntu 9.10 and later.
Method
- Use a Leopard (Desktop or Server) install disc to get your Mac in pristine form. This step is intended to undo anything that might have gone wrong in your previous attempts. You can skip it if you have a fresh install.
- Use Software Update to ensure you have all your updates installed. Update and reboot until there are no updates left.
- Start up Boot Camp Assistant (press Apple+Space to open Spotlight, then start typing the name until the application appears) and create a "Windows" partition.
- Do not let Boot Camp Assistant reboot your computer. Use Apple+Q to quit once it's done partitioning.
- Download and install the latest version of rEFIt (0.13 at the time of this writing) from http://refit.sourceforge.net/
- Open up Terminal (use Spotlight if you don't have it on your dock) and type the following commands:
cd /efi/refit
./enable-always.sh - Insert your Ubuntu CD, and shut down the computer, then power it back up.
- You should see the rEFIt boot screen.
- Select the Ubuntu CD (it should have a penguin on it) and go through the normal installation process. If rEFIt doesn't recognize the Ubuntu CD, power-cycle your Mac, and use Bootcamp to boot the Ubuntu CD - press and hold the Alt key as soon as the computer starts up, until the BootCamp screen shows up; select the CD image.
- When you have to do partitioning, choose Manual. Remove the Windows partition (the big FAT32 partition at the end). Create an ext4 partition (be sure to to allow for swap space) and set it to mount to /, then create a swap partition. If you're unfamiliar with partitioning a Linux system, read the recommendations below.
- Click on the FAT32 partition, then click the Delete Partition button.
- Click on the free space entry at the bottom, then click the New partition button. Select Ext4 journaling file system under Use as:, check the Format the partition: box and select / as the Mount point:. Now subtract twice your RAM size from the partition size. For example, if your partition size is 53575 Mb and you have 1Gb of RAM, you would write in 51527, which is 53575 - 2*1024. Press OK when you're done.
- Click on the free space entry at the bottom, then click the New partition button. Select swap area under Use as: then press OK.
- Unless you know what you're doing, do not change the Advanced settings on the last installation screen. Specifically, don't change the default Grub installation location (hd0).
- When the installation is done, the Mac will reboot (if you're lucky) or beep multiple times. If it beeps, turn it off (press the power button for 4 seconds) then turn it back on.
- When you get the rEFIt boot screen, go to Partitioning Tool (bottom row, second icon from the left). It will prompt you if you want to update the MBR to reflect the GPT. Press Y, and watch the system reboot.
- Power down the system by pulling the power cord. Then power up again.
- Select Macintosh HD, and make sure you can boot into OSX. If it doesn't boot after 2 minutes, power cycle (see previous step) again.
- Optionally, switch the boot default to Linux. Open up /efi/refit/refit.conf in TextEdit, and uncomment the line saying #legacyfirst (at the bottom of the file).
- Reboot your Mac mini, and enjoy choice!
- Open up Terminal (use Spotlight if you don't have it on your dock) and type the following commands:
cd /efi/refit
./enable-always.sh
Getting Hardware to Work (community-contributed)
The tips here should help if you want to go beyond Ubuntu's out-of-the-box hardware support. These were contributed by others, and I just put them together on one page.
Sound (by nonspeaking) - not needed after Ubuntu 9.10 Beta
To get the sound working, add the following line to /etc/modprobe.d/alsa-base.conf
options snd-hda-intel model=imac24
Video (by nonspeaking) - not needed in Ubuntu 9.10
The following guide describes how to get the absolute latest video driver directly from nVidia: https://help.ubuntu.com/community/NvidiaManual
Personally, I think that's too much effort. Taking that path forces you to do manual work every time you update your kernel. But I guess that depends on how much you need to get video working. The latest driver shipping in Ubuntu 9.04 works well for me.
Motivation
Motivation
If you're curious, the following reasons determined me to write this post
Please leave a comment if you find a shorter way, or if something is not working for you.
- My readers commented on my installation method for Ubuntu 8.04, and said it doesn't work for 8.10. Takeaway: please do comment! I listen :)
- I got a new Mac Mini (MB464LL/A, 5 USB ports) to replace the one that was stolen from me.
Please leave a comment if you find a shorter way, or if something is not working for you.


56 comments:
Ubuntu is not ready for the new Mac mini
Do you have any information on other distros on the new Mac Mini?
Did you get audio working?
Doesn't seem to work by default...
grml gnome does not work right.
seems that others have the same problem:
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/322959
can anyone help?
thx!
Thanks for the guide. I´ve just got one of these new Mac Minis as well and plan on using it for MythTV, so sound is important.
I needed to add the following line to /etc/modprobe.d/alsa-base to get sound working:
options snd-hda-intel model=imac24
I am also having better results using the latest drivers from nVidia (180.29) rather than the Ubuntu packaged ones. Follow these instructions to install them:
https://help.ubuntu.com/community/NvidiaManual
The Alsa tweak works fine on my Mac Mini 2009 with Gentoo Linux. Thank you very much!
I could be wrong, but it appears that the solution to this reboot issue is within the range of your abilities. Is it possible to reverse-engineer Leopard's process to find out what changed from the old intel-mac-mini's which rebooted normally? I guess more importantly, what Leopards reboot mechanism does that linux doesn't. A simple shell script to patch the standard linux reboot scripts to include the proper reboot signals would be slick. Even if it's not elegant, it would be a great achievement. Thanks :)
@aDisasterisk -- There is a non-elegant solution to the reboot problem. Someone claims that installing the linux-server package, which brings in a different kernel, solves the problem. I haven't had time to verify that yet, so I haven't included it in my post. My information source is the original bug report.
If you try it, I would be grateful if you let me whether it works or not. Thanks!
Thanks very much for the prompt response. It looks like the developers acknowledge that it's a bug and since they already found that the server package can fix it, they'll probably have a patch soon.
I just hope they can release a script to fix that works on most distro's and DOESN'T involve recompiling the kernel.
restarting seems to work for me after i added reboot=acpi to the kernel command line (reboot=efi didn't)
i added the options line, but this is not supposed to work on the internal speakers? (i haven't tried plugging external speakers in, but if couldn't get sound with the internal speakers)
gohai
@aDisasterisk, anonymous - I tried reboot=acpi and reboot=efi with the plain kernel and the server kernel. I also tried updating rEFIt to 0.13, and used the above options. None of them helped me reboot.
Given that the Ubuntu 9.04 kernel lockdown is this coming Thursday, I don't expect to see the reboot issue fixed in 9.04.
did some more testing and also can get this to work reliably :(
did some more testing and also can't get this to work reliably.. might just have been luck the first time around :( (all the other reboot-options also make no difference)
gohai
Anybody have time to reverse engineer the OSX reboot process? Otherwise try to look straight at the open firmware documentation? I currently don't have the skill or time to work on this, but at some point I promise to post it here if I find a solution.
Thanks for your guide. I hope I get you right.
1) Ubuntu 8.04 works with Mini Mac (new one with 5 USB ports).
2) Ubuntu 8.10, 9.04 beta makes problems:
- Wireless does not work right after installation
- The system hangs after performing all the shutdown tasks
-Sound doesn't work by default
I hope the final 9.04 Version can fix the beta version problems.
Greetings from Germany
@aDisasterisk: no need to reverse engineer OSX :). rEFIt can reboot the mini, so there is working open-sourced code for doing that. Also, the OSX kernel is open-sourced, so I think it's more a matter of debugging the kernel code and fitting in some new logic.
@Anonymous from Germany: apologies if I was unclear. When I wrote my previous post (about Ubuntu 8.04), I had an older Mac mini, bought in late 2007. I haven't tried 8.04 on the new mini.
Brilliant... Well almost. Looking to ReFit is definitely the way to go. He or They don't actually have a solution yet, but it looks somebody's reported it.
http://sourceforge.net/tracker/?func=detail&aid=2700944&group_id=161917&atid=821764
Isn't "debugging a program to figure out what its doing so you can replicate it" pretty much the definition of reverse-engineering? ;) To be honest though, I didn't know the OSX kernel was open source so actually, debugging seems like the hard way. I'm going to find an OSX # in IRC and beg developers to help us out.
Once the system gains Internet access, it offers to install a Broadcom STA wireless driver. This driver works, though the network performance is poor.How poor is poor? Do you have any figures?
I'm planning on running Ubuntu as the main OS on the new Mac Mini, and this might be a show stopper. WLAN is my only option for networking.
Other than the WLAN, audio and video issues you mentioned, would you say Ubuntu works well on the new Mini?
Any comments on the issues reported at Ubuntu forums?
Great post, Victor. Many thanks. One small step from your old post that you may want to duplicate here is to update the GRUB install location from (hd0) to (hd0,2), assuming you added a separate swap partition. That was a necessary step for for my Linux partition to be able to boot. Thanks again.
Thanks! Points 12) and 13) helped me with my Fedora 11 beta installation.
Even though it did not reboot automatically at least it booted.
Also note to anyone installing Fedora 11 on iMac 24, remove all the preselected packages (like Office and Software development). Otherwise it will hang at the end of the setup.
Sorry for getting back to everyone so late!
@Boris: I measured the WiFi performance by System Update, downloading, and scp-ing stuff into the machine. I consistently got about 4KB/s.
Caveats:
(1) There's a lot of interference where I live (~15 access points). However, I consistently get speeds of over 1MB/s on my other computers.
(2) I'm using 802.11n.
(3) I just tried the Ubuntu 9.04 Release Candidate, and the Broadcom driver is activated, but not working at all.
I would say everything else (Video, I/O) works pretty well.
@Brandon: I removed that step because I was able to get things to work without it, consistently. Even with a boot partition. Will try to follow-up over email to figure out why we're getting different results.
First you say: "When you have to do partitioning, choose Manual. Resize the Windows partition ... to allow for swap space and format it to ext3, then create a swap partition."
Right after: "Click on the FAT32 partition, then click the Delete Partition button."
So there was never any actual resizing. Maybe reword this part?
@Anonymous: Thank you for your feedback! I fixed the writing.
The reason why the summary was inconsistent with the step-by-step instructions is that I first tried out re-sizing, hoping it would make things work without rEFIt. Then I forgot to update it.
Shame on me for that, and thanks so much for catching the inconsistency!
Just adding that while I also got the reboot problem in trying ubuntu on my new mac mini, I also saw the problem in gentoo. But strangely enough, I never have this problem with livecds like the Ubuntu one. I can restart fine from them.
Okay, scratch that last part I guess :P Just tried again and it happened. It's kind of sporadic I guess.
@Luna: the new Mini (Macmini3,1) fails to reboot regularly for me. If it reboots for you, even sporadically, please consider adding that information to the launchpad bug, to help folks debug.
Thanks!
I find it interesting that you had no issues with the nVidia driver that shipped with 9.04 beta. Have you tried 9.04 final? X crashes if I maximize a window, or rather, stops responding.
Updating to the latest nVidia update fixed this problem for me making the trouble quite worth it.
Still haven't found a way to reboot properly. Anyone else?
Using a 3.1 macmini on a 10.5 OS with a Ubuntu 9.04 install disck, the installation hangs on the "preparing to partion" menu at 38%. Can anyone give advice or HELP!
Thanks,
Partioner
Great post, very useful. However I still have the reboot issue. Anyone managed to solve this? Any alternatives? I tried both 8.10 an 9.04, I tried the server kernel and different options in the kernel command line with no success. Any help will be greatly appreciated.
Great post, very useful. However I still have the reboot issue. Anyone managed to solve this? Any alternatives? I tried both 8.10 an 9.04, I tried the server kernel and different options in the kernel command line with no success. Any help will be greatly appreciated.
@ernesto: I tried Ubuntu 9.10 alpha, which has the 2.6.30 kernel. The problem is still there. I don't think we'll see a solution this year.
@aDisasterisk: I know I _could_ be working on a solution. Sadly, at this time, I can't afford the time investment -- it's cheaper for me to stick to Dell Hybrids for my servers.
I think this explains why nobody is stepping up to solve the Mini problem.
Hi everyone. Thanks for the article, helped me to get the sound working on the mini.
Has anyone tried using bluethooth? My syslog shows:
bluetoothd[2918]: Can't read class of adapter on /org/bluez/2918/hci0: Unknown error 4294967291 (-5)
and I can't find any devices when scanning..
Hi Everybody
i am new to ubuntu and i don t understand the folowig instruction to get thge sound working
I tried that in Terminal
but did nt work
Cheers
Cyril
Sound (by nonspeaking)
To get the sound working, add the following line to /etc/modprobe.d/alsa-base
options snd-hda-intel model=imac24
As of Ubuntu 9.04 Alpha 6, sound doesn't work by default, and this workaround makes it work.
Included My email if anyone can help
Hi Everybody
i am new to ubuntu and i don t understand the folowig instruction to get thge sound working
I tried that in Terminal
but did nt work
Cheers
Cyril
Sound (by nonspeaking)
To get the sound working, add the following line to /etc/modprobe.d/alsa-base
options snd-hda-intel model=imac24
As of Ubuntu 9.04 Alpha 6, sound doesn't work by default, and this workaround makes it work.
Wednesday, July 15, 2009 10:32:00 PM PDT
Delete
I cannot Find the: /etc/modprobe.d/alsa-base
But Found:etc/modprobe.d/alsa-base.conf
I added options snd-hda-intel model=imac24
BUT Gedit Says :
"Could not save the file /etc/modprobe.d/alsa-base.conf."
"You do not have the necessary permissions to save the file. Please, check that you typed the location correctly and try again."
Can Anyone Help Me please?
Cheers
@Aldomodo -- can you try the following command to open up the configuration file?
gksudo gedit /etc/modprobe.d/alsa-base.conf
Thanks Victor
i managed to make it work before i got your message last week
i am not sure how exactly
but one thing is sure it would not have happened without your page
thanks a lot
the audio tweak works also for me in debian/squeeze!
thx to all!
but, anybody know why there is a terrible crackling problem when I listen music?
I have:
* mac mini intel (mid 2009)
* debian/squeeze
* alsa installed (1.0.20, instead of 1.0.18 in ubuntu)
What a guy!! Just when I was sure the reboot issue fell into obscurity and had given up hope, I see your latest post on launchpad. Thanks for pushing the issue. What the hell could it be?
I have a mid 2009 mac mini, and it's a wonderful piece of hardware. Ubuntu is my main OS and I would love to put Ubuntu on it but these instructions are bit over the top for me. If I had a 2nd mac mini I could play around with it. Just imagine if there was an Ubuntu 9.10 mac mini edition for download, that would be great!
@aDisasterisk: I initially thought it has to do with the fact that MacMini has a 64-bit EFI (I checked using the command at http://www.9to5mac.com/snow-leopard-64-bit-32-bit-firmware-efi) but that's not the problem. I'm running Ubuntu on my MacbookPro5,1 which also has a 64-bit EFI and that works.
This would be the perfect excuse to dwell into the kernel code... sadly, I wouldn't be able to justify the time. I wanted the Mac Mini as a fast but portable server. Right now, I'm much more attracted to the Dell Studio 15 with Core i7... yes, it's more expensive, but damn the configuration looks promising.
@Anonymous: I don't think the Mini justifies a separate edition. All the things that don't work in Ubuntu can be fixed in the main Ubuntu edition. That being said, if you want to improve things, by all means, go for it!
If you're in a hurry, you don't really need refit anymore -- the latest Ubuntu builds install and boot just fine via Bootcamp. I still recommend refit because it's handy to have around, if something goes wrong.
As of 9.10 sound still does not work. The workaround still works but the file is now
/etc/modprobe/alsa-base.conf
I have a mac mini 3,1 and it's imposible that microphone works.
@Lupa: I'd like to thank you for your commend and confirm it.
I can't get microphone input on my MacMini3,1 or MacBookPro5,1. I tried the internal microphone and the microphone in a Logitech USB camera.
Oh well... daily lucid builds are available now. I'll try them out, and I'll update my post if I have any good news.
Restart works fine with my Mac mini with the kernel option reboot=pci
@Johannes: what Mac mini do you have? I tried out reboot=pci today, and it wouldn't boot. I'm using a MacMini3,1 with Ubuntu 9.10 x86_64, and the latest stock kernel, 2.6.31-15.
I will try out Lucid's new kernel (2.6.32) when it becomes more stable. I have the devel release on my laptop, and it's hurting quite a bit.
Hi, thanks for the guide. This is very helpful. I am installing 9.10 server (64 bit).
All went smoothly except I do not see the partition in my reFIT menu. Also, I did not know if I needed to make the partition bootable in the partition setup (I didn't) and I didn't set up GRUB as I was afraid it would smash my MBR.
I'm sure all this is related, but from your otherwise-excellent guide, I was unable to figure out what to do here. Any help would be much appreciated.
Victor... completely agree. The dells are impossible to ignore. 6 arduous months of hoping for something that will be obsolete in another 18 SHOULD give you pause. The scarce reports about the reboot=pci "maybe" working are whats killing me. I'm seeing the trend now though... The first Intel Minis were perfect for linux... except they wouldn't boot headless without a hokey dongle. The new MAC's boot headless, but they won't reboot. Just seems like it's not meant to be.
As for your time, the issues been "triaged" and "assigned" forever now so if I were you I'd save it for something more promising as well. Let the full-timers fix it. Nice try on the 64bit EFI though.
@Philip: the default installer settings should install Grub in your MBR. For me, this was the only option that worked -- I couldn't get rEFIt to see the Linux partition directly.
@aDisasterisk: I have good and bad news.
Good news: I downloaded the daily x86_64 Ubuntu build (kernel 2.6.32-9) and reboot works consistently.
Bad news: the system freezes when I install the nvidia proprietary graphics driver, and botches the X configuration permanently -- X won't restart.
Why this is bad news: AFAIK, there was no fix checked in specifically for this bug in the 2.6.32 kernel. So it all comes down to bugs. Maybe fixing the nvidia driver will break reboot again. On the bright side, at least there is hope. Rebooting is possible.
Also: I haven't tested this on the fall 2009 Mac Minis. I'm a student again, so I don't have the budget for a new mini.
I see this was posted on my birthday, so double thanks for your continued efforts and research. Obviously, school takes precedence.
I will focus on the bright side. i am going to re-scan forums and IRC chans for other distros for reports of the same bug and confirmed solutions. Obviously, any good news will be posted here first.
Victor, wondering if you tried centos on the new mac mini and did you face reboot issue with that too? Do you know if any other linux works on the new mac mini?
Anonymous, I'm trying CentOS and have the same issue. It appears to be common to at least 2 distros. I would not be surprised if it's universal.
@aDisasterisk: I haven't tried CentOS.
On the bright side, rebooting still works pretty reliably on the latest Ubuntu 10.04 daily builds (kernel 2.6.32-11 and 2.6.32-12) so maybe it's just a matter of time until the bugfixes trickle down to other distributions.
Using the "halt" command under Ubuntu 9.10 gets the machine to power-off to my suprise.
Any other form of reboot/shutting down hangs and doenst power down though.
Post a Comment