3

I found similar topics regarding slow kernel boot but my problem is that my system takes 3 minutes to load the userspace

systemd-analyze gives the following output

Startup finished in 4.247s (kernel) + 3min 743ms (userspace = 3min 4.991s
graphical.target reacher after 1min 35.812s in userspace

Is there a way to identify what exactly is taking so much time? I'm running Xubuntu 18.04 in a VirtualBox and I think the problem started after I enlarged my partition (including a recreation of the swap partition).

edit: Output of the systemd-analyze critical-chain

graphical.target @1min 35.812s
└─multi-user.target @1min 35.812s
  └─docker.service @1min 32.815s +2.996s
    └─network-online.target @1min 32.814s
      └─NetworkManager-wait-online.service @1min 31.863s +951ms
        └─NetworkManager.service @1min 31.075s +784ms
          └─dbus.service @1min 30.640s
            └─basic.target @1min 30.529s
              └─sockets.target @1min 30.529s
                └─docker.socket @1min 30.498s +30ms
                  └─sysinit.target @1min 30.493s
                    └─apparmor.service @979ms +695ms
                      └─local-fs.target @947ms
                        └─media-aj-VBox_GAs_5.2.81.mount @1min 39.649s
                          └─clean-mount-point@media-aj-VBox_GAs_5.2.81.service @
                            └─system-clean\x2dmount\x2dpoint.slice @1min 39.668s
                              └─system.slice @272ms
                                └─-.slice @266ms
Melebius
  • 11,431
  • 9
  • 52
  • 78
po.pe
  • 225
  • Did you use the 'blame' option of systemd-analyze? After you re-created the swap partition; did you correct the UUID in your fstab (file system table) to reflect it's new UUID? or does it wait for the old one to appear? – guiverc Jul 20 '18 at 07:46
  • I did that, before I did it the kernel took much longer to boot so that fixed one part of my issue, but I don't understand what's holding up my userspace. – po.pe Jul 20 '18 at 07:48
  • Use systemd-analyze blame and systemd-analyze critical-chain to see what takes so long. – danzel Jul 20 '18 at 08:09
  • Updated question with the critical-chain – po.pe Jul 20 '18 at 08:24
  • I found this article that's very similar but includes slow kernels times and slow userspace loading times. https://askubuntu.com/a/1029880/852847 I hope it helps you out in some form. – Alexander Marsh Jul 24 '18 at 05:07

1 Answers1

2

What finally resolved my issue was updating the UUID of my swap partition in the /etc/fstab according to the information from Slow boot - "a start job is running for dev-disk-by..."

As I resized my primary partition I had to move my swap partion as well, seems like the system would create a new UUID but not update it in the fstab file. I'm back at a few seconds of booting time.

The answer from Alexander helped me to get the bootup messages guiding me in the right direction.

po.pe
  • 225