修复:正在为sys-subsystem-net-devices-eth0.device运行启动作业
启动时,我的Arch Linux虚拟机始终告诉我“sys-subsystem-net-devices-eth0.device的启动作业正在运行”,我不得不再等1分30秒,这很烦人。
我如何解决这个问题?
Arch Linux启动后,打开终端窗口并使用以下命令检查系统日志:
journalctl -xe
这就是我发现的。
Oct 24 15:40:47 arch systemd[1]: sys-subsystem-net-devices-eth0.device: Job sys-subsystem-net-devices-eth0.device/start timed out Oct 24 15:40:47 arch systemd[1]: Timed out waiting for device sys-subsystem-net-devices-eth0.device. -- Subject: Unit sys-subsystem-net-devices-eth0.device has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit sys-subsystem-net-devices-eth0.device has failed. -- -- The result is timeout. Oct 24 15:40:47 arch systemd[1]: Dependency failed for dhcpcd on eth0. -- Subject: Unit [email protected] has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit [email protected] has failed. -- -- The result is dependency. Oct 24 15:40:47 arch systemd[1]: [email protected]: Job [email protected]/start failed with result 'dependency'. Oct 24 15:40:47 arch systemd[1]: sys-subsystem-net-devices-eth0.device: Job sys-subsystem-net-devices-eth0.device/start failed w
从输出中可以看到, [email protected]
正在等待 eth0
接口发生故障。
的 systemctl status [email protected]
命令告诉我该服务应该在系统启动时自动启动。
[[email protected] ~]$ systemctl status [email protected] ● [email protected] - dhcpcd on eth0 Loaded: loaded (/usr/lib/systemd/system/[email protected]; enabled; vendor preset: disabled) Active: inactive (dead) Oct 24 15:40:47 arch systemd[1]: Dependency failed for dhcpcd on eth0. Oct 24 15:40:47 arch systemd[1]: [email protected]: Job [email protected]/start failed with result 'dependency'.
如果我跑步 ip address show
在终端中的命令,我知道 enp0s3
接口已经从我的家庭路由器获取了IP地址。
所以真的没有必要 eth0
接口。 我需要做的就是禁用[email protected]。
sudo systemctl disable [email protected]
烦人的“正在为sys-subsystem-net-devices-eth0.device运行启动作业”消息将消失,每次启动Arch Linux虚拟机时将保存1分钟和30秒。
后来我发现我已经在Virtualbox中将网络模式从默认的NAT模式更改为桥接适配器模式。 所以默认 eth0
界面在我的Arch Linux虚拟机中不起作用。
我希望本教程可以帮助您解决上述问题。 与往常一样,如果您发现此帖子有用,请订阅我们的免费新闻通讯,或在Google +,Twitter或我们的Facebook页面上关注我们。 感谢造访!