生活随笔
收集整理的這篇文章主要介紹了
Surface Pro 4安装Ubuntu
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1. 安裝
https://medium.com/@t1ina2003/surface-pro-4-%E5%AE%89%E8%A3%9D-ubuntu-18-04-%E5%9C%96%E6%96%87%E6%95%99%E5%AD%B8-59e927e2cf6f
安裝前先給本地磁盤做好分區,或者準備一張tf卡。裝在tf卡里更保險,不怕搞壞Windows系統。用rufus做好USB引導盤,ubuntu16/18都可以。插入USB,重啟電腦。一般情況下會直接進入GRUB引導。選擇 Install Ubuntu 進入安裝步驟。注意安裝在提前準備好的分區上,絕對不能裝在nvme0n上。
*如果直接進入windows,按住shift點擊重啟,就能進入UEFI設置界面,手動把USB 移到boot順序中的第一位。重試此步驟。安裝完成后,重啟。此時應該還是USB引導,這次選擇Try Ubuntu without installing,進入USB引導盤中的系統。打開一個終端,一次輸入下列指令。
sudo su
cd /media
mkdir windowsefi
mkdir microsdefi
mount /dev/nvme0n1p1 windowsefi
mount /dev/sdb1 microsdefi
cd microsdefi
cp -R
../windowsefi/EFI ./
exit
這樣,系統引導就設置好啦。重啟并拔掉USB,就能正常進入GRUB選擇ubuntu或widows。要是什么時候不想用了,在windows中下載一個EasyUEFI,在管理EFI啟動項中刪除ubuntu。然后再格式化ubuntu所在的磁盤分區就可以了。
2. 驅動更新
https://github.com/jakeday/linux-surface
ubuntu正確安裝后,typecover是能正常使用的,但surface pen,觸屏什么的都還不能用,這還怎么體現surface的優越性(手動狗頭),下面安裝一個大牛提供的linux surface kernel,該kernel解決了絕大部分的驅動問題。首先連接互聯網,要更新系統
sudo apt update
sudo apt upgrade
然后再輸入如下指令
sudo apt
install git curl wget sed
git clone --depth 1 https://github.com/jakeday/linux-surface.git ~/linux-surface
cd ~/linux-surface
sudo sh setup.sh
重啟即可。我電腦上webcam還是不可用,其他的都能正常工作。
如果載入新kernel時顯示該內核沒有簽名。那么就麻煩了,如果不在乎系統安全,可以停用security boot。這里,我選擇的是自己創造一個簽名。
首先,新建一個文件mokconfigcnf,內容如下
# This definition stops the following lines failing if HOME isn't
# defined.
HOME = .
RANDFILE = $ENV::HOME/.rnd
[ req ]
distinguished_name = req_distinguished_name
x509_extensions = v3
string_mask = utf8only
prompt = no[ req_distinguished_name ]
countryName = <YOURcountrycode>
stateOrProvinceName = <YOURstate>
localityName = <YOURcity>
0.organizationName = <YOURorganization>
commonName = Secure Boot Signing Key
emailAddress = <YOURemail>[ v3 ]
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always,issuer
basicConstraints = critical,CA:FALSE
extendedKeyUsage = codeSigning,1.3.6.1.4.1.311.10.3.6
nsComment = "OpenSSL Generated Certificate"
注意替換掉自己的相關信息,隨意寫也可以。
在相同目錄下,執行
openssl req -config ./mokconfig.cnf \-new -x509 -newkey rsa:2048 \-nodes -days 36500 -outform DER \-keyout
"MOK.priv" \-out
"MOK.der"
openssl x509 -in MOK.der -inform DER -outform PEM -out MOK.pem
sudo mokutil --import MOK.der
此步驟會要求設置一個密碼,稍后會用到。
重啟電腦,系統進入藍屏而且分辨率感人,依次選擇
Enroll MOK ->View Key (確定顯示的是你之前編寫的簽名內容)->Continue->Yes。進入系統,此時簽名還沒完成。執行
sudo mokutil --list-enrolled
在 /boot/vmlinuz-[KERNEL-VERSION]-surface-linux-surface中確定linux-surface的版本號,替換下面的指令
sudo sbsign --key MOK.priv --cert MOK.pem /boot/vmlinuz-
[KERNEL-VERSION
]-surface-linux-surface --output /boot/vmlinuz-
[KERNEL-VERSION
]-surface-linux-surface.signed
sudo cp /boot/initrd.img-
[KERNEL-VERSION
]-surface-linux-surface
{,.signed
}
sudo update-grub
再次重啟,載入linux-surface kernel。
最后收尾,刪除未簽名的內核
sudo mv /boot/vmlinuz-
[KERNEL-VERSION
]-surface-linux-surface
{.signed,
}
sudo mv /boot/initrd.img-
[KERNEL-VERSION
]-surface-linux-surface
{.signed,
}
sudo update-grub
完成。
總結
以上是生活随笔為你收集整理的Surface Pro 4安装Ubuntu的全部內容,希望文章能夠幫你解決所遇到的問題。
如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。