The Oyster

Meet the Oyster

Years ago I acquired a MacMini (Late 2014 Model).  For those who are not aware, a MacMini is a smaller form factor computer, roughly 8'' x 8'' x 2'' in size. This was the first computer I had that ran Mac OS, and it was a fun experience to learn another operating system. I'm not a huge fan of Apple products (caveat being that I own an iPhone), but being the technology enthusiast, I was excited to have a relatively new to me toy to play around with.  

I began using this MacMini as my daily driver. Mostly web browsing, listening to music, and chatting with friends. I really enjoyed the ability to use iMessage from my computer rather than my phone, though iMessage on Mac OS does not allow texting non-iMessage contacts. I even attempted to play some games on it, which did not go very far due to the limited resources. After all, this Mac Mini only has 4GB of memory, which is soldered to the board. In other words, the possibility to upgrade the memory was/is non-existent. The processor, a 4th gen i5, while not screamingly fast is surprisingly decent at nearly 10 years old.

A bit of a side note here: Years ago apple released the iBook laptop which was dubbed the "Clam Shell". With this nestled somewhere in the chasms of my memory, I had dubbed this Mac Mini "The Oyster". The idea being that Apple took the hardware in a laptop, ripped it out, and packaged it as it's self contained product. Feel free to connect the rest of the dots yourself, I make no claims to the logical or reason in my naming of inanimate objects.

After some time, this limited hardware coupled with a full featured modern operating system (Mac OS) left much to be desired by way of performance. After a few months of regular use, the Mac Mini became gruelingly slow. I continued to use it as a very sluggish music player until finally decommissioning it to the the graveyard that is a pile of old electronics.

Reemergence

About three years pass, and since then I've moved into a new place (along with a handful of other major life changes which I may post about on here in the future). After settling into my new place, I mounted a TV on the wall and connected my laptop to the TV. This worked for some time, but it also meant that my laptop was no longer a laptop, but rather a permanent fixture in my living room.  I could still remote into this laptop from my workstation, but that defeats the purpose of having a laptop doesn't it? On top of this, the power consumption of this laptop is relatively high for its purpose.

So I pondered for a while. After sorting through a few options in my mind, I remembered about the Mac Mini collecting dust in the bottom of my pile of unused technologies. Gave it a good wipe to get the dust off of it, and plugged it into my TV in lieu of the laptop. Sure enough after a couple minutes it booted up, and prompted me for login. "Not so bad", I thought (quite naively).

Upon logging in, I felt a rush of excitement come over me. Maybe it was the fact that I remembered my password on the first attempt (which is rare in a case like this), or that I had just opened a time capsule holding files, applications, images, documents, etc. from the past. It's always an interesting feeling to log into a computer that you have not touched in years.

He's Dead Jim

Apparently once you connect the Mac Mini to the internet, the entire thing becomes so sluggishly unusable. Retrospectively there were probably an cascade of updates waiting to for their turn to be installed on this device that's been offline for years. It turns out that some particular version of Mac OS was released that negatively affected the performance of these devices. I considered installing an older version of Mac OS. However I deemed this as a bad idea. While this would likely free up some resources and allow this device to become more performant, I would be fighting an uphill battle attempting to install software not intended for this older operating system, or worse installing older versions of software which creates the potential for security risks.

Maybe this was it. Time for Ole' Boy Oyster's Funeral Proceedings?

Algorithmic Influences

