安裝 Linux 已經出現 Nvidia 問題,但最近想在這部電腦中安裝 VirtualBox 來測試一些工作時又出現問題


建立虛擬機並執行時,出現錯誤,導致不能起動虛擬機
VirtualBox 及在下在網上尋找解決方法,都是將 virtualbox-dkms 重新安裝並啟動 modprobe vboxdrv
但在下發現重裝後, vboxdrv 仍然無法執行,所以這個方法並不能解決在下的狀況
然後在下發現 VirtualBox + Secure Boot + Ubuntu = fail 這篇文章
但查看資料後感覺不是在下遇到的問題,所以最在自行想方法解決
文中提及 VirtualBox + Secure Boot + Ubuntu = fail ,如果在下堅持在這部電腦使用 Linux (Ubuntu) 及 VirtualBox
唯一可以動手的只有 Secure Boot (可能其他 Linux 發行版沒有此問題,在下不清楚?)
在下認為既然 Secure Boot 可以啟動,即是有方法停用,因此尋找停用 Secure Boot 的方法 https://wiki.ubuntu.com/UEFI/SecureBoot/DKMS
先在 Terminal 輸入安裝 mokutil
sudo apt-get install mokutil或
按此安裝 install mokutil
如果安裝 Linux 已經安裝 mokutil 可以略過此步
安裝 mokutil 後輸入
sudo mokutil --timeout 10將 MOK Management 的逾時時間設定為 10秒,讓使用者有足夠時間停止 MOK Management 自動載入
再輸入
sudo mokutil --enable-validation或
sudo mokutil --disable-validation輸入 8 至 16 位密碼後重新啟動

進入 GRUB2 前,會先載 UEFI Secure Boot 的 Shim UEFI key management 畫面
先按鍵暫停自動起動

載入到 Perform MOK management
選 Change Secure Boot state

MOK management 會在閣下輸入的 Secure Boot 密碼中, 隨機抽出密碼中某個位置的內容,總共查詢三次,必須三次都正確
(在下覺得這種密碼比直接輸入一次完整密碼更安全)

三次回應都正確後
如果之前使用 --enable-validation 參數
在 Enable Secure Boot 選擇 No 來關閉 Secure Boot
如果之前使用 --disable-validation 參數
在 Disable Secure Boot 選擇 Yes 來關閉 Secure Boot
(反向選擇)

完成後按 Continue boot
回到 Linux 執行 VirtualBox 便可以起動虛擬機
其實 UEFI Secure Boot 的評論,早在 2011年 已經有報告指出對 Linux 的影響,參巧文件
https://ozlabs.org/docs/uefi-secure-boot-impact-on-linux.pdf
沒有留言 :
張貼留言