有时(特别是最近)我会遇到下面详述的问题。所有设备均由系统进行记录、检测和确认。我已经能够使用我能想到的每种方法来验证这一点,包括挖掘系统目录和文件(例如/sys/kernel/debug/usb/devices
,交叉引用常见工具,例如,,lshw
等)。知道发生了什么,和/或为什么?干杯。lspci
lsusb
root@main:~# service networking start
Job for networking.service failed because the control process exited with error code.
See "systemctl status networking.service" and "journalctl -xe" for details.
root@main:~# systemctl status networking.service
● networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2017-08-12 12:18:03 AWST; 2min 48s ago
Docs: man:interfaces(5)
Process: 30803 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
Process: 30800 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm settle (code=exited, status=0/SUCCESS)
Main PID: 30803 (code=exited, status=1/FAILURE)
Aug 12 12:18:03 main systemd[1]: Starting Raise network interfaces...
Aug 12 12:18:03 main ifup[30803]: Cannot find device "wlan2"
Aug 12 12:18:03 main ifup[30803]: ifup: failed to bring up wlan2
Aug 12 12:18:03 main systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Aug 12 12:18:03 main systemd[1]: Failed to start Raise network interfaces.
Aug 12 12:18:03 main systemd[1]: networking.service: Unit entered failed state.
Aug 12 12:18:03 main systemd[1]: networking.service: Failed with result 'exit-code'.
答案1
编辑/etc/network/interfaces
并替换auto wlan2
为allow-hotplug wlan2
,如果您已有该allow-hotplug wlan2
行,则只需删除该auto wlan2
行即可。对我来说工作得很好...并且也auto
被allow-hotplug
eth 取代并且工作得很好。