Ubuntu 18.04.01 启动时间过长

Ubuntu 18.04.01 启动时间过长

我将系统从 Ubuntu 16.04 升级到了 Ubuntu 18.04。我了解到有一个与启动时间过长问题有关的已知错误,但据说在 18.04.01 版本中已经修复。但我运行的是同一版本,仍然有这个启动时间过长的问题。我花了将近 1 分钟的时间查看启动画面。

我该如何修复此问题?

以下是一些信息:

命令:

lsb_release -a

输出:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:    18.04
Codename:   bionic

命令:

uname -a

输出:

Linux mypc 4.15.0-33-generic #36-Ubuntu SMP Wed Aug 15 16:00:05 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

命令:

systemd-analyze blame

输出:

27.965s phpsessionclean.service
21.719s dev-sda4.device
21.501s plymouth-quit-wait.service
19.681s networkd-dispatcher.service
18.386s winbind.service
15.446s systemd-journal-flush.service
15.164s snapd.service
13.454s apparmor.service
12.569s apache2.service
12.207s NetworkManager-wait-online.service
10.700s plymouth-read-write.service
9.531s ModemManager.service
9.442s NetworkManager.service
9.164s udisks2.service
8.843s dev-loop1.device
8.814s dev-loop2.device
8.785s dev-loop3.device
8.743s dev-loop4.device
7.998s dev-loop6.device
7.985s dev-loop7.device
7.947s dev-loop9.device
7.923s dev-loop10.device
7.875s dev-loop8.device
7.505s dev-loop11.device
7.417s dev-loop13.device
7.307s dev-loop12.device
7.116s dev-loop5.device
6.825s [email protected]
6.420s accounts-daemon.service
6.281s dev-loop0.device
4.061s gdomap.service
3.918s rsyslog.service
3.896s systemd-udevd.service
3.038s snap-gnome\x2dsystem\x2dmonitor-51.mount
2.823s speech-dispatcher.service
2.763s warsaw.service
2.714s snap-communitheme-848.mount
2.611s snap-gnome\x2dlogs-40.mount
2.565s alsa-restore.service
2.557s gpu-manager.service
2.557s openbsd-inetd.service
2.549s heimdal-kcm.service
2.531s networking.service
2.522s avahi-daemon.service

命令:

systemd-analyze critical-chain

输出:

graphical.target @2min 7.029s
└─multi-user.target @2min 7.029s
  └─postfix.service @2min 4.290s +2ms
    └─[email protected] @1min 57.463s +6.825s
      └─network-online.target @1min 57.461s
        └─NetworkManager-wait-online.service @1min 45.253s +12.207s
          └─NetworkManager.service @1min 35.809s +9.442s
            └─dbus.service @1min 34.447s
              └─basic.target @1min 34.362s
                └─sockets.target @1min 34.362s
                  └─snapd.socket @1min 34.360s +1ms
                    └─sysinit.target @1min 34.272s
                      └─systemd-timesyncd.service @22.021s +302ms
                        └─systemd-tmpfiles-setup.service @20.200s +1.816s
                          └─systemd-journal-flush.service @4.752s +15.446s
                            └─systemd-remount-fs.service @4.121s +577ms
                              └─systemd-journald.socket @4.044s
                                └─system.slice @4.044s
                                  └─-.slice @4.001s

答案1

尝试启动旧内核,看看是否可以更改 vim /etc/default/grub .. default=10 .. style=menu

然后使用 sudo update-grub 并让我知道进展如何

相关内容