How to transform an Apple Mac Mini intro a reliable Ubuntu Server?
This question is about what steps are needed for transforming an Apple Mac Mini into an Ubuntu server.
Here are some areas:
- installing Ubuntu and making it to be bootable from EFI by default
- enabing CPU and fan control (by default it does not work)
- be sure that it will power on after power failure
- SSD configuring (assuming that the primary disk is a SSD and that you may have a HD as the second disk, nobody needs the DVD drive).
Solution 1:
First install rEFInd
, and boot Ubuntu installer after.
Enable "Boot after power failure" by adding next line to /etc/rc.local:
setpci -s 0:1f.0 0xa4.b=0
setpci -s 00:03.0 0x7b.b=0x19
Install mac fan control:
sudo add-apt-repository ppa:mactel-support/ppa
sudo apt-get update
sudo apt-get install -y macfanctld applesmc-dkms
For SSD tunning (you have to adapt to your config) here is my /etc/fstab
file:
UUID=<...> / ext4 noatime,nodiratime,errors=remount-ro 0 1
UUID=<...> /boot vfat defaults,noatime,discard 0 1
What is important to remember here:
-
/boot
is therEFInd
partition, as you can keep all in the same place. - I added noatime,nodiratime to the / partition as this will lower the tear-down of the SSD.
Do noy add discard
or ext4discard
to the list of options because instant TRIM will slow down your SSD too much.
The optimal solution is to run TRIM in a daily crob job, by running something like:
fstrim -v /
Other resources:
- http://www.frozenindustries.com/2012/11/04/ubuntu-12-04-lts-on-an-apple-mac-mini-late-2012/