Boot into Linux

Get some sort of system booted

Most Linux installations contain a live version that can boot from USB. I was trying to install Debian, so I used their bootable USB image. All you need is some sort of Linux command line that has corretly mounted /sys, /proc and other system partitions. You will also need it to contain the efibootmgr utility.

Check everything is mounted

In addition to the usual Linux partitions and virtual filesystems, you will need the efivarfs (NOT efivars, there’s an ‘f’ in there!) filesystem mounting too, to prevent errors later on.

mount -t efivarfs efivarfs /sys/firmware/efi/efivars

In Windows

This can also be done in Windows by typing this

mountvol b: /s

This will create a B: drive that is the contents of the EFI partition.