Nicolas314

All my geeky stuff ends up here. Mostly Unix-related

My next desktop: part 2

leave a comment »

own-mac-id

Friend of mine (thanks Ben!) introduced me to this site:

http://www.tonymacx86.com/

Everything you need to build your own Mac from bits and pieces can be found there. Tony maintains very detailed shopping lists for everything you need to build equivalents to Apple’s machines.

To err on the pedantic side, you are not really building your own Mac but rather choosing PC hardware that is suitable to run OSX, Apple’s operating system. To be fair to Apple, there is a lot more to a Mac than just OSX.  When you buy a Mac you get a ready-made machine built from hardware that has been tested to just work out of the box. The OS is pre-installed, your configuration is clearly identified and supported, and you benefit from a long-term warranty that has little equivalent in the PC world. This is especially true for today’s laptops that rarely go through a complete year without experiencing hardware defects. If you have ever brought back your MacBook to an Apple store you know exactly what I mean: the service is top-notch, you bought a lot more than just hardware. Enter the store with a broken machine and come out an hour later with a brand new MacBook containing all of your data (unless you fsck’ed up the hard drive, of course).

That said, if you are ready to spend some time maintaining your own machine alive and pay the costs associated with that, it really makes sense to build your own. The next Genius bar is in your living-room if you happen to be a Mac Genius yourself. Ready for the game?

I started from Tony’s shopping list for a Mac Mini. When you dig into it, you realize that some pieces of hardware are not available here in Europe. There are equivalents but you need to know which values to check and if there are chances of incompatibility. RAM for example comes in various flavours: voltage, size, speed, and standard. Some motherboards use dual channel RAM, in which case it is better to buy two RAM chips of equal size rather than a single big one. If you want to have an independent video card you also need to make sure your can power it enough otherwise the box will not even boot. And with great power consumption comes noise and heat to dissipate, for which you need an adequate box and ventilation.  That shit is not obvious to get right and Tony’s shopping lists only get you to a certain point, after which you need to start juggling between what you would like to achieve and what is available to purchase in your region. Some parts cannot be delivered overnight and the risk of picking an incompatible device is high, forcing a return and a few more days of waiting. Not a friendly game to play, is it? Ideally you would like to buy one part and be done with it.

The main points for me were: low consumption, small size, and silence.  These were the three reasons why I purchased a Mac Mini in 2007 and they are still true to this day.

Enter the ready-made mini-PCs: several vendors are now focusing on offering mini boxes that pack enough power into the smallest form factors, keeping heat and noise to minimal amounts. The Intel NUC product line first comes to mind, but there are other vendors now on the same market, like Zotac or Gigabyte. After a careful review of most common options, I chose to go with this one:

Gigabyte GB-BXI5h-4200

You can find Gigabyte boxes (called bricks) sporting i3, i5, i7, or Celeron processors. i3 seemed a bit weak and the i7 boxes are apparently extremely loud, so I opted for a Core i5 version for about 400 euros (Nov 2015). I scavenged an SSD hard drive from an older build I had and only had to add RAM chips on top of that to complete the box: two 8-GB chips from a noname vendor for 80 euros should do the trick.

Now off to installation!

Before I installed OSX, I wanted to give the box a test run with some live Linux flavours to see what it was worth. This led me to a first obstacle: the BIOS. Gigabyte provides a very simplified BIOS (text) interface with absolutely no documentation or online help. You are facing pages of obscure names that do not mean anything at all to the uninitiated, and good luck configuring it.

I admit having stayed away from the whole BIOS/EFI thing those past years and was completely left in limbo as to what I should do. The box could not boot a live Linux Mint USB stick, but I got Ubuntu to boot easily enough.  Seems that operating systems nowadays have to be signed to be allowed to run. I found some options to disable that in the BIOS but that did not get Linux Mint to boot. Oh well. The live version of Ubuntu is nice enough, recognizes all the hardware, and gave me a working desktop in less than a minute. Good to know in case I do not succeed in getting OSX to work.

Prepare to spend some time in the BIOS settings though, because nothing will boot until they are correctly aligned. All together, it took me maybe 2 hours to get things straight by trial-and-error. Not your user-friendly-est experience.

I picked the install procedure from here:

Install Yosemite on any Intel-based PC
RehabMan guide to installing on BXI5h

