While it’s easy to install a GNU/Linux operating system on your machine, and opt for full disk encryption during that installation process, it can be a little trickier if you want to add a second encrypted disk to your system and have that automatically unlock on start-up.

Fortunately, it’s not too much harder. This guide just focuses on decrypting the partition and mounting it somewhere. If you’re interested in setting up an encrypted partition, you’re probably just best off Googling it 🙂

Let’s get started.

Let’s say your partition is /dev/sda1.  Firstly, create a key that only root can read.

$ sudo bash

# cd /root

# dd if=/dev/urandom of=sda1keyfile bs=1024 count=4

# chmod 400 sda1keyfile

Now, you need to add this key file as a passphrase to your encrypted disk.  This key will live in a slot, which there are eight of in total.  You will be prompted to enter your passphrase that your originally supplied when creating the partition:

# cryptsetup -v luksAddKey /dev/sda1 sda1keyfile
Enter any passphrase:

Once entered, you will see something like this:

Key slot 0 unlocked.
Key slot 1 created.
Command successful.

Now, you need to locate the disk using a way that will always be recognised by the system, even if disks change positions and /dev/sd* entries remap.  The safest way is to use the UUID of the partition.

This one-liner will probably get you the right answer (be sure to change the disk id):

ls -l /dev/disk/by-uuid/ | grep sda1 | awk ' {print $9;}'

This should give you something looking like this:


You then want to tell the system to unlock this disk on boot. How to do this? Well, the file /etc/crypttab is all you need to know!

The field order is like this:

NamePathUnlock credentialOptions

Just save the file and you’re nearly ready. Device Mapper (dm) will read this file on boot up, and attempt to unlock the encrypted partition using the supplied key.

The last part of this process is to automatically mount this decrypted partition. For that, you’ll need to visit /etc/fstab. Enter a line similar to the following, making adjustments for your environment:

/dev/mapper/mycryptdisk /mnt/mydata ext4 defaults,discard 0 2

There you have it. You should now be able to access your encrypted volume automatically on boot up, and not rely on a desktop environment like GNOME to help you unlock it with a passphrase in your keyring.

I’ve ordered a machine to replace my Macbook Pro in the office: Dell Precision T3500 Xeon W3540 2.66GHz w/12GB  🙂

Great performance at 1/10th the cost?! What the Dell?!

I have been suffering as a would-be Mac user for the best part of 10 months now, on and off.  It’s been a painful experience, physically and mentally.  I was only going to post a short “microblog” post and be done with this topic, but I felt the need to expand upon my decision to do this.

Perhaps it will help dissuade potential future purchasers of Apple‘s overpriced, underwhelming and non-expandable machines.  I hope it does, as one of the worst problems we create for ourselves in the 21st century is planned obsolescence – something, arguably, which Apple is guilty of.


In my day job as managing director (CEO) of a UK web development & cloud hosting business, I – predictably – develop websites and administer servers.  I’m the kind of guy who likes to keep his hands dirty, and my skills up.

Like many other people running a small business, my daily activities can vary rapidly.  A computer which is good at switching quickly is a boon.  Actually, it’s a frikkin’ necessity.  Yet my core activity – PHP & JavaScript development, rely on a few basic things.

Very basic things, in fact.

Very Basic Things I continue to rely upon, to get work done:

  • A keyboard with sufficient key travel, tactile feedback;
  • A keyboard that broadly adheres to the standard PC 105-key layout (with or without a numeric keypad).  This means:
    • Not putting CTRL (Control) in a stupid place.
    • Not putting ALT (Option) in an equally stupid place.
    • Not having a ⌘ (“Command”) key full-stop.  It’s a redundant modifier.
  • Having an operating system that gets out of my way.
  • Having a computer fast enough to run an operating system that gets out of my way.
  • Seeing the SMART status of connected drives.
  • Confidence in the device’s security.
  • Confidence in its ability to stay cool when working hard for long periods.
  • A system-native text editor that doesn’t refuse to edit the files I tell it to!
  • Expandability.

