PVE新建的debian11开机6分钟左右,这肯定不正常了,赶紧查看哪里拖慢开机速度
systemd-analyze blame经过检查发现是networking.service的锅
vi /lib/systemd/system/networking.service那就把networking.service的超时时间修改短点
root@nezha:~# cat /lib/systemd/system/networking.service
[Unit]
Description=Raise network interfaces
Documentation=man:interfaces(5)
DefaultDependencies=no
Requires=ifupdown-pre.service
Wants=network.target
After=local-fs.target network-pre.target apparmor.service systemd-sysctl.service systemd-modules-load.service ifupdown-pre.service
Before=network.target shutdown.target network-online.target
Conflicts=shutdown.target
[Install]
WantedBy=multi-user.target
WantedBy=network-online.target
[Service]
Type=oneshot
EnvironmentFile=-/etc/default/networking
ExecStart=/sbin/ifup -a --read-environment
ExecStop=/sbin/ifdown -a --read-environment --exclude=lo
RemainAfterExit=true
TimeoutStartSec=5s //修改到5s重启果然快多了
2 条评论
22
test