I chose to install Yosemite (OSX 10.10) and not El Capitan (OSX 10.11). The only brief experience I had with an early El Capitan on my previous Mac (mini) had a disastrous bug that left most fonts completely unlegible on my screen.  Better play it safe and stay one version behind, especially for unsupported hardware. I might update it later as there are many reports of people who are successfully running El Capitan on the same kind of box.

The two main points that caused issues were related to getting the damn thing to boot: the BIOS itself, and the bootloader.

BIOS first: I had to juggle with hundreds of undocumented options until I got them right. For posterity, here are some important settings that are working for me now:

BIOS product: MMLP5AP-00
Version: F6

Advanced:
    Intel Rapid Start Technology: [disabled]
    Network Stack: [disabled]

Chipset:
    Onboard audio: [enabled]
    Onboard LAN: [enabled]
    Erp support: [enabled]
    DRAM Frequency Control: [disabled]

Boot:
    Option 1: [UEFI BIOS on HDD1]
    CSM Parameters:
        Launch CSM [enabled]
        Boot filter [UEFI and legacy]
        Launch PXE OpROM policy [do not launch]
        Launch storage OpROM policy [legacy only]
        Other PCI device ROM priority [UEFI OpROM]

Remember to disable Secure Boot as the OS we will install is not signed. Or rather: its signature is obviously not recognized as an official PC OS.

I could not get Unibeast to boot this machine, so I ended up using Clover which works perfectly fine. RehabMan’s guide saved me there. A million thanks to him for publishing this!

Things I remember from these painful moments:

Installing OSX from USB is quite straightforward. Either you have enough device drivers running and it boots, or it crashes almost immediately. If you get past the OSX setup screens you are good to go. It took about 30 minutes to get OSX installed on the box. This is an SSD drive so disk speed is normally not an issue.

The first time OSX is booted you are hanging by a thread as the bootloader is not installed yet. Do not reboot the machine now or you will have to restart from scratch. You absolutely need to follow RehabMan’s procedure to the end to get all of your device drivers sorted out. Install the developer tools, run git, get the necessary files, modify some XML files manually, and run everything through very carefully. Once you have everything ready you can install Clover on the hard drive. I found it to be a pain to configure and did not dare be too adventurous in the options I chose. If it boots, it suits me.

One part you cannot escape is generate a fake ID for this Mac otherwise you will be locked out of all Apple stuff, including the Apple store. The Clover tools did all of that for me quite nicely. The “About” window shows it is identified as a MacBook Pro retina from 2013 with 16GB RAM, the processor being correctly identified as a 2.3GHz Intel Core i5 (see attached screenshot).

I never got WiFi or Bluetooth to work, even following RehabMan’s instructions step by step. Something is wrong is my configuration somewhere and I could not figure out what exactly. Not really an issue as I am not using radios on that machine. That said, I was curious and got it to work with a 5-euro external USB WiFi dongle from D-Link so it should not be too much of an issue if I ever need WiFi.

Once the bootloader is Ok, the bootloader prompts you for either normal or recovery boot. I never tried recovery, I just assume it works. Cold booting to a login window takes about 10 seconds.

So far everything has been working and the desktop is extremely stable.  There are sometimes issues with the audio system sometimes crashing and not recovering, but it seems to be related to a bug in mpg123, a command-line mp3 player I am sometimes using to preview mp3 files from a terminal. I just switched to using VLC for that kind of task and did not get sound crashes since then. If the sound system ever crashes again, a 10-second reboot fixes everything.

I applied every system update I received so far and did not get into trouble so it seems OSX is happy. Net gains:

  • New box is about half as big as my previous Mac mini
  • Completely silent, even under heavy load
  • Tremendously faster on all accounts! Operations that took minutes before are now measured in seconds. Converting ebooks, encoding movies, or converting flac to mp3 are now a breeze.
  • A lot more comfortable to live with as 16GB of RAM allow to have as many apps running as I want. It is still connected to a 1920×1080 HD screen so the RAM is mostly for apps. I expect things to go differently the day I hook it onto a 4k screen as video memory will be taken from the same 16GB.

The trip was not event-less but by all means, it was worthwhile.

Advertisements

Written by nicolas314

Saturday 26 December 2015 at 8:31 pm

Posted in fun, hardware, osx

Tagged with ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: