启动 Debian 9 错误:“无法启动 Raise 网络接口”

启动 Debian 9 错误:“无法启动 Raise 网络接口”

Debian 9 Stretch在桌面 PC 上全新安装时启动

...
Failed to start Raise network interfaces
...

发生错误。 (电缆)LAN 连接正常,但(USB)WiFi 无法正常工作(检测到 WiFi 网络但无法连接)。以前在同一硬件上Debian 8 Jessie安装工作正常,没有任何错误。

看来这些问题与最近发生的事情有关可预测的网络接口名称变化。找到用户A,,C,D, 和有类似症状。然而他们已经升级了乌班图系统(无需全新安装)。此外,建议的解决方案还建议禁用固定/可预测/唯一名称的分配。我宁愿保留新的命名方案/标准,最终找到并消除原因()它无法正常工作。

还发现用户F, 和G遇到同样的问题——没有解决方案。

非常感谢任何提示。另外,如果您需要更深入的详细信息,我很乐意回答您的问题。

此外,您还可以找到一些详细的系统输出。

$ sudo 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 Mon 2017-09-04 17:21:42 IST; 1h 27min ago
     Docs: man:interfaces(5)
  Process: 534 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
  Process: 444 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm settle (code=exited, status=0/SUCCESS)
 Main PID: 534 (code=exited, status=1/FAILURE)

Sep 04 17:21:42 XXX ifup[534]: than a configuration issue please read the section on submitting
Sep 04 17:21:42 XXX ifup[534]: bugs on either our web page at www.isc.org or in the README file
Sep 04 17:21:42 XXX ifup[534]: before submitting a bug.  These pages explain the proper
Sep 04 17:21:42 XXX ifup[534]: process and the information we find helpful for debugging..
Sep 04 17:21:42 XXX ifup[534]: exiting.
Sep 04 17:21:42 XXX ifup[534]: ifup: failed to bring up eth0
Sep 04 17:21:42 XXX systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Sep 04 17:21:42 XXX systemd[1]: Failed to start Raise network interfaces.
Sep 04 17:21:42 XXX systemd[1]: networking.service: Unit entered failed state.
Sep 04 17:21:42 XXX systemd[1]: networking.service: Failed with result 'exit-code'.


$ cat /etc/network/interfaces.d/setup
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

编辑2开始:

$ sudo ifconfig
[sudo] password for XXX: 
enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.178.31  netmask 255.255.255.0  broadcast 192.168.178.255
        inet6 xxxx::xxx:xxxx:xxxx:xxxx  prefixlen 64  scopeid 0x20<link>
        ether xx:xx:xx:xx:xx:xx  txqueuelen 1000  (Ethernet)
        RX packets 765  bytes 523923 (511.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 803  bytes 101736 (99.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 17  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 50  bytes 3720 (3.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 50  bytes 3720 (3.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlxf4f26d1b7521: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether xx:xx:xx:xx:xx:xx  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

编辑2结束。

$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
3: wlxf4f26d1b7521: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000
    link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff

编辑开始:

$ lsusb
...
Bus 001 Device 004: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n
...

$ sudo cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

编辑结束。

编辑3开始:

$ sudo systemctl status networking.service
● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
   Active: active (exited) since Tue 2017-09-05 10:29:16 IST; 44min ago
     Docs: man:interfaces(5)
  Process: 565 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=0/SUCCESS)
  Process: 438 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm settle (code=exited, status=0/SUCCESS)
 Main PID: 565 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4915)
   CGroup: /system.slice/networking.service

Sep 05 10:26:56 sdd9 systemd[1]: Starting Raise network interfaces...
Sep 05 10:26:56 sdd9 ifup[565]: ifup: waiting for lock on /run/network/ifstate.enp3s0
Sep 05 10:29:16 sdd9 systemd[1]: Started Raise network interfaces.

编辑3结束。

答案1

删除该/etc/network/interfaces.d/setup文件,然后按如下方式编辑/etc/network/interfaces

auto lo
iface lo inet loopback

(友好编辑:GAD3R 建议文件中不应有任何其他内容。如果行以 # 开头,后跟空格,则似乎也可以忽略条目)

保存并重启

man interfaces

包括其他文件

  Lines  beginning  with  "source" are used to include stanzas from other
  files, so configuration can be split into many files. The word "source"
  is  followed  by the path of file to be sourced. Shell wildcards can be
  used.  (See wordexp(3) for details.)

在您的情况下,您使用的是/etc/network/interfaces.d/setup配置网络而不是/etc/network/interfaces

以“allow-”开头的行用于标识应由各个子系统自动启动的接口。这可以使用诸如“ifup --allow=hotplug eth0 eth1”之类的命令来完成,该命令仅在“allow-hotplug”行中列出时才会显示 eth0 或 eth1。请注意,“allow-auto”和“auto”是同义词。 (标记为“allow-hotplug”的接口在 udev 检测到它们时启动。如果该接口已存在,则可以在引导期间启动,也可以在稍后的时间启动,例如插入 USB 网卡时。请注意,这不会与检测插入的网络电缆没有任何关系。)

答案2

只需在文件中的#源代码前面添加一个,这样它就不会引用该文件,为我解决了这个问题。一切工作正常。解决方案有点合乎逻辑。/etc/network/interfaces.d/*/etc/network/interfaces/interfaces.d/setup

谢谢大家的帮助!

答案3

为我工作了 WLAN!

nano /etc/network/interfaces

然后改变,

auto lo 
iface lo inet static 

auto lo
iface lo inet loopback

相关内容