For me, the Macbook Pro fails in all of the above.

Appeasing Mac fans & celebrating the good stuff

In April 2016, I bought this “Early 2015” Macbook Pro.  It has a Core i5 5257U processor, 8GB RAM and 256GB PCIe SSD.  When I mentioned to fellow designers I bought this, it was met with a knowing smile and the instant acknowledgement, “ahh wow, the SSD in those machines makes them so fast!”.  I also, regretfully, bought a 27″ Thunderbolt display.  The total cost of these two: a few pence short of £2,100.  Two-thousand, one-hundred pounds for an average-spec 2015 laptop and 27-inch QHD monitor.

Fast is something I have never, ever considered a Mac to be, and especially this MBP.  It booted quick, sure, but in general use… nah.  Really, no.  But I’m not in the habit of upsetting people, so more often than not I’d reply with some kind of non-opinionated remark like, “yeah?  Right… I look forward to seeing that”.  I’d argue, though, that the apparent lack of speed is much more to do with the operating system than the hardware.

This isn’t an Apple-bashing post.  It’s just an expression of my preference.  Yet there are things I really do like about the MBP:

  • Ambient light-sensitive backlit keyboard – very classy
  • A 3:2 ratio screen.  Apple has the right idea here, and the rest of the world is stupid for putting widescreen displays in productivity laptops. Stupid.  Well done Apple.
  • Build quality is really excellent.  If you like computers because they can be built well, I guess you may already have a Mac. 😉
  • Key spacing & travel.  You’re probably thinking, “but you just said…”.  More on this in a sec.
  • The port selection, while not excellent, still rocks more than on a MBP 2016 (like, duh!)
  • The 13″ retina display
  • The laptop’s general weight, shape, size and physical feel.  It’s solid, if a little cold to the touch sometimes.

Talking KJeyboards…

I am typiubg this post on Apple’s “Magic Keyboard 2”.  This section, including heading, is intentionally left with all the typos in as I make them.  Why?  Because the MAgic Ketword 2 is uterly crap compared to the keyvoard on the MBP itself.  It pales in comparison in terms of typing experience.  I would strongly recommend against anyone buying it, unless it’s vital to you to have a mininalist desk you can take photos of and swoon over all day.  I spend hours of wasted time correcting typos that occur as a direct resylt of using this keyvoard.

By comparison, I was really quite glad how usable the keyboard on the MBO really is.  ITs typing experience, much to my genuine surprisem ws excellent.  The key travel is good abd the spacing between keys works really well.  Although chiclet in style, with slightly rteduced key sizes compared to, say, an old school LEnobo Thinkpad (like my old T420), it’s so much more intuitive to use than the Magix Keyboard 2 that I shall no longer labvout the point and just move on.

The Problem with using a Mac:  Mac OS / OS X / macos

2015 Retina Macbook Pro
My 2015 rMBP. The current work machine.

