Go with a Dual Boot; OS X and FreeBSD
I personally did this on an XServe G4 (PowerPC), which was more difficult than the Intel based Macs; so your mileage will be better. My XServe had 2 1.3GHz (RISC) CPUs, 2GB RAM and 2 80GB HDD's. 1 hard drive had 2 partitions, 1 for the OS X installer (so I didn't have to wait on the slowness of the SuperDrive) and the other partition as a TimeMachine backup of the installation. The primary hard drive is where all the magic happened.
I outlined this install on the Unix/Linux forum here on StackExchange
- I created two partitions: a 30GB Apple partition and a 50GB Free Space partition. The Apple partition has to be first
- I installed the latest version of OS X that the server could handle (Snow Leopard)
- I then installed FreeBSD onto the Free Space partition allowing the installer to "auto partition" it. FreeBSD (gparted) created a
/boot
, /
, /var
, and /home
.
- To top it off, I installed it via USB (which said couldn't be done, but is actually pretty easy)
So, what I have is a FreeBSD system that I am able to boot into OS X for any "Apple specific" tasks like updating firmware. I haven't had many since this install, but it's comforting to know that I have access to native OS X when I need it.
Why FreeBSD
OS X is based on FreeBSD and the nice part about it is that the installer (USB img) is less than a 700MB. Only the most essential services get installed. I have no need for a GUI so GNOME or KDE are nowhere to be found. My server is running an AMP stack (Apache, MySQL, and PHP) so other than that, nothing else is loaded. Security wise, it's very difficult to hack a system that doesn't have a service to exploit.
Even nicer with FreeBSD is it's consistency. There are too many distros in Linux and what you do in one is not the same as another (i.e. packages versus RPMs). FreeBSD on an Xserve G4 is going to be the same as FreeBSD on a 2015 Macbook Pro.
As for application compatibility? On OS X on my XServe, I couldn't upgrade PHP to 5.6 without installing Homebrew. I am running the latest AMP stack on the XServe because it was available on their Ports Collection.
Check out this article from ITWire: Running FreeBSD on the server: a sysadmin speaks