modprobe 加载模块时 出现权限不允许提醒;Operation not permitted

最近在编译安装第三方内核模块时,可能是因为没有正确签名的原因;一直安装不了;出现Operation not permitted错误;

错误类似于这种情况:sudo 权限也已经开了;

modprobe: ERROR: could not insert 'wireguard': Operation not permitted

通过查询,secure boot 的原因;如果 secure boot 是开启状态,内核不能安装自己定制的模块;

解决方法:我们进入BIOS 把 secure boot 选项关掉;secure boot 大概的作用时为了保护内核的启动安全;

linux secure boot 状态查询:mokutil --sb-state 

 这时候,我们就能使用 modprobe -vv xx.ko 进行安装内核模块进行调试了;并使用dmesg 查看内核模块输出;

补充:windows 可以使用 System Information 工具查看系统信息;也能使用 Confirm-SecureBootUEFI 命令,在powershell下查看;

参考链接:

http://jasonyychiu.blogspot.com/2018/12/secure-boot-how-to-check-secure-boot.html

https://unix.stackexchange.com/questions/543576/modprobe-fails-with-operation-not-permitted

posted @ 2020-07-18 15:47  Michael-Xu  阅读(8281)  评论(0编辑  收藏  举报