Maybe it was by pure happenstance, but (more likely a highly articulated algorithmic decision to present me with information related to what I've already been researching) I somehow came across InstallingDebianOn/Apple on the Debian Wiki. As I delved deeper into this topic I found evidence on the web of others on the same path as myself attempting to breath new life into their old Mac devices, discussing the compatibility of different distributions of Linux on Apple devices.

My preferred Linux distribution is Debian, however a recurring topic of discussion during my research was of hardware compatibility with different operating systems. In other words, the operating system doesn't always recognize the devices' electronic components, often rendering them inoperable. That said, I decided to go with Ubuntu Desktop as it seemed I may encounter less compatibility issues, but also because Ubuntu is essentially Debian with some extra packages preinstalled. Initially I had intended to use Ubuntu Server rather than Ubuntu Desktop as in the past, however this device's final purpose was unclear. Choosing Desktop gave me the option to run this as a headless server (without a keyboard, mouse, or monitor), as a desktop computer, or plug it into my TV to use as a media center.

Degenerate Disk

Upon launching Mac OS's Disk Utility application, which has a surprisingly pleasant user experience, I noticed that the Mac Mini has a 500 GB hard drive, and only about 50 GB are in use. Excellent! Just in case this project turns into a complete train wreck of a dumpster fire, I can partition the disk and leave the existing Mac OS install completely untouched.

"Just to be safe," I thought, "I'll shrink the current disk partition holding Mac OS down to 100 GB, leaving me with 400 GB remaining. Ubuntu will only need about 60 GB, but let's give it 100 GB for good measure, leaving a 300 GB partition to be cleverly named DATA. .. This is going swell"

Maybe I didn't think that. Maybe I said it out loud. Maybe from deep within the silicon and circuitry of this device a voice spoke, and said "syke!".

For roughly an hour, Disk Utility chugged along. I could hear the fans inside the Mac Mini fire up, so I knew it was doing something. One the screen though? "Checking fsroot tree" and the spinning wheel, Mac OS's indicator that the computer is working on something. Finally it moved on to "Shrinking Volume" which took significantly less time, and presented a progress bar in the form of numbers "0000030067442/500000000000". When I returned to the screen after several hours, I was presented with an Error message. It appeared to have successfully shrank the Mac OS partition from 500 GB to 100 GB, but did not create the two additional partitions. Over the next two days I attempted this 3 more times, which all resulted in the same outcome. Frustrated in the lack of movement on this project, I decided to put a pin in it.

Pondering

After some time spent ruminating, I had the epiphany that this really isn't as much of an issue as I perceived. While Disk Utility tool did not create the partitions I was hoping for, what it did do successfully was resize the partition in use by Mac OS. This is fine because the process of installing Ubuntu will include a disk partitioning step. In the door!

Up-creek, No Paddle

For context, the process of installing an operating system usually involves copying the contents of a disk image onto a small USB flash drive, and booting the computer from this USB flash drive rather than the internal storage drive.

This was not my experience. It came to my attention that during a recent move I had misplaced my small bin of USB flash drives. No big deal, the Mac Mini conveniently has a SD card slot. Now most of my SD cards are quite old, so initially I assumed I was just losing to the random number generator powers that control the universe, but after SD card 7, I figured it was time to call the SD card on the Mac Mini "broken".

A few more days passed and I began considering shifting gears towards another project. In the process of digging through my bin of technology and wires, I came across a USB to SATA adapter which allows you to plug a hard drive into a computer via USB, as an external storage device. The only hard drive I have that is not in use in a computer or holding some data that I have an attachment to, is a very slow but functional 4 terabyte hard drive.

If it works..

The Ubuntu documentation asks for somewhere between 2 Gigabytes and 8 Gigabytes of space on your installation medium (most commonly a USB flash drive). But there I was, plugging a 4tb hard drive into my laptop via USB, getting it ready to be used to install an operating system. It took significantly longer to flash than it would have with a usual 8 GB or even 16 GB flash drive, but this was due to the extra time the utility took to format the disk before writing.

After the laptop finished it's business preparing the installation medium, it was time for some action. I plugged the 4 terabyte hard drive into the mac mini, mashed down boot sequence keys with one hand, and crossed my fingers with the other. "It's doing something!" I thought to myself. The slowest 10 minutes of my life passed as I was presented with a grey spinning wheel on the screen. It boots up, and asks me for my Mac OS X login. Crap! something went wrong. Luckily this time the issue was trivial, and was resolved by throwing a new set of batteries in my wireless keyboard.

I gave it another shot, double checked that I have the right keys on the keyboard pressed in order for the Mac Mini to ask me which drive it should attempt to boot from, and was met with success!

I was prompted with the usual installation process, and with a bit of confusion about ambiguously named partitions, was able to complete the installation process in about an hour (including a few sanity breaks along the way).

It Breaths (kinda)

Alas, it works! At least, it boots up, and presents me with the desktop screen. All in a matter of a minute, which is groundbreaking compared to the 5-15 minutes Mac OS X took. "So It'll show me a desktop, okay.. what else can it do?" so as any reasonably sane human being would do to test the performance of their computer, I attempted to Rick Roll myself.

"Server Not Found". Huh? But there is clearly an Ethernet cable plugged into the device. I'm also fairly certain that the installation process connected to the internet to ask me to install some drivers. A couple reboots and some toying around with the network configurations later, I realized that the drivers installed for the Ethernet adapter did not work. WiFi as well was nowhere to be found on the device (often an indication that the device does not have wifi capabilities).

Now this is not an impassable obstacle, but it has definitely prevented me from moving forward in previous experiences. I thought about trying to find the correct drivers and use the 4 terabyte hard drive to copy them over to the mac mini, but installing critical software outside of a pacakge manager is usually not the best choice, as this makes updating the software a bit more complicated. Network drivers are also something worth keeping updated, for security reasons.

Everything is OK!

Now this might be a no brainer for many, but I was a quite impressed with my ingenuiety on this one. I know my iPhone has the capability to act as a "USB Modem". That is to say that with some convincing, I can plug my phone directly into my laptop via USB and utilize it as an internet connection. Essentially a Hot Spot ..but with a wire. With my windows computers, this was always a hassle to get working properly. I crossed my fingers (again), plugged my phone into the Mac Mini, and allowed the connection on my phone.

Zero friction. I don't know if this is a testament to the Open Source community and their support for drivers, or the interolarity of Apple devices (more likely the former), but within a couple seconds of plugging my phone into the Mac Mini, the internet connection was recognized and it began asking me if I'd like to install updates.

Updates can be installed later, first thing I needed to do was install the proper drivers for the ethernet adapter and wifi. A quick stack exchange search for "mac mini late 2014 ubuntu ethernet drivers" lead me to a few apt-get commands and before long I had the mac mini connected via wifi. I removed my phone from the equation, turned off wifi, and plugged in the ethernet cable. Connectivity established, internet was reachable, and it was time to Rick Roll myself.

A quick google search for "Rick Roll" and about 10 middle mouse clicks later (to open 10 the same tab 10 times), and aside from the audible sensory overload of Rick Astley perpetually cutting himself off, I noticed no significant issues in performance. Previously Mac OSX would allow maybe 3 or 4 tabs before making a lot of noise with its fans then becoming unusable.

Mission success. A breath of new life has entered this old device!

Now What?

Years ago I had 4 or 5 monitors on my desk depending on the season. These days I try to limit it down to 2 monitors and a laptop (and the perpetual pile of things that congregates on the outskirts of my desk). That being said, I decided to use this as a Headless device, that is to say it does not have a monitor, keyboard, or mouse plugged into it. There is a certain visual appeal to a device with just a power and ethernet cable plugged into it, but more practically, I'm just running out of desk space.

The Oyster, as I'll refer to it from now on, sits next to my router and modem now. I mostly access it via xrdp (a Windows Remote Desktop Protocol server) from my laptop or desktop. It took some convincing for the RDP session to work properly, and I'm sure how secure the connection is, but behind my local network that should not be an issue.

Foreward

I wrote this entry in long stints with some breaks in between. Initially I was unsure what I would use this device for, but I have since decided to use it as a development device for hobby projects. Previously I was using WSL (Windows Subsystem for Linux) as a solution for this, but due to the resource consumption of WSL it must remain plugged into a power source to use for extended periods of time.

Something Positive

What I did not realize while starting this project was that segmenting my developmental work onto this device makes it easier to approach new and existing projects. Removing the usual distractions and clutter from my workspace is a much appreciated change from my usual mode of operation.

Show Comments