Mac mini 2012 linux

Ubuntu 12.04 LTS on an Apple Mac Mini (Late 2012)

I’m switching my web hosting to a Mac Mini running Ubuntu Linux. These are my notes for getting it set up.

  • Apple Mac Mini 6,2 (Late 2012)
  • Intel Core i7-3615QM 2.3 GHz quad-core processor
  • 16 GB DDR3-1600 memory
  • 128 GB solid state drive
  • 1 TB 5400 RPM hard drive

The Mac Mini is built to run OS X 10.8, but Ubuntu 12.04.1 runs nicely with a couple of tweaks.

  • Installing required the “noapic” flag (F6 when at the boot menu)
  • Set “Boot after power failure” by running the following, and adding it to /etc/rc.local:

For networking, I didn’t want to have to remember to recompile the module after reinstalling each kernel. I setup DKMS to take care of it automatically.

  • Download the Linux “tg3” driver from Broadcom (version 3.124c (10/18/12) at the time of this writing)
  • Extract it
  • Navigate to Server/Linux/Driver/tg3-3.124c.tar.gz
  • Extract that file to /usr/src/tg3-3.124c/src/
  • Create a file called /usr/src/tg3-3.124c/dkms.conf with the following contents:
PACKAGE_NAME=tg3 PACKAGE_VERSION=3.124c CLEAN="make -C src/ clean" MAKE="cd src/ && make BUILD_KERNEL=$ KVER=$ " BUILT_MODULE_NAME[0]="tg3" BUILT_MODULE_LOCATION[0]="src/" DEST_MODULE_LOCATION[0]=/updates AUTOINSTALL=yes

PACKAGE_NAME=tg3 PACKAGE_VERSION=3.124c CLEAN=»make -C src/ clean» MAKE=»cd src/ && make BUILD_KERNEL=$ KVER=$» BUILT_MODULE_NAME[0]=»tg3″ BUILT_MODULE_LOCATION[0]=»src/» DEST_MODULE_LOCATION[0]=/updates AUTOINSTALL=yes

sudo dkms add -m tg3 -v 3.124c sudo dkms build -m tg3 -v 3.124c sudo dkms install -m tg3 -v 3.124c

sudo dkms add -m tg3 -v 3.124c sudo dkms build -m tg3 -v 3.124c sudo dkms install -m tg3 -v 3.124c

  • The module is now ready, either load it with “modprobe tg3” or reboot
  • If you need to remove it at a later time, do:
sudo dkms remove -m tg3 -v 3.124c --all

sudo dkms remove -m tg3 -v 3.124c —all

After these changes the Mac Mini is working great. I didn’t test Wi-Fi, Thunderbolt, or Sound, since I won’t be using them. USB works as far as being able to connect a keyboard and mouse, and Ubuntu’s 12.04.1 LiveCD boots into the full desktop.

Ubuntu has released 12.04.2 install/live CDs based on kernel version 3.5. I have not tested the above instructions with kernel 3.5, so if you’re following them you probably want to stick with the 12.04.1 install ISOs with kernel 3.2. If you install from 12.04.1, you will automatically stay on 3.2 even when updating to 12.04.2.

Update 2 (2014-10-05):

Ubuntu 14.04 and 12.04 with the Trusty hardware enablement stack (installed by default from the 12.04.5 ISO) have the required tg3 driver and do not need the custom DKMS config above.

38 Replies to “Ubuntu 12.04 LTS on an Apple Mac Mini (Late 2012)”

Thanks a lot, it really helps me to get Ethernet on Mac Mini 2012 working. From there, getting the Wifi and other hardware working is simply a matter of using Additional Drivers in settings. The & should be the actual ampersand character, otherwise the module will fail to build.

I have just purchased a new Mac Mini, followed above instructions and still can not get the ethernet port to work.
Have error messages when building the module posted below. Can anyone help?
Thanks Building module:
cleaning build area….(bad exit status: 2)
cd src/ && make BUILD_KERNEL=3.2.0-33-generic KVER=3.2.0-33-generic….(bad exit status: 2)
ERROR (dkms apport): binary package for tg3: 3.124c not found
Error! Bad return status for module build on kernel: 3.2.0-33-generic (x86_64)
Consult /var/lib/dkms/tg3/3.124c/build/make.log for more information.
[email protected]:/usr/src/tg3-3.124c#

@MikeTheGeek!
It sounds like the paths are wrong, are the driver files extracted to /usr/src/tg3-3.124c/src/, and the dkms.conf file located in /usr/src/tg3-3.124c/ ?

I build ethernet driver DKMS on launchpad.net, my repo ppa:fantom-h/test
Package name tg3-dkms, please test it!!

I just purchased a new Mac Mini and can not get the ethernet port to work. When I try to add the module to DKMS, it turns out DKMS is not installed yet. I tried “sudo apt-get install dkms” and got:
E: Unable to locate package dkms How can I go through this and get my ubuntu on mac mini connected? Can any one help? Thanks!

@Theta
You probably need to grab the DKMS .deb file with a different computer, transfer it to the mac mini with a USB flash drive, then install it with dpkg. Download: http://packages.ubuntu.com/precise/dkms Copy it over and install with “sudo dpkg -i dkms_2.2.0.3-1ubuntu3_all.deb”

Interesting!
I also plan to buy a Mac mini Server late 2012 to install Ubuntu. I also do not care much about thunderbolt and wifi since I will use it as a server box.
But one thing I would like to ask you about CPU temperate: is it hot?
And do you install Ubuntu on SSD or hard disk? Thanks for your post!
LE

Did you have any issues with graphics? I’m seeing dithering & a general lack of enough colours over the desktop (with a mini 6,1 and quantal)

