Installing Debian 11 on a Microsoft Surface Go: secure boot, mokutil, Wi-Fi, and libinih1

I’m still in search of a Linux-based replacement for my iPad. The PineTab is interesting, but slow, and I have more work to do there.

I found a Microsoft Surface Go at what I felt was a very reasonable price, particularly since it came with a genuine Microsoft pen.

This particular Surface Go has the same specs as the Surface Pro 6 I am using as my day-to-day machine, but in a smaller footprint, so I felt it was worth a try as an iPad replacement.

At £170 delivered, it felt like a worthwhile gamble.

Getting Debian 11 running on it was more of a pain than I had anticipated, even though others have done all the hard work, so I thought it would be worth jotting down a few notes.

Installing from a USB stick with a USB hub: ports mattered

I spent a long time trying to get the machine booting from USB. That’s probably because I had a USB-A memory stick, and the Surface Go has only a single USB port, and it is USB-C.

I have a USB-C hub, which offers USB-A ports, but I did not realise that it would only boot from USB if I put the USB stick in the first USB port. Any of the others, and it would not see it to boot from it.

Whether it’s just a cheap USB hub, or something common, I am not sure, but it took me a while to think about trying different ports in the hub.

I have added this to the Surface Go device page on the linux-surface wiki in case it trips up others too.

Using the Debian non-free DVD installer

You are not going to get the Wi-Fi adapter working during the installation, so you’ll need the 4ish GB DVD installer image.

When prompted for network interface firmware, ignore this, and proceed with the installation from the USB stick.

Getting Wi-Fi working

Here. I used a USB stick to transfer the firmware-atheros and board-2.bin files across.

I rebooted and, bingo, Wi-Fi is working.

Getting linux-surface working

Normally, getting linux-surface working is easy, by following the instructions on the wiki.

Today, on the Surface Go, it was tougher.

Missing libinih1

For some reason - not sure why - it failed because it could not install libinih1.

However, libinih1 is available directly from Debian, and downloading the .deb and installing it via dpkg worked fine.

After that, the linux-surface installation worked.

Secure boot

I had quite a fight to get secure boot working, and I’m not sure why.

I am pretty confident I followed the instructions correctly, but I got into a state where I could only boot the device if I had secure boot disabled.

So I assume I got something wrong.

After seemingly messing it up, the machine would hang very early in the boot process, with the Microsoft logo on screen, and what looked like an underscore in the top left hand corner.

Disabling secure boot allowed me to progress to entering my LUKS passphrase. To do this, it’s:

But I removed linux-surface-secureboot-mok, rebooted, removed the key from the MOK configuration utility, rebooted, and tried again.

I then reinstalled linux-surface-secureboot-mok and rebooted, to complete the enrolment process.

After that, I enabled Secure Boot in the UEFI.

It enabled, but booted with a message “Booting in insecure mode”.

I checked with mokutil --sb-state, and it showed the secure boot was enabled, but that validation was not.

So I used mokutil --enable-validation to fix that.