Surface device perfect installation Linux/Archlinux dual system tutorial
I. Introduction
The blogger is a student of the School of Accounting, because he often runs around with his computer on his back. Considering that he is not that strong, he started with a surface laptop. Then I often use Linux in the learning process. It is not convenient to use a virtual machine for a long time, so I tried to install dual systems. After a long time, I took a lot of detours. In the end, it was perfectly done, so I recorded It is convenient for later generations.
note
The perfect installation of the title refers to that the dual system can be booted normally in the Secureboot mode , that is, it does not cause any impact on Windows , and Linux devices can be driven normally .
Secureboot only allows trusted systems to start on the Surface. Installing non-windows systems will not start directly. Turning off Secureboot will make Windows hello unavailable. Later in this article we will talk about how to boot dual systems normally with Secureboot mode turned on.
2. Preparation
External devices
- A U disk (not less than 8G)
- An external keyboard (wired is recommended, some systems may not use Bluetooth at the beginning)
The need for an external keyboard is because the built-in keyboard cannot be used due to driver problems during the linux installation process, and an external keyboard needs to be used for setting
Download image (iso)
This article takes UBUNTUDDE REMIX 20.10 as an example (the blogger is Yankong). The installation steps of these systems are similar.
You can download the mirror image from the official website of the corresponding system or the mirror station. Here, I recommend the mirror station of Tsinghua University.
Click the get link pointed by the arrow to select the corresponding version to download.
Make U Disk Boot Disk
- Download production tool: Rufus ( click me to download from the official website ), no need to install after download
- Open the download Rufus, see the following interface, insert the U disk prepared in advance
- Click the select button, find the good mirror image downloaded in advance, that is, the iso file, click open
- After finishing, keep the default options without changing them, click the Start button, if a pop-up window appears, keep the default selections, just continue to the next step, and you will know to start writing.
- The writing process will probably last a few minutes, please wait patiently~
At this point, the boot disk is made!
Allocate hard disk space for Linux/Archlinux
It is recommended that you do this step in advance to avoid various problems~
- Mouse Right Start icon (that is, under the Windows icon ), click Disk Management
- You can enter the following interface
- Find the target disk where you want to install ubuntu, select it, right click, select compressed volume, enter the amount of space you want to allocate, it is recommended that it be no less than 50GB
- After the compression is completed, you can get an unallocated space, because I allocated it in advance, so you can see the figure in step 2.
Three, install Linux/Archlinux
Turn off Secureboot
The role of secureboot was mentioned earlier. Fedora and Debian/Ubuntu both support Secureboot, but Arch does not.
But because we need to replace the linux kernel later , it will lead to the failure to boot safely, so here we all turn off Secureboot first .
- Choose to restart the computer , wait for the shutdown , long press the volume up , which is F5
- Wait for the computer to enter UEFI , the interface shown below
- Select security , you can see Secure boot , click change configuration below , select none in the expanded item , and then OK
- Then click boot configuration , you can see that the first one is the Windows startup item, drag the USB configuration to the first item by hand
- When finished, click Exit , click reboot to
Official installation
The installation of Linux/Archlinux on Surface is no different from other devices. Here is a brief introduction with ubuntu as an example. You can also refer to other more detailed tutorials and skip this step.
- After restarting in the previous step, you will enter the following interface, you can keep the default options, just wait to enter
- Wait for the system to check the disk and enter the boot interface after completion
- Click to run the installer and follow the prompts
- After the partitioning step, if you want to install dual systems, you must choose manual partitioning. For specific partitioning, please refer to other posts. Here is an example ( partition reference )
- After setting the user name and password, choose to restart the computer and follow the prompts to unplug the U disk
So far, linux has been installed on your surface device~
Fourth, install the Surface driver
The driver that comes with ubuntu is not compatible with Surface hardware, so many hardware cannot be used, such as keyboards, touch screens, etc., we are now installing a third-party kernel
For details on the hardware available for each Surface device, you can check here , basically the camera can’t be used
Due to the differences between Linux and Achlinux , the installation process of the drivers on different versions are introduced below .
Debian/Ubuntu driver
- First, import the key used to sign the package
wget -qO - https://raw.githubusercontent.com/linux-surface/linux-surface/master/pkg/keys/surface.asc \
| gpg --dearmor | sudo dd of=/etc/apt/trusted.gpg.d/linux-surface.gpg
- Then, add the repository configuration and update APT
echo "deb [arch=amd64] https://pkg.surfacelinux.com/debian release main" \
| sudo tee /etc/apt/sources.list.d/linux-surface.list
sudo apt update
- Now, you can install the linux-surface kernel and its dependencies, and you can also enable the iptsd service to use the touch screen
sudo apt install linux-image-surface linux-headers-surface iptsd libwacom-surface
sudo systemctl enable iptsd
- After performing the above steps, you can restart the system. After completion, you will find that the keyboard, power supply, touch screen, etc. are all available
Arch driver
- First, import the key used to sign the package
wget -qO - https://raw.githubusercontent.com/linux-surface/linux-surface/master/pkg/keys/surface.asc \
| sudo pacman-key --add -
- Then, check and verify the fingerprint of the key, and then sign it locally
sudo pacman-key --finger 56C464BAAC421453
sudo pacman-key --lsign-key 56C464BAAC421453
- Now, the repository can be added by adding the following at the end of /etc/pacman.conf
[linux-surface]
Server = https://pkg.surfacelinux.com/arch/
For example, you can use gedit to modify:
gedit /etc/pacman.conf
- Now, update the repository data to install the linux-surface kernel and its dependencies, and also enable the iptsd service to use the touch screen
sudo pacman -Sy
sudo pacman -S linux-surface linux-surface-headers iptsd
sudo systemctl enable iptsd
- After performing the above steps, you can restart the system. After completion, you will find that the keyboard, power supply, touch screen, etc. are all available
Five, signature kernel
Since we have replaced the Linux kernel, the secure boot cannot directly boot the system when it is turned on, so we need to sign the kernel and import the key of the Linux-Surface kernel into the bootloader so that the kernel can be booted without being disabled secureboot.
Install signature tool
Linux and Archlinux can be installed in the following ways:
Debian / Ubuntu
sudo apt install linux-surface-secureboot-mok
Arch
sudo pacman -S linux-surface-secureboot-mok
Download the signed public key
Public key used: linux-surface/linux-surface/keys/MOK.cer
Import public key
Open the terminal in the folder where you downloaded the public key, or locate the terminal to the corresponding folder
sudo mokutil --import surface.cer
This process will let you film a password. Remember to use it later. You will
succeed when you see the following prompt:
SKIP: surface.cer is already enrolled
Restart the computer after success
Select public key
After restarting, it will enter the following interface, which is more retro, just press Enter
After pressing enter, you will enter the following interface, choose the second one, it should be import mok, because I imported here, it is delete mok, you can understand
After entering the next interface, select continue, follow the prompts to enter the password you set when importing the public key, and then press Enter
After completion, you can enter UEFI, change the boot configuration to Microsoft & 3rd party CA in secure boot, and then you will find that there is no red prompt when booting, and the system can boot the dual system normally
Six, finally
At this point, linux/archlinux has been perfectly installed on your Surface device. For follow-up work, such as changing the source, you can refer to other materials, and I won’t repeat them here.
The code word is not easy, thank you for reading, and welcome to point out any improprieties. If you have any questions, please leave a message, thank you!
The warehouse address used in this article is: the source warehouse address , thanks here
Reprinting is prohibited without the author's permission!