macos is stupid and has been out-developed by GNU+Linux and the GNOME free software project.  Strong statement, huh?  Here’s a few reasons why.

  • macos requires two keys for Mission Control and Launchpad.   You cannot view open windows and search for an application in the same mode.  In contrast, GNOME provides an overview by pressing the Super (Windows) key to see open windows, and accepts text search for launching a new app immediately.
  • macos doesn’t support writing to NTFS partitions.  Or writing to any Extended File System (EXT2,3,4), or other UNIX-based file systems.
  • macos’ Finder doesn’t handle SFTP connections to remote servers.
  • macos Finder supports the file operation ‘Move’ across file systems only through the undocumented keystroke, Shift-Command-V.  Why is this undocumented (or at least so hard to find in the documentation)?!
  • macos doesn’t do workspaces / virtual desktops as well as GNOME.  No other OS does.  GNOME uses the extra horizontal width to manage a vertical list of workspaces.  It’s totally logical and fluid in use, if unconventional.  But then, one has to “Think Different” to get on with unconventional.
  • macos doesn’t open an application in the workspace in which it was launched.  It seems to “remember” the last-used workspace in which the application was opened, which is pretty stupid when a second display is connected.
  • macos doesn’t support focus under the pointer.  When you move the pointer over another window, the previous window is still active.  Clicking, say on a button on the inactive window, first activates the window.  You then have to click on the button again in order to perform the expected action.  Again, serious inefficiencies when done multiple times per day.
  • Some macos keyboard shortcuts, relying on Cmd, really suck.  Here’s an example:
    Copying (Cmd-C) on a Mac. Note the awkward, cramp-inducing hand-crunch.
    Copying (Ctrl-C) on a PC. Possible without contortions.
  • Like other proprietary operating systems, macos includes features that are not wanted (Siri?! Siri-ously..?) or installed as standard (i.e. bloatware) that have no place on a business machine, Garageband being one example.
  • The list could go on, and on, and on…   [ EDIT 15 Feb 2017 ]  and it will!
  • Open a Finder window and the icons are not automatically sorted.  There is no general sorting setting, so each folder must have a “Arrange by” setting applied.
  • Copy a file from one Finder window and Paste into another.  The new file doesn’t appear in the destination Finder window.  That’s ok, just refresh the window’s contents…. except you can’t refresh a Finder window’s contents (amazing design decision there)!  And why does the file not even appear in the folder you’ve just pasted it into?!

But the most important thing is that GNU+Linux and GNOME (or really any other free software desktop environment) is so much better.  At least for someone like me, working with remote servers, or SSH sessions in a terminal, or doing lots of text editing.

What’s in a saying?

Here is a phrase you may have heard somewhen:

  • Choose an occupation you love, and you will never work a day in your life

I believe this is true.  I love my occupation and I am so privileged that people pay me to do it.   When I get into the office, I cherish that feeling of biting off more than I can possibly chew, and working the problem towards a solution.

In the business, we make every effort to deliver the highest quality at the lowest possible cost.  However, in web design, development and hosting, there are quite a number of significant costs to meet while trying to keep the end price reasonable.  One such cost is test equipment.

Another cost is time; a hidden cost if, as a developer, you are always fighting your equipment in order to achieve a comfortable, efficient workflow.  Using a Mac, while semi-enjoyable, also taught me just how efficient I had become using GNU+Linux to deliver results to clients.  I can’t imagine a more fluid workflow than Emacs, Chrome and GNOME.

Looks are nothing

So, to the new (old) machine, which will be with me tomorrow.  For the enormous sum of £179.99 + VAT and delivery (£9.99), I am getting:

  • T3500 Workstation
  • Windows 10 Pro 64-bit (this will be kept on the HDD for testing purposes)
  • Intel Xeon W3520 2.66GHz (4 Cores / 8 Threads)
  • 12GB RAM
  • 500GB SATA drive
  • DVD-RW
  • 512MB NVIDIA Quadro FX 580

There are a few discussions online about the merits of this workstation, and I’m glad I opted for one instead of a new laptop to supplant the MBP.  The Xeon 3520 processor is not new by any stretch of the imagination.  It’s 8 years old.  But it’s still capable enough by far and comparable to a core i7 920; a processor we still have in use in a server at Warp.

But let’s focus instead on someone else’s video, which is a nice way to tail off…


Screenshot of GNOME 3 desktop.

After all these years, I can still find no better development environment than GNOME 3, Emacs and Rhythmbox.

A 100% functional desktop environment, that’s way more flexible than macOS or Windows, more secure, more resource-efficient, faster, cleaner, less obtrusive, quicker to navigate, more economic keyboard shortcuts to navigate, and (IMHO) better on the eye too.

Which all matters when you spend whole days looking at code.

This is a confession of a new Mac user, seeking absolution.

