Announcement

Collapse
No announcement yet.

Booting takes 12-40 minutes. What's wrong?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    The initial responses to your question suggested using systemd-analyze and/or dmesg in a Konsole.
    Do yourself a favor and find out what part(s) of the kernel and user space bootup is taking the most time. Open a Konsole and issue:
    dmesg | less
    The "|" command pipes the output of dmesg into the "less" command, which allows you to scroll the output up or down. Now, examine the timeline on the left and look for large jumps in time between two successive listings. The second of those two is the one taking the time. There may be more than one gap in the listing. Those will tell you what is happening. Copy and paste the gap pairs (not the whole listing) in your next post.
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #17
      Having typed your commands, 'dmesg | less' (minus the single quotes; using two computers, I couldn't copy/paste), here is a sample of the beginning of the output:

      [ 0.000000] Initializing cgroup subsys cpuset
      [ 0.000000] Initializing cgroup subsys cpu
      [ 0.000000] Initializing cgroup subsys cpuacct
      [ 0.000000] Linux version 4.4.0-24-generic (buildd@lgw01-12) (gcc version 5.3.1 20160
      413 (Ubuntu 5.3.1-14ubuntu2.1) ) #43-Ubuntu SMP Wed Jun 8 19:27:37 UTC 2016 (Ubuntu 4.4.
      0-24.43-generic 4.4.10)
      [ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.4.0-24-generic root=UUID=28b6b37
      9-399a-405d-bcee-e9f242d0debc ro quiet splash
      [ 0.000000] KERNEL supported cpus:
      [ 0.000000] Intel GenuineIntel
      [ 0.000000] AMD AuthenticAMD
      [ 0.000000] Centaur CentaurHauls
      [ 0.000000] tseg: 00af000000

      I don't see any timeline along the left. I used Konsole and, when the output was finished, I couldn't scroll up or down with the scroll bar; I could, though, only with the Page up & Page down keys, not the back, forward, up, or down keys. What am I doing wrong?

      Comment


        #18
        The "0.000000" is a timestamp in "kernel ring time" (number of seconds after init, I think (ie, 1.000000 is one second after boot, etc...)). You can get it displayed in more human form with "dmesg -T" or "dmesg --ctime".

        Comment


          #19
          Originally posted by RLynwood View Post
          ... I don't see any timeline along the left. I used Konsole and, when the output was finished, I couldn't scroll up or down with the scroll bar; I could, though, only with the Page up & Page down keys, not the back, forward, up, or down keys. What am I doing wrong?
          Nothing. You just don't understand what you are seeing. The numbers in the brackets on the left side are the seconds since the boot up began. Look for large jumps in the seconds between two successive listings and post those. From example, from my box:

          Code:
          ...
          [FONT=monospace][COLOR=#18B218][    8.320603] [/COLOR][COLOR=#B26818]ppdev[/COLOR][COLOR=#000000]: user-space parallel port driver[/COLOR]
          [COLOR=#18B218][   21.332361] [/COLOR][COLOR=#B26818]BTRFS info (device sda1)[/COLOR][COLOR=#000000]: disk space caching is enabled[/COLOR]
          [COLOR=#18B218][   22.041121] [/COLOR][COLOR=#B26818]systemd-journald[344][/COLOR][COLOR=#000000]: Received request to flush runtime journal from PID 1[/COLOR]
          ... (A 13 second gap)
          
          [/FONT][FONT=monospace][COLOR=#18B218][   27.803840] [/COLOR][COLOR=#B26818]input[/COLOR][COLOR=#000000]: HDA Intel MID HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input21[/COLOR]
          [COLOR=#18B218][   33.064601] [/COLOR][COLOR=#B26818]IPv6[/COLOR][COLOR=#000000]: ADDRCONF(NETDEV_UP): wlp2s0: link is not ready[/COLOR]
          [/FONT][FONT=monospace]... (A 6 secong gap)
          
          [/FONT][FONT=monospace][COLOR=#18B218]43.312141] [/COLOR][COLOR=#B26818]audit[/COLOR][COLOR=#000000]: type=1400 audit(1466466163.774:26): apparmor="DENIED" operation="open" profile="/usr/lib/NetworkManager/nm-dhcp-hel[/COLOR]per" name="/etc/ld.so.preload" pid=1540 comm="nm-dhcp-helper" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
          [COLOR=#18B218][   63.548082] [/COLOR][COLOR=#B26818]audit[/COLOR][COLOR=#000000]: type=1400 audit(1466466183.516:27): apparmor="DENIED" operation="open" profile="/usr/lib/telepathy/mission-control-[/COLOR]5" name="/etc/ld.so.preload" pid=2073 comm="mission-control" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
          ... (A 20 second gap)
          
          etc...
          [/FONT][FONT=monospace]
          [/FONT]
          Somewhere in your dmesg listing you are going to see gaps of 60 seconds or more, possible 180, 300 or 600 seconds or more. List those lines the way I did above.
          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
          – John F. Kennedy, February 26, 1962.

          Comment


            #20
            Thanks for the direction. I'm being interrupted big time. But I am following them when I can get to it. I'm having to copy the output one page at a time to a text file. When I finish that, I'll copy that to my computer, where I can print it, survey the output, and then give to you those gaps. That's likely to be in a day or two. Thanks again.

            Comment


              #21
              Originally posted by RLynwood View Post
              Thanks for the direction. I'm being interrupted big time. But I am following them when I can get to it. I'm having to copy the output one page at a time to a text file. When I finish that, I'll copy that to my computer, where I can print it, survey the output, and then give to you those gaps. That's likely to be in a day or two. Thanks again.
              As several in this thread have already mentioned, an easy way to get a sorted list of the time each process takes during booting is to use
              systemd-analyze blame
              The most time consuming processes will be listed first, along with the time each took.
              "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
              – John F. Kennedy, February 26, 1962.

              Comment


                #22
                Originally posted by RLynwood View Post
                I'm having to copy the output one page at a time to a text file.
                Uh?
                Code:
                dmesg -T >foobar.txt

                Comment


                  #23
                  I just tried both your suggestions (dmesg -T >foobar.txt and systemd-analyze blame). Both yield the statement "Log file is already in use (press RETURN)".

                  Comment


                    #24
                    Are you running systemd-analyze blame as root?
                    If you're sitting wondering,
                    Which Batman is the best,
                    There's only one true answer my friend,
                    It's Adam Bloody West!

                    Comment


                      #25
                      I guess not. I just entered that command at the command prompt. How do I specifiy it as root?

                      Comment


                        #26
                        You slap sudo in front of it. I'm not sure if that's the issue here but most system level commands are run as root...
                        If you're sitting wondering,
                        Which Batman is the best,
                        There's only one true answer my friend,
                        It's Adam Bloody West!

                        Comment


                          #27
                          Originally posted by RLynwood View Post
                          I guess not. I just entered that command at the command prompt. How do I specifiy it as root?
                          Running that command as root isn't necessary:

                          Code:
                          ~$ systemd-analyze blame
                                   19.813s dev-sda1.device
                                   13.936s systemd-udevd.service
                                    9.048s NetworkManager-wait-online.service
                                    3.998s accounts-daemon.service
                                    3.960s gpu-manager.service
                                    3.525s ModemManager.service
                                    3.508s postfix.service
                                    3.469s NetworkManager.service
                                    3.238s aiccu.service
                                    2.895s plymouth-start.service
                                    1.713s apport.service
                                    1.572s systemd-remount-fs.service
                                    1.535s systemd-rfkill.service
                                    1.509s upower.service
                                    1.253s polkitd.service
                                    1.202s colord.service
                                    1.171s icecast2.service
                                    1.134s grub-common.service
                                    1.002s irqbalance.service
                                     970ms systemd-modules-load.service
                                     829ms systemd-journald.service
                                     813ms lm-sensors.service
                                     797ms rsyslog.service
                                     725ms systemd-tmpfiles-setup-dev.service
                                     621ms dev-hugepages.mount
                                     608ms sys-kernel-debug.mount
                                     607ms dev-mqueue.mount
                                     559ms systemd-tmpfiles-setup.service
                                     553ms systemd-logind.service
                                     494ms resolvconf.service
                                     490ms systemd-user-sessions.service
                          lines 1-31
                          You can access systemd info through journalctl:
                          https://www.digitalocean.com/communi...e-systemd-logs
                          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                          – John F. Kennedy, February 26, 1962.

                          Comment


                            #28
                            Thank you for all this support. I will try these again in a couple of days. In the mean time, a technician suggested that I install Linux Mint KDE 17.3, arguing that they've done a great job of preparing GRUB for all situations, especially with Windows dual boots. I did (in a second partition), and it booted properly, no problem. But it didn't fix GRUB re. Kubuntu; that still takes 20-40 minutes to boot.

                            Comment

                            Working...
                            X