問題:
安裝ubuntu20.04 TLS系統后,開機卡在“A start job is running for wait for network to be Configured”等待連接兩分多鍾。(啟動作業正在運行,等待配置網絡)

解決辦法:
1、進入該目錄下,修改配置文件。
kuaibang@face:~$ cd /etc/systemd/system/network-online.target.wants/
2、在[Service]下添加 TimeoutStartSec=2sec,(設置超時時間為2秒)如下:
kuaibang@face:/etc/systemd/system/network-online.target.wants$ sudo nano systemd-networkd-wait-online.service [Service] Type=oneshot ExecStart=/lib/systemd/systemd-networkd-wait-online RemainAfterExit=yes TimeoutStartSec=2sec
3、重啟驗證
sudo reboot
附加:
swap相關報錯,啟動必須等1分30秒。
a start job is running for /dev/disk/by-uuid/xxxxx.(20s / 1 min 30 s )
1、解決1
1.1 查看交換分區掛載情況:
swapon --show
1.2 查看交換分區情況:
sudo blkid
1.3 然后再查看/etc/fstab文件中swap分區的UUID。
sudo cat /etc/fstab
兩個UUID不同,正好解釋了為什么swap分區會掛載失敗。
解決方法是刪除/etc/fstab文件中swap分區的UUID,
再用sudo blkid命令得出的swap分區UUID替換。保存文件,重啟系統后a start job is running for
dev-disk-by這個錯誤就消失了。
2、解決2
2.1 修改/etc/fstab文件,注掉swap那一行
yang@ubuntu:/path$ sudo cat /etc/fstab # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/sda2 during curtin installation /dev/disk/by-uuid/cxxxx06-xxxxc-4xxxx0-xxxxx80-xxxxxxxaac / ext4 defaults 0 1 #/swap.img none swap sw 0 0
2.2 重啟不然加載swap分區,即可解決此報錯
sudo reboot