I have a Mac.  It’s for work.  Unfortunately, I finally came to realise that I cannot reasonably develop web apps to work on iOS and macOS without having access to those platforms for testing.  I feel I’ve done exceptionally well to avoid this reality for many years and plough on with the Linux desktop, but building a VM Hackintosh without a proper software license is against my morals and, indeed, the law.

Would I have bought a Mac for personal use?  Of course not.  There’s no need; I have been a (more-or-less) happy GNU/Linux user for 15+ years.  The Linux desktop has provided me with everything I need from a computer, and I’ve enjoyed the reliability of open source software.  And I will continue to be a GNU/Linux user.

I <3 Linux

But … one thing about Linux that is, occasionally, frustrating is the complexity of software.  I don’t mean that its typical user software is difficult or overwhelming in Linux.  Instead, it’s that there is never the ‘best’ way to do things in Linux; there are multiple, ‘reasonable’ ways.  It’s this lack of ‘purity’ about the desktop experience which sometimes confounds newbies, and turns some people off.

Tux, the cartoon penguin.
Tux: the mascot of Linux. Does any other modern OS even have a mascot?

From my admittedly limited experience, it seems that people prefer to learn one way to do things and to stick to that way.  With all the desktop environment options in Linux, there is no ‘one way’.  This is why each platform has its advocates and evangelists, whether it’s Windows, macOS or GNU/Linux.

I feel like I have been spoilt with GNU/Linux, and especially with GNOME 3.  To me, there is no better desktop environment than GNOME 3, despite having moments of hair-pulling frustration at it, from time to time.  But GNOME 3 is a beautiful desktop: it’s clean and minimalist, its default file system application, Nautilus is more functional than the Mac’s Finder, its handling of multiple workspaces (where Linux is constantly superior) and navigation across those workspaces is much more fluid and natural, and so on.

There are political, social and technical issues with GNOME development and the whole GNU/Linux system at large (let’s not mention systemd here), but if you were to ignore those factors and introduce somebody to ‘the Linux desktop’, I would argue that GNOME 3 (and Cinnamon too, for that matter) present a beautiful interface to enjoy and work in.  It’s not perfect, and can be problematic too at times, but it’s flexible and open.

The Problems with a Mac

That was a very long-winded introduction, but I felt it necessary to establish my position, before I talk about the Mac.

Macbook Pro 2015
Ladies and Gentlemen: The 2015 Macbook Pro. A really expensive laptop, considering the spec.

The problem I have is this: I want to love the Mac, but I don’t.  Sometimes, especially in business, you feel you need a commercial product simply because it helps you fit into the world around you. And, when a computer costs you a significant amount of hard-earned cash, it’s got to be something you want.  Sadly, I didn’t want this.  It was simply a necessity for me to continue doing what I do to earn a living.  Therefore, it felt ‘forced’ rather than chosen, or desired.

When you identify with a philosophy, such as I have with the guiding principles of free/libre open source software, you develop a mindset.  You become attached to the tools and methodology deriving from that philosophy.  It becomes incredibly frustrating when things that were easy on Linux become hard on anything else.  You wonder why people put up with all these obstructions to productivity…

Obstructions to productivity

Let’s look at a few of these.  As a software developer, sysadmin, business person and general user (who is used to the layout of a standard UK PC keyboard), I ran into several problems switching over to a Mac:

