Mac mini as a headless server

Last week our humble home server decided it wouldn’t boot any more, and as I had been postponing the migration to a new home server for too long (around six months I think), it was the moment to really do it. We had been warned several times already: it wouldn’t turn on sometimes. Other times it was just fine. But it all smelt like a power supply unit failure.

So I set out on the task of replacing it with my mac mini (the one I pulled apart back in 2007), since it’s quieter, smaller and will probably use less energy as well.

I installed Ubuntu onto it. It was pain free and done in 20 minutes (including partitioning and formatting). I then enabled the remote desktop service (aka VNC), disconnected the display and keyboard and connected them back to my main machine. Then I continued configuring things and copying data from the previous server using an external enclosure for the hard disks, and it looked pretty much fine…

… until I tried to reboot the mini. It just stayed there, dead. Not responding to pings, not showing in the router, just dead. I wondered if that could be a problem with the firewire disk preventing ubuntu from completing the boot, but it sounded strange to me. I connected again a display and keyboard, rebooted and it worked again, which led me to believe that the mini wouldn’t boot without an attached display (i.e. headless).

Some more sources confirmed my suspicion, and this one had a solution which would trick the mini into believing there is a monitor connected. It involved paying a visit to maplin for buying a male VGA connector and soldering a resistor between pins 2 and 7, which I didn’t really feel like doing since it was 1 AM and even worse, it was cold outside!

I began searching in all our “boxes with cables and connectors” to see if I could find something useful and suddenly the salvation appeared before my eyes:

DVI to VGA

The mac mini’s DVI to VGA adapter!

But the articles and tutorials out there said to use a 75Ω resistor, and the lowest one I had handy was a 220Ω resistor. VGA voltage levels are 0.7V, and the way this hack works is that the computer will assume there’s a monitor connected if there’s some sort of connection between pins 2 and 7, which correspond to green video and green ground respectively. The worst that could happen was that it didn’t detect anything because the resistor ate too much of the 0.7V. So I decided to try this:

VGA trick

I shut down the mini, connected the strange device in place of the display, and turned it on again. After the characteristic mac TAAAAAA chord, I spent some seconds spent with my fingers crossed, and tried to connect via VNC to the mini from another machine. Guess what… it worked!

Afterwards, I covered the resistor with a piece of cellotape to prevent it from making any false contact, should any metallic stuff fall in that area (which shouldn’t happen anyway, but you never know).

And if this looks hacky, just look at the solution of these guys – they directly bridge the DVI pins with the resistor!

Finally, let me tell you this didn’t happen when booting the mini with Mac OS X. It looks like an evil strategy to keep people using Mac OS X – but I couldn’t trust Mac OS X with my home server. Not with its annoying obsession of updating iTunes and Quicktime every other week (approximately), amongst other fine features of Apple’s operating system.

15 Replies to “Mac mini as a headless server”

  1. What a beautiful macro photos 🙂

    Why didn’t you use your arduino to simulate a monitor plugged to your mac mini? XD

    This “feature” of not booting without a monitor must come from the son-of-a-bitch-guy-at-apple that always annoys me, I’m sure there is a guy paid only to bother users (Is a long theory of mine as a result of several “features” I’ve found on apple products).

  2. Well, the resistor came from the ‘arduino welcome pack’ anyway 😉

    Probably that guy is the one who decides when to update iTunes and how many additional extra megs will it have this month? 😀

  3. Hum hom. That would be interesting. I’m not too used to fedora terminology so the tutorial is slightly uphill, but I’ll give it a go. Thanks for the suggestion.

    Not sure how do you want the coffee being sent to you if you’re right 😉

  4. @Coby,

    I believe it has to do with Boot Camp & running legacy bios. Doesn’t work with other OS’s either. If you’ve replaced Mac OS, then yeah, you should be able to get it to run headless. If you’re running Boot Camp, this is the way to go.

  5. I run a 1.66Ghz Intel Mac Mini as my homeserver with FreeBSD. I use a similar resistor hack and it works perfectly well.

    Aside from one thing.

    It can’t reboot. I need to shut it down and boot again. This is annoying like hell, really, because it needs me to be physically near.

    I wish there was a solution to this…

    Oh, and I did not use Boot Camp, I replaced Mac OSX (Actually the old HD failed and there was no Mac OS on the new one at all).

  6. Wow, thanks so much for posting this. It worked like a charm!! I never ever would have figured this one out.

    well done.

  7. Has anyone tried this with a Mini DisplayPort to VGA Adaptor? I tried it on a Mac Mini with a 100 Ohm resistor, but it didn’t work… – any clues?

  8. Thanks!
    Worked like a charm on my Shuttle pc with a pentium M and some old intel chipset, finally I can use it as a server without having to have a monitor nearby in case of power failure.

  9. For all those with a Mac Mini utilizing a Mini DisplayPort, try shorting the other color pins. I initially started shorting pins 2-7 with a 100 Ohm resistor with no luck, but when I shorted pins 1-6 (the red pins), the system responded. Great post; success!

  10. Guys – does that mean if I completely replace OSX with Fedora and don’t use bootcamp i should be able to boot headless?

Comments are closed.