Udev 无法创建持久规则,只读文件系统

Udev 无法创建持久规则,只读文件系统

升级到 15.04 后,我尝试了不同的无线网卡驱动程序,所以我想刷新 udev 规则并删除该/etc/udev/rules.d/70-persistent-net.rules文件,以为它会在启动时重新创建。但事实并非如此,并出现了以下错误

systemctl status udev-finish.service -l
● udev-finish.service - Copy rules generated while the root was ro
   Loaded: loaded (/lib/systemd/system/udev-finish.service; static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2015-04-26 22:11:29 CEST; 49s ago
  Process: 361 ExecStart=/lib/udev/udev-finish (code=exited, status=2)
 Main PID: 361 (code=exited, status=2)

Apr 26 22:11:29 MacBook systemd[1]: Starting Copy rules generated while the root was ro...
Apr 26 22:11:29 MacBook systemd[1]: udev-finish.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Apr 26 22:11:29 MacBook systemd[1]: Failed to start Copy rules generated while the root was ro.
Apr 26 22:11:29 MacBook systemd[1]: Unit udev-finish.service entered failed state.
Apr 26 22:11:29 MacBook systemd[1]: udev-finish.service failed.
Apr 26 22:11:29 MacBook udev-finish[361]: /lib/udev/udev-finish: 6: /lib/udev/udev-finish: cannot create /etc/udev/rules.d/70-persistent-net.rules: Read-only file system

那么我该如何让系统再次可写呢?

答案1

我改变了文件/lib/systemd/system/udev-finish.service包括基本目标在其-配置,这似乎对我有用:

[Unit]
Description=Copy rules generated while the root was ro
DefaultDependencies=no
After=basic.target systemd-udevd.service systemd-udev-settle.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/lib/udev/udev-finish

相关内容