'3' key on Mac keyboard.
Having a less-accessible hash key on a keyboard is challenging, especially for coding.
  • The hash (pound) key.  The hash symbol is used extensively in a UNIX environment to comment out sections of software code for reference purposes.  On a UK PC keyboard, this symbol is located on its own key to the right of the keyboard; on a Mac, this is located on the ‘3’ key; you have to use a modified key (the option / alt key) to access it.  This is a barrier to productivity, although perhaps due to muscle memory and old habits.  The position of the @ symbol (on the ‘2’ key) is also annoying.
  • Finder: no SFTP support!  As someone who needs to upload files to web servers quite often, it’s stunned me that a well-established UNIX-based OS like macOS doesn’t support this transfer method ‘out of the box’.  One has to resort to a third-party program.
  • Finder: no Cut?!  Apple have a strange approach to doing some things, especially considering their claimed print-based heritage (recall Steve Jobs telling a university that Apple focused so much on typography…?).  Take Cut and Paste.  Cut (not Copy) and Paste is a relic from the printing press age, where articles in layouts would literally be cut and pasted into position.Unlike all other decent file managers, Cut has no place in Finder on a Mac.  Only Copy does.  Except… Copy works like Cut when the source and destination locations of a file are on the same filesystem. In this situation, Copy moves the file (Cut-Paste).  But, if the source location is on one filesystem, and the destination on another, the file is Copied (Copy-Paste).  This is totally inconsistent and confusing, resulting in two copies of the same file – sometimes
  • Finder (again): no option to show hidden files.  Yup.  As a GNU/Linux user, you take this stuff for granted.  This preferences option (or hitting CTRL-H) in GNOME is a lesson to Apple:

    GNOME's Files application preferences
    How to hide or show hidden (dot-)files, e.g. .config.
  • Disk formatting: not enough filesystem support.  A typical vendor lock-in situation, where the OS vendor totally fails to provide sufficient flexibility with regard to mounting ‘foreign’ file systems.  It’s a complete joke that Tim Cook, CEO of Apple, would refer to Chromebooks as ‘test machines’, when in fact they are more flexible for mounting external devices than a Macbook ‘Pro’.
  • Disks – no S.M.A.R.T. support on external USB drives.  This is inexcusable.  Not being able to see an external drive’s S.M.A.R.T. status, especially when that drive might be used for your time machine backups, is akin to gross incompetence.  Other operating systems do this; Apple not doing this is a bad joke.
  • Time machine: scheduling not flexible enough.  I want daily backups, not hourly.  Where’s the option to change this?
  • Text editing and stupid modifier key behaviour.  On a PC, to select a word at a time you would hold down CTRL+Shift and then arrow left (or right) to select a word.  Press the arrow key again to select the second word.  Then, to Cut or Copy on the PC, you would keep CTRL held down, release Shift and press X or C, respectively.  Not on a Mac.  The process of keyboard-based word selection on a Mac is to hold down ‘Option / Alt’+Shift, arrow left or right to select a word at a time, then release all modifier keys, then press and hold Command and then press X or C respectively.
  • Workspace / Desktop management is less efficient than GNOME 3.  Linux desktops pioneered virtual desktops / workspaces, with Windows and Mac OS (X) following suit.  In GNOME 3, workspaces are created and destroyed dynamically, and can be navigated to efficiently using the keyboard (not like on the Mac, where you have to use a three-finger swipe on a trackpad, or the Mission Control key and a mouse).  macOS doesn’t destroy unused desktops automatically, leaving visual clutter.
    macOS mission control
    Why not just get rid of that unused desktop/workspace?!  Compare GNOME 3, below.


  • A pure split-window session is unnecessarily modal.  In macOS, you cannot easily create a left-right split of windows that take up all available screen real-estate, without forcing those windows into full-screen modality.  Forcing anything is bad, mmm’kay?  Again, compare GNOME 3.

Migrating for good?

So, the question remains, is there enough goodness left in macOS to entice me to migrate over for good?

Are you kidding?!

Less productivity, less freedom, some bizarre defaults, some frustrating impediments to productivity and all backed by a ‘can do no wrong’ philosophy mean that Apple’s products will stay strictly off my shopping list commercially and personally for the foreseeable future.

I won’t be selling my ThinkPad T420.  No way, José!  But at least I can now do iOS and macOS testing for web apps and site layouts.  In that vein, Apple makes great test machines!

And I think I have absolved myself 🙂