问题
首先查看哪些服务占用了开机时间:
1 | systemd-analyze blame |
本文示例中发现 networking.service
的时间长达 5 分钟。查看该服务状态可发现如下错误:
1 | systemd[1]: networking.service: Start operation timed out. Terminating. |
解决方案
编辑文件:
1 | sudo vim /etc/network/interfaces |
将原来的:
1 | auto lo |
改为:
1 | auto lo |
重启查验结果。
References
interfaces(5) — ifupdown — Debian stretch — Debian Manpages
How to fix “ a start job is running for the raise network ” in ubuntu server 16.0 LTS
At boot, networking.service is incredibly slow (5 minutes) on Ubuntu 16.10