Dual Booting Ubuntu and Windows on Surface Pro 3

2015-03-03 00:00:00 +0000

Dual Booting Ubuntu and Windows on Surface Pro 3

As part of my PhD I was generously given a brand new Microsoft Surface Pro 3. Unfortunately, as I have been an Ubuntu user for the better part of a decade, using Windows again was a less than optimal experience. Having read many blog posts about the Surface 3 hardware not being supported by the current Ubuntu kernel I resolved to wait and battle on with Windows 8.1. However, after a sever bout of yak shaving I managed to get the latest 15.04 beta 2 working (mostly).

Back the hell up!

Before you attempt this with your own shiney Surface Pro 3 (SP3) I highly, strongly, emphatically recommend that you grab a 8Gb USB thumb drive and make a Windows recovery disk (via Search > “Create a recovery drive”). The SP3 does have its own recovery partition, however to get the dual boot working you are going to be messing with partition tables and it is a really good idea to have a stand alone recovery option in case everything goes to hell. Also, as always, back up your personal files. They should be safe with the repartitioning, but you never know. You have been warned!

Get bootin’

I set up the dual boot by following this very informative, and well illustrated, blog post from David Elner. However, there were a few key differences.

  1. I used the latest 15.04 Beta 2 build of Ubuntu Gnome instead of the the vanilla 14.10 Ubuntu David used. 15.04 is based on on the 3.18 kernel and was hoping this would provide some performance improvements. I prefer Gnome as a desktop environment and it also has multi-touch features for tablets. This is just a preference and when Ubuntu Touch is released for general hardware that may take over as the default.
  2. I did not install the wifi and keyboard drivers as the ones David used were designed for the 3.17 kernel. However, I found that with 15.04 the wifi and keyboard are working fine. The touch pad doesn’t work but as it is possibly the worst touch pad I have ever used I didn’t see that as much of an issue.
  3. I did not install rEFInd or mess about with any of the EFI signing. It is not required to make the dual boot work and I am fine with the red screen of doom that awaits any sole who dares disable secure boot!
  4. I changed the default boot OS in grub so that if I boot the SP3 without a keyboard attached it will boot into Windows. This is because, at the moment, Gnomes tablet support is a bit basic (but it will be getting better).

The end result

So after all of the above I have working Ubuntu install on my SP3:

So that’s it. Other users have reported fun and games with Windows overwriting grub and have resorted to putting their boot partition on an MicroSD card. I haven’t had this problem yet but it is early days. In the near future I will attempt to run the latest mainline kernel builds (3.19 and 4.0) to see if they get the touchpad working, but at the moment I am very happy with the outcome and my SP3 is now a viable work computer (even if it is still a bit of a toasterfridge)

Installing Microsoft Azure Command Line Tools on Ubuntu

2014-12-01 00:00:00 +0000

Install Microsoft Azure tools on Ubuntu 14.04

As part of my MRes I am using Microsoft’s Azure cloud platform. I was pleasantly surprised to see that Microsoft provide Linux support for Azure and SDK’s for a lot of programming languages. However I hit a few bumps getting the command line tools installed due to some quirks with Ubuntu.

The easiest way to get the Azure CLI is to use the Node.js package manager npm:

$ sudo apt-get install nodejs
$ sudo apt-get install npm

This should all work fine and then you can simply install the Azure CLI using the command below:

$ npm install azure-cli -g

Now on other Linux distros this may work fine. However on Ubuntu 14.04 there was an issue due to the fact that Azure CLI calls Node.js using the node command and on Ubuntu it is called nodejs. As a result you get the error below when you call azure:

/usr/bin/env: node: No such file or directory

To fix this, use the command below to tell Ubuntu that when any program calls node it really means nodejs:

$ sudo update-alternatives --install /usr/bin/node nodejs /usr/bin/nodejs 100

You should now be able to call azure and all its functions!

EuroVision Sweepstakes Python Application

2014-05-11 00:00:00 +0000

EuroVision Sweepstake Python Application

Every year I use the great sonic festival that is EuroVision as an excuse to get my friends together and have a laugh. In an effort to make things more interesting I run a sweepstake, every one chips in a few pounds and the countries in the final are divided evenly between the group, with whoever was allotted the winning country taking home the pot.

The allocation of countries originally took the form of the tried and tested “paper in a hat” method. However, now that I am computer science student, I thought there must be a way to do this more efficiently. Also my printer is broken and I didn’t want to write all the counties on a piece of paper. I had been looking for an excuse to learn Python and web frameworks so put together a simple application that assigns countries from the EuroVision Final to a list of user supplied people. This currently uses Flask as the web framework to make a simple web interface that people on the local network can log onto and see which countries they have been assigned. It is open source and up on Github.

Some features I want to add in the future are:

If anyone wants to contribute I would be very grateful!