为什么在禁用可预测的网络接口名称后,我会在启动时给出消息“正在为提升网络接口运行启动作业”?

8 debian systemd network-interface

我通过更改GRUB_CMDLINE_LINUX/etc/default/grub 中的行来禁用可预测的网络接口名称:

GRUB_CMDLINE_LINUX="pci=nomsi"
Run Code Online (Sandbox Code Playgroud)

到:

GRUB_CMDLINE_LINUX="pci=nomsi net.ifnames=0"
Run Code Online (Sandbox Code Playgroud)

在安装了专有 NVIDIA 驱动程序的全新 Debian GNU/Linux 测试系统上。我这样做是因为我的外部 USB Wi-Fi 卡不能使用 systemd 接口名称。

禁用可预测的网络接口名称后,我在启动时给出以下消息:

正在运行提升网络接口的启动作业(2 分 5 分 1 秒)

和系统启动时间长。

我的/etc/network/intefaces文件:

# 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
Run Code Online (Sandbox Code Playgroud)

为什么我在启动时给出这个消息?如何避免系统长时间启动?

小智 10

通过更改文件解决/etc/network/interfaces.d/setup

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
Run Code Online (Sandbox Code Playgroud)

到:

auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet dhcp
Run Code Online (Sandbox Code Playgroud)


Hun*_*son 6

禁用等待启动网络接口的服务。

systemctl disable NetworkManager-wait-online.service
Run Code Online (Sandbox Code Playgroud)

并启用:

systemctl enable NetworkManager-wait-online.service
Run Code Online (Sandbox Code Playgroud)

或者,您可以减少等待开始作业的时间。

vim /etc/systemd/system/network-online.target.wants/networking.service 

TimeoutStartSec=5min ##Change parameter, should be at the end of the page.
Run Code Online (Sandbox Code Playgroud)