Announcement

Collapse
No announcement yet.

Extremely long boot time

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [System] Extremely long boot time

    My laptop. HP Pavilion g7-1070us. 8 GiB of RAM. Mesa Intel® HD Graphics.

    From the time I press Enter from the Grub menu, it takes more than two-minutes to reach the Login Screen.

    Attaching files analyze.txt, blame.txt, and critical-chain.txt for review by those knowledgeable with those files. I'd like to know what I can do; if I can do anything; to speed up the boot process.

    analyze.txt blame.txt critical-chain.txt
    Windows no longer obstruct my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    #2
    For some reason grub is taking 1 min 45 seconds. Everything else looks fine to me.

    No idea why, though. Does it take the same amount of time if you select a different kernel in grub?
    Self-built: Asus PRIME B550M-K/Ryzen 5600GT/32Gb/Intel ARC B580 12Gb/KDE neon
    HP Elitedesk 800 G3 Mini: i5-7500T(35w)/32Gb/Kubuntu LTS
    HP Chromebook 14: i5-1135G7/8Gb/512Gb SSD/KDE Linux

    Comment


      #3
      please paste output of these :
      Code:
      systemctl cat grub-common.service
      Code:
      systemctl status grub-common.service --no-pager
      Code:
      sudo grub-mkconfig -o /tmp/grub-test.cfg
      Don't make any changes to GRUB or disable any services yet.

      PS: the last command does not modify your bootloader configuration.​
      ▁ ▂ ▄ ▅ ▆ ▇ █ ᄂIПЦX FӨЯ ᄂIFΣ █ ▇ ▆ ▅ ▄ ▂ ▁

      Comment


        #4
        systemctl cat grub-common.service
        # /run/systemd/generator.late/grub-common.service
        # Automatically generated by systemd-sysv-generator

        [Unit]
        Documentation=man:systemd-sysv-generator(8)
        SourcePath=/etc/init.d/grub-common
        Description=LSB: Record successful boot for GRUB
        Before=multi-user.target
        Before=multi-user.target
        Before=multi-user.target
        Before=graphical.target
        After=all.target

        [Service]
        Type=forking
        Restart=no
        TimeoutSec=5min
        IgnoreSIGPIPE=no
        KillMode=process
        GuessMainPID=no
        RemainAfterExit=yes
        SuccessExitStatus=5 6
        ExecStart=/etc/init.d/grub-common start
        ExecStop=/etc/init.d/grub-common stop
        paul@maccat:~$


        systemctl status grub-common.service --no-pager
        ● grub-common.service - LSB: Record successful boot for GRUB
        Loaded: loaded (/etc/init.d/grub-common; generated)
        Active: active (exited) since Wed 2026-08-19 11:57:22 CDT; 2h 50min ago
        Invocation: f359848bcb2f4113a5d360bdb4e16e8f
        Docs: man:systemd-sysv-generator(8)
        Process: 974 ExecStart=/etc/init.d/grub-common start (code=exited, status=0/SUCCESS)
        Mem peak: 3.7M
        CPU: 69ms

        Aug 19 11:55:46 maccat systemd[1]: Starting grub-common.service - LSB: Record successful boot fo…GRUB...
        Aug 19 11:55:47 maccat grub-common[974]: * Recording successful boot for GRUB
        Aug 19 11:57:22 maccat grub-common[974]: ...done.
        Aug 19 11:57:22 maccat systemd[1]: Started grub-common.service - LSB: Record successful boot for GRUB.
        Hint: Some lines were ellipsized, use -l to show in full.
        paul@maccat:~$


        grub-test.cfg.txt
        Attached Files
        Windows no longer obstruct my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          and output of these 2 :
          Code:
          sudo cat /etc/init.d/grub-common
          Code:
          sudo bash -x /etc/init.d/grub-common start
          ▁ ▂ ▄ ▅ ▆ ▇ █ ᄂIПЦX FӨЯ ᄂIFΣ █ ▇ ▆ ▅ ▄ ▂ ▁

          Comment


            #6
            sudo cat /etc/init.d/grub-common
            [sudo: authenticate] Password:
            #! /bin/sh
            ### BEGIN INIT INFO
            # Provides: grub-common
            # Required-Start: $all
            # Required-Stop:
            # Default-Start: 2 3 4 5
            # Default-Stop:
            # Short-Description: Record successful boot for GRUB
            # Description: GRUB displays the boot menu at the next boot if it
            # believes that the previous boot failed. This script
            # informs it that the system booted successfully.
            ### END INIT INFO

            command -v grub-editenv >/dev/null || exit 0

            # Define LSB log_* functions.
            # Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
            . /lib/lsb/init-functions

            case $1 in
            start|restart|force-reload)
            log_action_msg "Recording successful boot for GRUB"
            [ -s /boot/grub/grubenv ] || rm -f /boot/grub/grubenv
            mkdir -p /boot/grub
            grub-editenv /boot/grub/grubenv unset recordfail
            log_end_msg $?
            ;;
            stop)
            ;;
            status)
            exit 0
            ;;
            *)
            echo "Usage: $0 {start|stop|status|restart|force-reload}" >&2
            exit 3
            ;;
            esac

            exit 0


            sudo bash -x /etc/init.d/grub-common start
            + command -v grub-editenv
            + . /lib/lsb/init-functions
            +++ run-parts --lsbsysinit --list /lib/lsb/init-functions.d
            ++ for hook in $(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2> /dev/null)
            ++ '[' -r /lib/lsb/init-functions.d/00-verbose ']'
            ++ . /lib/lsb/init-functions.d/00-verbose
            ++ for hook in $(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2> /dev/null)
            ++ '[' -r /lib/lsb/init-functions.d/40-systemd ']'
            ++ . /lib/lsb/init-functions.d/40-systemd
            +++ _use_systemctl=0
            +++ '[' -d /run/systemd/system ']'
            +++ '[' -n '' ']'
            +++ '[' grub-common = init-d-script ']'
            +++ '[' grub-common = start ']'
            +++ executable=/etc/init.d/grub-common
            +++ argument=start
            +++ prog=grub-common
            +++ service=grub-common.service
            ++++ systemctl -p LoadState --value show grub-common.service
            +++ state=loaded
            +++ '[' loaded = masked ']'
            +++ '[' 5623 -ne 1 ']'
            +++ '[' -z '' ']'
            +++ case $(readlink -f "$executable") in
            ++++ readlink -f /etc/init.d/grub-common
            +++ '[' loaded '!=' not-found ']'
            +++ _use_systemctl=1
            ++++ systemctl -p CanReload --value show grub-common.service
            +++ '[' no = no ']'
            +++ '[' start = reload ']'
            +++ '[' 1 = 1 ']'
            +++ set +e
            +++ set +u
            +++ case "$argument" in
            +++ systemctl_redirect /etc/init.d/grub-common start
            +++ local s
            +++ local rc
            +++ local prog=grub-common
            +++ local command=start
            +++ case "$command" in
            +++ s='Starting grub-common (via systemctl)'
            +++ service=grub-common.service
            +++ systemctl --quiet is-system-running
            +++ '[' start = status ']'
            +++ log_daemon_msg 'Starting grub-common (via systemctl)' grub-common.service
            +++ '[' -z 'Starting grub-common (via systemctl)' ']'
            +++ log_daemon_msg_pre 'Starting grub-common (via systemctl)' grub-common.service
            +++ :
            +++ '[' -z grub-common.service ']'
            +++ echo -n 'Starting grub-common (via systemctl): grub-common.service'
            Starting grub-common (via systemctl): grub-common.service+++ log_daemon_msg_post 'Starting grub-common (
            via systemctl)' grub-common.service
            +++ :
            +++ systemctl --no-pager start grub-common.service
            +++ rc=0
            +++ '[' start = status ']'
            +++ log_end_msg 0
            +++ '[' -z 0 ']'
            +++ log_end_msg_pre 0
            +++ :
            +++ log_use_fancy_output
            +++ '[' -t 1 ']'
            +++ '[' xterm-256color ']'
            +++ '[' xterm-256color '!=' dumb ']'
            +++ '[' -z ']'
            +++ return 0
            +++ esc=$'\E'
            +++ red=$'\E[31m'
            +++ yellow=$'\E[33m'
            +++ normal=$'\E[0m'
            +++ '[' 0 -eq 0 ']'
            +++ echo .
            .
            +++ log_end_msg_post 0
            +++ :
            +++ return 0
            +++ return 0
            +++ exit 0



            Windows no longer obstruct my view.
            Using Kubuntu Linux since March 23, 2007.
            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

            Comment


              #7
              and these ...
              Code:
              time sudo grub-editenv /boot/grub/grubenv unset recordfail
              Code:
              sudo grub-editenv /boot/grub/grubenv list
              Code:
              findmnt /boot
              Code:
              findmnt /boot/grub​
              Code:
              ls -l /boot/grub/grubenv
              Code:
              sudo file /boot/grub/grubenv​
              ▁ ▂ ▄ ▅ ▆ ▇ █ ᄂIПЦX FӨЯ ᄂIFΣ █ ▇ ▆ ▅ ▄ ▂ ▁

              Comment


                #8
                Is the first command going to change the file?
                Windows no longer obstruct my view.
                Using Kubuntu Linux since March 23, 2007.
                "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                Comment


                  #9
                  oops , yes, if recordfail is present​...
                  rather run
                  Code:
                  time sudo grub-editenv /boot/grub/grubenv list
                  ▁ ▂ ▄ ▅ ▆ ▇ █ ᄂIПЦX FӨЯ ᄂIFΣ █ ▇ ▆ ▅ ▄ ▂ ▁

                  Comment


                    #10
                    time sudo grub-editenv /boot/grub/grubenv list
                    env_block=512+1

                    real0m1.851s
                    user0m0.007s
                    sys0m0.024s



                    findmnt /boot
                    and
                    findmnt /boot/grup
                    Just returns to the prompt. I do have /boot and /boot/grub directories.


                    ls -l /boot/grub/grubenv
                    -rw-rw-r-- 1 root root 1024 Aug 19 14:47 /boot/grub/grubenv


                    Originally posted by die.boer View Post
                    sudo file /boot/grub/grubenv​
                    That is not the safe way to open/edit this file.


                    sudo grub-editenv /boot/grub/grubenv list
                    env_block=512+1
                    Windows no longer obstruct my view.
                    Using Kubuntu Linux since March 23, 2007.
                    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                    Comment


                      #11
                      That is not the safe way to open/edit this file.
                      sudo file /boot/grub/grubenv does not open the file for editing or modify it. The file command simply examines the file and reports what type of file it appears to be.​
                      ▁ ▂ ▄ ▅ ▆ ▇ █ ᄂIПЦX FӨЯ ᄂIFΣ █ ▇ ▆ ▅ ▄ ▂ ▁

                      Comment


                        #12
                        Originally posted by die.boer View Post
                        sudo file /boot/grub/grubenv does not open the file for editing or modify it. The file command simply examines the file and reports what type of file it appears to be.​
                        Okay. When I ran that command I got:

                        sudo file /boot/grub/grubenv​
                        /boot/grub/grubenv​: cannot open `/boot/grub/grubenv​' (No such file or directory)


                        I do have file installed.
                        Windows no longer obstruct my view.
                        Using Kubuntu Linux since March 23, 2007.
                        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                        Comment


                          #13
                          there appears to be an extra unicode character '/boot/grub/grubenv​' after the grubenv?
                          ▁ ▂ ▄ ▅ ▆ ▇ █ ᄂIПЦX FӨЯ ᄂIFΣ █ ▇ ▆ ▅ ▄ ▂ ▁

                          Comment


                            #14
                            cat /boot/grub/grubenv
                            # GRUB Environment Block
                            # WARNING: Do not edit this file by tools other than grub-editenv!!!
                            env_block=512+1
                            ################################################## ################################################## ####
                            ################################################## ################################################## ####
                            ################################################## ################################################## ####
                            ################################################## ################################################## ####
                            ################################################## ################################################## ####
                            ################################################## ################################################## ####
                            ################################################## ################################################## ####
                            ################################################## ################################################## ####
                            ################################################## ################################paul@maccat:~$


                            Note: The space 'break' shown in the #'s doesn't exist in the file. The space shown is a product of line length limits in vBulletin.
                            Windows no longer obstruct my view.
                            Using Kubuntu Linux since March 23, 2007.
                            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                            Comment


                              #15
                              mine for instance:

                              jp@jp:~$ admin
                              Password:
                              admin@jp:~$ sudo file /boot/grub/grubenv
                              [sudo: authenticate] Password:
                              /boot/grub/grubenv: ASCII text, with very long lines (930)
                              admin@jp:~$

                              ▁ ▂ ▄ ▅ ▆ ▇ █ ᄂIПЦX FӨЯ ᄂIFΣ █ ▇ ▆ ▅ ▄ ▂ ▁

                              Comment

                              Users Viewing This Topic

                              Collapse

                              There is 1 user viewing this topic.

                              Working...
                              X