Ubuntu 18.04 启动速度超慢

Ubuntu 18.04 启动速度超慢

在我的 MacBook Air 上,我从 Ubuntu 16.04 升级到了 Ubuntu 18.04。一切正常,但使用 Ubuntu 启动大约需要 6 分钟!

运行$ systemd-analyze time输出:

Startup finished in 4.480s (kernel) + 6min 545ms (userspace) = 6min 5.026s
graphical.target reached after 6min 535ms in userspace

最后部分$ systemd-analyze time

...
[    7.005447] Bluetooth: BNEP socket layer initialized
[    7.354030] IPv6: ADDRCONF(NETDEV_UP): enx00e04c6800c5: link is not ready
[    7.359359] IPv6: ADDRCONF(NETDEV_UP): enx00e04c6800c5: link is not ready
[    7.363620] IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready
[    8.977999] r8152 2-1.4:1.0 enx00e04c6800c5: carrier on
[    8.978018] IPv6: ADDRCONF(NETDEV_CHANGE): enx00e04c6800c5: link becomes ready
[  359.996525] random: crng init done
[  693.520385] thunderbolt 0000:07:00.0: resetting error on 0:b.
[  693.520465] thunderbolt 0000:07:00.0: 0:b: hotplug: scanning
[  693.520471] thunderbolt 0000:07:00.0: 0:b: hotplug: no switch found
[  693.820626] thunderbolt 0000:07:00.0: resetting error on 0:b.
[  693.820711] thunderbolt 0000:07:00.0: 0:b: got unplug event for disconnected port, ignoring
[ 1338.638266] thunderbolt 0000:07:00.0: resetting error on 0:b.
[ 1338.638283] thunderbolt 0000:07:00.0: 0:b: hotplug: scanning
[ 1338.638288] thunderbolt 0000:07:00.0: 0:b: hotplug: no switch found
[ 1338.938543] thunderbolt 0000:07:00.0: resetting error on 0:b.
[ 1338.938568] thunderbolt 0000:07:00.0: 0:b: got unplug event for disconnected port, ignoring
[ 1357.411889] Bluetooth: RFCOMM TTY layer initialized
[ 1357.411894] Bluetooth: RFCOMM socket layer initialized
[ 1357.411900] Bluetooth: RFCOMM ver 1.11
[ 1358.945100] rfkill: input handler disabled

文件etc/fstab

...
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda4 during installation
UUID=2ef34bb8-5360-460a-8a8a-646d3a102a3a /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=67E3-17ED  /boot/efi       vfat    umask=0077      0       1
# swap was on /dev/sda5 during installation
UUID=7c820859-65c5-44ac-9704-b3e0bb8c8020 none            swap    sw              0       0

我该如何进一步排除故障并解决此问题?提前谢谢您。

马里奥

答案1

我在我管理的两台桌面上都看到过这种现象。

这是一个与内核相关的回归,启动板错误是:https://bugs.launchpad.net/ubuntu/+bug/1779827

解决方法是,在启动时按下按键和/或移动鼠标。这将增加随机熵。

或者运行以下命令来安装 rng-tools 可以解决这个问题:

sudo apt install rng-tools

来自 Arch wiki:rng-tools 是一组与内核中的随机数生成相关的实用程序。这主要用于增加内核中的熵数量,以使 /dev/random 更快。

相关内容