[Feedback on issues] 在磐石启用后,dkms如何安装(无线网卡)驱动?
Tofloor
poster avatar
yan_jingfeng
deepin
2025-07-22 21:18
Author

dkms安装某无线网卡驱动时,应该是收到了磐石(不可变系统)的阻止。

sudo dkms add ./rtl8852au
请输入密码:
验证成功
mkdir: 无法创建目录 "/usr/src/rtl8852au-1.15.0.1": 只读文件系统
cp: 目标 '/usr/src/rtl8852au-1.15.0.1': 没有那个文件或目录

Error! Could not find module source directory.
Directory: /usr/src/rtl8852au-1.15.0.1 does not exist.

网上查到的停用命令好像不能用了

sudo deepin-immutable-ctl disable-system-protect enable
Error: unknown command "disable-system-protect" for "deepin-immutable-ctl"

请问有什么办法安装dkms支持的驱动?谢谢

Reply Favorite View the author
All Replies
yan_jingfeng
deepin
2025-07-22 21:21
#1

oh好像使用了preview的命令。有新的可用命令。

#进入系统后,关闭只读保护功能:
sudo deepin-immutable-writable enable -d /usr
#如果想开启只读保护,只需运行:
sudo deepin-immutable-writable disable
#注意:开启或关闭此功能,都需要重启才能生效。

但是,执行

sudo deepin-immutable-writable enable -d /usr
重启后

sudo deepin-immutable-writable enable -d /usr
This operation will set the system directory to read and write permissions.
And the modification operations to these directories may be discarded or retained depending on the configuration file.
Please use with caution.
Do you want to continue? [Y/n] Y
overlay_manager.go:429: This operation is already enabled

仍然是只读文件系统

/usr/src$ touch x
touch: 无法 touch 'x': 只读文件系统
jyan@dell-deepin:/usr/src$ sudo touch x
touch: 无法 touch 'x': 只读文件系统

Reply View the author
昨夜的星辰
deepin
2025-07-23 00:22
#2
yan_jingfeng

oh好像使用了preview的命令。有新的可用命令。

#进入系统后,关闭只读保护功能:
sudo deepin-immutable-writable enable -d /usr
#如果想开启只读保护,只需运行:
sudo deepin-immutable-writable disable
#注意:开启或关闭此功能,都需要重启才能生效。

但是,执行

sudo deepin-immutable-writable enable -d /usr
重启后

sudo deepin-immutable-writable enable -d /usr
This operation will set the system directory to read and write permissions.
And the modification operations to these directories may be discarded or retained depending on the configuration file.
Please use with caution.
Do you want to continue? [Y/n] Y
overlay_manager.go:429: This operation is already enabled

仍然是只读文件系统

/usr/src$ touch x
touch: 无法 touch 'x': 只读文件系统
jyan@dell-deepin:/usr/src$ sudo touch x
touch: 无法 touch 'x': 只读文件系统

因为/usr是root权限的,用普通用户去touch当然是只读

就算没有磐石,/usr目录对于普通用户也是只读目录

磐石的关闭只读是对root而言的

Reply View the author
没事儿瞎转悠
deepin
2025-07-23 08:04
#3
昨夜的星辰

因为/usr是root权限的,用普通用户去touch当然是只读

就算没有磐石,/usr目录对于普通用户也是只读目录

磐石的关闭只读是对root而言的

注意看楼上最后那个命令,使用sudo提权也不行

Reply View the author
字甲达宾
deepin
2025-07-23 11:08
#4

1.用普通用户,make 命令,生成驱动文件 8852.ko

  1. 自制一个 deb 包,把 ko 驱动文件,放在 对应内核版本的 目录下。可以终端运行命令

    dpkg -S 7601

    查询目录位置。大约是

    /lib/modules/kernel/内核版本/drivers/net/wireless/*.ko

  2. 在 deb 的 DEBIAN 目录下,写一个 postinst 安装脚本,要有可执行权限。里面加入指令

    depmod -u

    也可能是 -a 参数。很久没编译驱动了,记不太清了。

  3. 安装 deb包。

  4. 必要时,取下 usb无线网卡,再重新插上。

Reply View the author
昨夜的星辰
deepin
2025-07-23 13:12
#5
没事儿瞎转悠

注意看楼上最后那个命令,使用sudo提权也不行

昨天我正好装virtualbox,关闭磐石后是可以正常操作/usr的

Reply View the author