1 Star 0 Fork 0

RobbiNespu/Grub-Nvidia-Entry

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
SignNvidia.sh 1.08 KB
一键复制 编辑 原始数据 按行查看 历史
Superdanby 提交于 2018-03-03 21:50 . Add the module: nvidia-uvm.
Curnel=`uname -r`
if [[ `sudo sed -n '/^menuentry/,/}/p;' /boot/efi/EFI/fedora/grub.cfg | sed '/}/q' | grep $Curnel` == '' ]];then
printf "You are not on the latest kernel!\n"
printf "Do you wish to proceed?\n"
select yn in "Yes" "No"; do
case $yn in
Yes ) break;;
No ) exit;;
esac
done
fi
printf "Signing nvidia modules...\n"
openssl req -new -x509 -newkey rsa:2048 -keyout ~/MOK.priv -outform DER -out ~/MOK.der -nodes -days 36500 -subj "/CN=`groups | xargs -n 1 | tail -n +1 | head -n 1`/"
sudo /usr/src/kernels/$(uname -r)/scripts/sign-file sha256 ~/MOK.priv ~/MOK.der $(modinfo -n nvidia)
sudo /usr/src/kernels/$(uname -r)/scripts/sign-file sha256 ~/MOK.priv ~/MOK.der $(modinfo -n nvidia_drm)
sudo /usr/src/kernels/$(uname -r)/scripts/sign-file sha256 ~/MOK.priv ~/MOK.der $(modinfo -n nvidia_modeset)
sudo /usr/src/kernels/$(uname -r)/scripts/sign-file sha256 ~/MOK.priv ~/MOK.der $(modinfo -n nvidia_uvm)
printf "Enter the password to enroll MOK.\n"
sudo mokutil --import ~/MOK.der
printf "Please reboot to finish the process with MOK."
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/RobbiNespu/Grub-Nvidia-Entry.git
git@gitee.com:RobbiNespu/Grub-Nvidia-Entry.git
RobbiNespu
Grub-Nvidia-Entry
Grub-Nvidia-Entry
master

搜索帮助