Nick — it might be the same bug I experience on the 6,2: https://bugs.freedesktop.org/show_bug.cgi?id=59113 It’s fine if I use HDMI/DVI, but Thunderbolt/Displayport looks awful.

@Le The CPU seems fine, with the macfanctld service running the fan will speed up when I stress test the system with Prime95, and it’s silent when idle. It’s also stable enough to run Prime95 for over 24 hours without issues. I upgraded my mini with a Samsung 830 SSD, I have both the SSD and original HDD inside the case, with Ubuntu on the SSD.

Are you using it as a desktop? Curious, as I’m trying to at the moment, and apart from the network issues, I’m also seeing graphics problems – lack of colour depth causing dithering, initially noticeable on desktop background but present everywhere. Would be interested to know whether you’re using it with no issues, haven’t used it as a desktop, or are having the same issue.

Hi, has anyone experienced problems with the Mac Mini kernel panicing on 12.04 when under load, or having iO issues with the Disk? I don’t have the fan control installed, so thinking it may be that… But anyone have any similar experiences?

http://ubuntuforums.org/showpost.php?p=12330661&postcount=6 I was in dependency hell before I found the link above. Follow that instructions verbatim, then you should have a tg3 that can be loaded.

@Theta
In case, dkms is not available during installation.
Do ‘make; make install’ in the directory where source is copied, to have temporary networking.

Hello, I a trying to get the ethernet drivers working and this is where I’m stuck: $ sudo dkms build -m tg3 -v 3.124c Kernel preparation unnecessary for this kernel. Skipping… Building module:
cleaning build area….
cd src/ && make BUILD_KERNEL=3.5.0-23-generic KVER=3.5.0-23-generic….(bad exit status: 2)
ERROR (dkms apport): binary package for tg3: 3.124c not found
Error! Bad return status for module build on kernel: 3.5.0-23-generic (x86_64)
Consult /var/lib/dkms/tg3/3.124c/build/make.log for more information. And the make.log says: DKMS make.log for tg3-3.124c for kernel 3.5.0-23-generic (x86_64)
Thu Feb 21 16:47:13 EST 2013
sh makeflags.sh /lib/modules/3.5.0-23-generic/build > tg3_flags.h
make -C /lib/modules/3.5.0-23-generic/build SUBDIRS=/var/lib/dkms/tg3/3.124c/build/src modules
make[1]: Entering directory `/usr/src/linux-headers-3.5.0-23-generic’
CC [M] /var/lib/dkms/tg3/3.124c/build/src/tg3.o
/var/lib/dkms/tg3/3.124c/build/src/tg3.c:96:24: fatal error: asm/system.h: No such file or directory
compilation terminated.
make[2]: *** [/var/lib/dkms/tg3/3.124c/build/src/tg3.o] Error 1
make[1]: *** [_module_/var/lib/dkms/tg3/3.124c/build/src] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-23-generic’
make: *** [default] Error 2 Any suggestions on steps I take?

For those of you running into low color using the HDMI connected to your TV, try this. http://ubuntuforums.org/showthread.php?p=12523426 These cmds (first one fixed it): intel_reg_write 0x70008 0xC4002000
intel_reg_write 0x70180 0xDA004400 http://lists.freedesktop.org/archive…ry/015395.html Here is the link to the bug: https://bugs.freedesktop.org/show_bug.cgi?id=46800

hi iam the gompa from the ubuntu forum and i wondered if one of you also has a problem with screen resolution when a screen is conected to the dp port

Using a miniDisplayPort to DisplayPort cable to a Dell U2713HM monitor, I have no problems with resolution but do have problems with colour depth. The commands above don’t (fully) succeed: [email protected]:~# intel_reg_write 0x70008 0xC4002000
Value before: 0xC0000000
Value after: 0xC0002000
[email protected]:~# intel_reg_write 0x70180 0xDA004400
Value before: 0xD8004400
Value after: 0xD8004400
[email protected]:~#

Would you recommend this as a portable-desktop system, for Ubuntu? I move a few times a year between two locations, and have a decent screen on either end – Is this the box I want in my bag, or anything else? (I do like ubuntu, rather than OSx)

@Sam Freed It sounds like there are some desktop issues when running Ubuntu (see above comments), but I’m sure they’ll be fixed. I’m only using it as a headless server, and for that role it’s been working great. I currently have 110 days of uptime.

Hi, thanks again for the post. I’ve written a little post myself at http://mike.kz/how-to/installing-linux-on-a-late-2012-mac-mini/ just focusing on the tg3 network driver changes in the 3.5.x upstream of the linux kernel. Linked back to here too 🙂

@Monkeypet
To make the wifi work i simply installed this package “linux-firmware-nonfree” (i used a wifi usb dongle to just apt-get install it)

Thank you as well for this post. This saved me countless hours of frustration in trying to accomplish the exact same task. I really appreciate it.

I have installed on my MiniMac (late 2012) succesffully the recent version of the tg3 (1.333d) driver and it works as expected. Little hassle is that you will probably not have DKMS installed and you’re offline ;-/ So on some other ubuntu machine install DKMS (apt-get install dkms) if not installed, then use aptoncd and make .iso file with dkms*.deb package on an USB stick. Put USB stick into MiniMac and mount the .iso image by using mount -t iso9660 -o loop /media// /mnt Now go to /mnt and execute dpkg –install dkms*.deb The type uname -r and export this as kernelver variable.
Now follow original instructions on how to add the driver module to the dkms and voila!

Great to see lot of feedback here. I am wondering if any of you tried adding a secondary Ethernet port and used this Mac Mini server as an LTSP server? I want to power 4 thin clients for training and development purposes.

Источник

Читайте также:  Подключение консоли linux windows
Оцените статью
Adblock
detector