Booting Kubuntu on a Surface Pro: Success

 History:

I bought a Surface Pro in 2013 for ~$1400 mainly because of the touchscreen. Was told when I bought it it had a ~8hour battery life. I wish! I wanted to return it but didn’t. As a laptop it’s basically unusable: the battery life is terrible and the placement and operation of the power button makes it too easy to turn it on whilst in a bag. Instead I’ve plugged it into a external screen and a powered USB hub with separate keyboard and mouse. I turn off the surface’s screen and just use the second monitor. In this configuration it works quite well. Aside from the battery life – which is enough to take the surface to the nearby printer and back – my main complaint is the 128Gb storage.

I played around with dual booting two or so years ago and I got Ubuntu up and running. It was booting fine but after a Windows update Ubuntu stopped booting.

Eventually I decided to ditch Windows and go full GNU/Linux on the Surface Pro.

Aim:

To single boot *ubuntu on a Surface Pro.

Method:

Make live USB and install Ubuntu (or Ubuntu Studio) as primary OS overwriting windows. Later use VMware to run Windows (10?) for programs I need Windows for.

Results:

Installation went fine. On reboot the Surface Pro only booted into tpm settings black screen. Could boot from a live USB if one was inserted. Couldn’t work out how to boot Ubuntu from the hard drive. At this point I thought I might have broken my machine, the only thing I could boot was a liveUSB.

Since I didn’t have a Surface Pro recovery disk there wasn’t much I could do. I went online and on the microsoft website I found a recovery image. The problem was that the download link was behind a login and the download kept getting an error part way through. It was about 7Gb and there was no way I could see to resume the download. I must have tried 7 or 8 times to download that file. Late one night I decided to have another go and managed to successfully download the Surface Pro recovery drive file. From there I copied the recovery files to a USB and used that to reinstall windows. Bye bye gnu/linux!

I got busy setting up Windows again so I could make some music using Maschine and Ableton Live. I still wanted to try gnu/linux again though. Partitioned c:\ to make room for Ubuntu. Installed Ubuntu using new partition creating a swap partition at the same time. Installed efi to /dev/sda2.

Ubuntu wouldn’t boot though! :sadface:

Tried reinstalling: no dice.

Tried rebooting into the troubleshooting mode and booting from ubuntu but no luck.

Not really wanting to mess around with boot partitions I left it there and searched for a workaround.

Eventually I came across easyUEFI and late one night I tried altering the boot order. I also tried mounting the EFI partition and making sure the grubx64.efi file was there (it was there in a ubuntu directory).

After a  lot of searching online I decided the next step was to try boot-repair. I booted into the live USB disk and ran kubuntu off the USB. I installed boot-repair and ran it but on finishing it said the efi parition (/dev/sda2) was locked. As per online suggestions I made sure it was unmounted which didn’t seem to help. Same error message. Eventually I followed boot-repair’s suggestion and created a new efi partition (200mb FAT32) with a boot flag. I put it as early as I could which was at the end of my ~80Gb windows partition I didn’t want to mess with the first two partitions (the first one was labelled a recovery drive ~1Gb and the next was /dev/sda2 the EFI partition). Ubuntu had definitely installed stuff on //dev/sda2/ as there was a ubuntu folder.

I ran boot-repair telling it to look for the efi bootloader on the newly created /dev/sda9, but I got the same error message.

Eventually I gave in and tried rEFInd which I saw mentioned somewhere. I booted into the kubuntu live usb and installed rEFInd after mounting /dev/sda2 as /boot/efi. It installed. I rebooted and was left with a bunch of boot options! Looks good! I chose one of the first ubuntu partitons and it booted!

The instructions that worked for me:

First boot into a live OS.

$ sudo mkdir -p /boot/efi
$ sudo mount /dev/sdXN /boot/efi

where sdXN is your efi partition, eg sda2 in my case. If you don’t know the values of X and N for your system then fire up gparted and look for the partition with a boot flag.

$ sudo apt-add-repository ppa:rodsmith/refind
$ sudo apt-get update
$ sudo apt-get install refind
$ reboot

Future Plans:

I’m going to investigate whether I can run (at a reasonable speed) Maschine and Ableton Live in a Windows 10 virtual machine using VMware Workstation Player 12. If I can then I can get rid of my Windows install and just use VMware under Kubuntu.

tl:dr

Tried installing Ubuntu on a Surface Pro. Install worked but Ubuntu wouldn’t boot. Using liveUSB I installed rEFInd as per these instructions: . On reboot I could boot to Kubuntu.

Advertisements
Booting Kubuntu on a Surface Pro: Success