Announcement

Collapse
No announcement yet.

Extremely long boot time

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

    #31
    i suspect you've done an update while pursuing this problem , and the update fixed it ...
    could you do a clean reboot and see if it's faster ?
    ▁ ▂ ▄ ▅ ▆ ▇ █ ᄂIПЦX FӨЯ ᄂIFΣ █ ▇ ▆ ▅ ▄ ▂ ▁

    Comment


      #32
      I have, and it isn't.

      My gut tells me that some processes is being called that is expecting something that doesn't exist and waits until it times out before the boot process proceeds. What that is I haven't a clue.

      I haven't yet tried recreating the /boot/grub/grubenv file to eliminate it being corrupted or contains a persistent variable (or variables) that are causing this issue.
      Slava Ukraini! 🇺🇦
      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


        #33
        reboot again and immediately after logging in , run
        Code:
        systemctl show grub-common.service -p ExecMainStartTimestamp -p ExecMainExitTimestamp -p ExecMainPID -p InactiveExitTimestamp
        Code:
        journalctl -b -u grub-common.service -o short-monotonic --no-pager
        and the ones from post #30
        Last edited by die.boer; Aug 21, 2026, 03:22 PM.
        ▁ ▂ ▄ ▅ ▆ ▇ █ ᄂIПЦX FӨЯ ᄂIFΣ █ ▇ ▆ ▅ ▄ ▂ ▁

        Comment


          #34
          systemctl show grub-common.service -p ExecMainStartTimestamp -p ExecMainExitTimestamp -p
          ExecMainPID -p InactiveExitTimestamp
          InactiveExitTimestamp=Fri 2026-08-21 16:52:06 CDT
          ExecMainStartTimestamp=
          ExecMainExitTimestamp=


          ​
          journalctl -b -u grub-common.service -o short-monotonic --no-pager
          [ 30.504227] maccat systemd[1]: Starting grub-common.service - LSB: Record successful boot for GRUB...
          [ 32.833205] maccat grub-common[948]: * Recording successful boot for GRUB
          [ 115.396779] maccat grub-common[948]: ...done.
          [ 115.398417] maccat systemd[1]: Started grub-common.service - LSB: Record successful boot for GRUB.


          ​
          Slava Ukraini! 🇺🇦
          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


            #35
            please run
            Code:
            sudo time grub-editenv /boot/grub/grubenv unset recordfail
            and then immediately
            Code:
            sudo time grub-editenv /boot/grub/grubenv list
            after that , also
            Code:
            systemctl cat grub-common.service
            Code:
            systemctl show grub-common.service \
            -p Type \
            -p ExecStart \
            -p TimeoutStartUSec \
            -p Before \
            -p After \
            -p Requires \
            -p Wants​
            ▁ ▂ ▄ ▅ ▆ ▇ █ ᄂIПЦX FӨЯ ᄂIFΣ █ ▇ ▆ ▅ ▄ ▂ ▁

            Comment


              #36
              sudo time grub-editenv /boot/grub/grubenv unset recordfail
              [sudo: authenticate] Password:
              0.00user 0.04system 0:01.81elapsed 2%CPU (0avgtext+0avgdata 6744maxresident)k
              11248inputs+6704outputs (0major+691minor)pagefaults 0swaps


              ​
              sudo time grub-editenv /boot/grub/grubenv list
              env_block=512+1
              0.00user 0.04system 0:01.44elapsed 3%CPU (0avgtext+0avgdata 6480maxresident)k
              11280inputs+3040outputs (0major+691minor)pagefaults 0swaps


              ​
              systemctl show grub-common.service \
              -p Type \
              -p ExecStart \
              -p TimeoutStartUSec \
              -p Before \
              -p After \
              -p Requires \
              -p Wants​


              Requires=system.slice sysinit.target

              Before=graphical.target multi-user.target shutdown.target
              After=basic.target systemd-journald.socket all.target sysinit.target system.slice
              Type=forking
              TimeoutStartUSec=5min
              ExecStart={ path=/etc/init.d/grub-common ; argv[]=/etc/init.d/grub-common start ; ignore_errors=no ; start_time=[Fri 2026-08-21 16:52:06 CDT] ; stop_time=[Fri 2026-08-21 16:53:30 CDT] ; pid=9>

              ​

              ​
              Slava Ukraini! 🇺🇦
              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


                #37
                Code:
                systemctl cat grub-common.service
                Code:
                systemctl show grub-common.service \
                -p FragmentPath \
                -p SourcePath \
                -p Type \
                -p RemainAfterExit \
                -p GuessMainPID \
                -p PIDFile \
                -p ExecStart \
                -p TimeoutStartUSec​
                Code:
                systemctl show grub-common.service \
                -p MainPID \
                -p ControlPID \
                -p ExecMainPID​
                Code:
                time sudo systemctl start grub-common.service
                ▁ ▂ ▄ ▅ ▆ ▇ █ ᄂIПЦX FӨЯ ᄂIFΣ █ ▇ ▆ ▅ ▄ ▂ ▁

                Comment


                  #38
                  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

                  ​
                  systemctl show grub-common.service \
                  -p FragmentPath \
                  -p SourcePath \
                  -p Type \
                  -p RemainAfterExit \
                  -p GuessMainPID \
                  -p PIDFile \
                  -p ExecStart \
                  -p TimeoutStartUSec​
                  FragmentPath=/run/systemd/generator.late/grub-common.service
                  SourcePath=/etc/init.d/grub-common
                  Type=forking
                  PIDFile=
                  RemainAfterExit=yes
                  GuessMainPID=no
                  ExecStart={ path=/etc/init.d/grub-common ; argv[]=/etc/init.d/grub-common start ; ignore_errors=no ; start_time=[Fri 2026-08-21 16:52:06 >

                  ​

                  systemctl show grub-common.service \
                  -p MainPID \
                  -p ControlPID \
                  -p ExecMainPID​
                  MainPID=0
                  ControlPID=0


                  ​
                  time sudo systemctl start grub-common.service
                  [sudo: authenticate] Password:

                  real0m4.626s
                  user0m0.056s
                  sys0m0.035s


                  ​
                  Slava Ukraini! 🇺🇦
                  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


                    #39
                    Code:
                    systemctl status grub-common.service grub2-common.service --no-pager -l
                    Code:
                    systemctl show grub-common.service -p After -p Before -p Requires -p Wants
                    Code:
                    systemctl show grub2-common.service -p After -p Before -p Requires -p Wants
                    Code:
                    systemd-analyze critical-chain grub-common.service
                    Code:
                    systemd-analyze critical-chain grub2-common.service
                    ▁ ▂ ▄ ▅ ▆ ▇ █ ᄂIПЦX FӨЯ ᄂIFΣ █ ▇ ▆ ▅ ▄ ▂ ▁

                    Comment


                      #40
                      systemctl status grub-common.service grub2-common.service --no-pager -l
                      ● grub-common.service - LSB: Record successful boot for GRUB
                      Loaded: loaded (/etc/init.d/grub-common; generated)
                      Active: active (exited) since Fri 2026-08-21 16:53:30 CDT; 2 days ago
                      Invocation: 961fd26322f84331befcfb1774e05538
                      Docs: man:systemd-sysv-generator(8)
                      Process: 948 ExecStart=/etc/init.d/grub-common start (code=exited, status=0/SUCCESS)
                      Mem peak: 7.5M
                      CPU: 100ms

                      Aug 21 16:52:06 maccat systemd[1]: Starting grub-common.service - LSB: Record successful boot for GRUB...
                      Aug 21 16:52:08 maccat grub-common[948]: * Recording successful boot for GRUB
                      Aug 21 16:53:30 maccat grub-common[948]: ...done.
                      Aug 21 16:53:30 maccat systemd[1]: Started grub-common.service - LSB: Record successful boot for GRUB.

                      ○ grub2-common.service - Record successful boot for GRUB
                      Loaded: loaded (/usr/lib/systemd/system/grub2-common.service; enabled; preset: enabled)
                      Active: inactive (dead) since Mon 2026-08-24 09:13:50 CDT; 33s ago
                      Invocation: 052a28fda772444e84a4e87fb9afc96d
                      Process: 5936 ExecStartPre=/bin/sh -c [ -s /boot/grub/grubenv ] || rm -f /boot/grub/grubenv; mkdir -p /boot/grub (code=exited, status=
                      0/SUCCESS)
                      Process: 5944 ExecStart=grub-editenv /boot/grub/grubenv unset recordfail (code=exited, status=0/SUCCESS)
                      Process: 6112 ExecStartPost=/bin/sh -c if grub-editenv /boot/grub/grubenv list | grep -q initrdless_boot_fallback_triggered=1; then ec
                      ho "grub: GRUB_FORCE_PARTUUID set, initrdless boot paniced, fallback triggered."; fi (code=exited, status=0/SUCCESS)
                      Main PID: 5944 (code=exited, status=0/SUCCESS)
                      Mem peak: 7.8M
                      CPU: 494ms

                      Aug 24 09:12:50 maccat systemd[1]: Starting grub2-common.service - Record successful boot for GRUB...
                      Aug 24 09:13:50 maccat systemd[1]: grub2-common.service: Deactivated successfully.
                      Aug 24 09:13:50 maccat systemd[1]: Finished grub2-common.service - Record successful boot for GRUB.

                      ​

                      systemctl show grub-common.service -p After -p Before -p Requires -p Wants
                      Requires=system.slice sysinit.target
                      Wants=
                      Before=graphical.target multi-user.target shutdown.target
                      After=basic.target systemd-journald.socket all.target sysinit.target system.slice


                      ​
                      systemctl show grub2-common.service -p After -p Before -p Requires -p Wants
                      Requires=system.slice sysinit.target boot-complete.target
                      Wants=
                      Before=grub-initrd-fallback.service multi-user.target shutdown.target
                      After=suspend.target systemd-journald.socket system.slice sysinit.target boot-complete.target hybrid-sleep.target hibernate.target basic.>

                      ​

                      systemd-analyze critical-chain grub-common.service
                      The time when unit became active or started is printed after the "@" character.
                      The time the unit took to start is printed after the "+" character.


                      grub-common.service +1min 24.894s
                      └─basic.target @21.949s
                      └─sockets.target @21.949s
                      └─snapd.socket @21.938s +10ms
                      └─sysinit.target @21.865s
                      └─snapd.apparmor.service @21.226s +638ms
                      └─apparmor.service @18.754s +2.467s
                      └─local-fs.target @18.749s
                      └─run-snapd-ns-canonical\x2dlivepatch.mnt.mount @37.540s
                      └─run-snapd-ns.mount @34.574s
                      └─local-fs-pre.target @7.261s
                      └─keyboard-setup.service @5.422s +1.838s
                      └─systemd-journald.socket @5.319s +306us
                      └─system.slice @5.232s
                      └─-.slice @5.232s

                      ​
                      systemd-analyze critical-chain grub2-common.service

                      The time when unit became active or started is printed after the "@" character.
                      The time the unit took to start is printed after the "+" character.

                      grub2-common.service +1min 232ms
                      └─basic.target @21.949s
                      └─sockets.target @21.949s
                      └─snapd.socket @21.938s +10ms
                      └─sysinit.target @21.865s
                      └─snapd.apparmor.service @21.226s +638ms
                      └─apparmor.service @18.754s +2.467s
                      └─local-fs.target @18.749s
                      └─run-snapd-ns-canonical\x2dlivepatch.mnt.mount @37.540s
                      └─run-snapd-ns.mount @34.574s
                      └─local-fs-pre.target @7.261s
                      └─keyboard-setup.service @5.422s +1.838s
                      └─systemd-journald.socket @5.319s +306us
                      └─system.slice @5.232s
                      └─-.slice @5.232s

                      ​
                      Slava Ukraini! 🇺🇦
                      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


                        #41
                        Code:
                        systemctl show grub2-common.service \
                        -p TimeoutStartUSec \
                        -p TimeoutStopUSec \
                        -p JobTimeoutUSec \
                        -p JobRunningTimeoutUSec \
                        -p Type \
                        -p RemainAfterExit \
                        -p ExecMainStartTimestamp \
                        -p ExecMainExitTimestamp​
                        Code:
                        systemctl show grub-common.service \
                        -p TimeoutStartUSec \
                        -p TimeoutStopUSec \
                        -p JobTimeoutUSec \
                        -p JobRunningTimeoutUSec \
                        -p Type \
                        -p RemainAfterExit​
                        Code:
                        systemd-analyze critical-chain boot-complete.target
                        Code:
                        systemctl status boot-complete.target --no-pager -l
                        Code:
                        systemctl list-dependencies boot-complete.target
                        ▁ ▂ ▄ ▅ ▆ ▇ █ ᄂIПЦX FӨЯ ᄂIFΣ █ ▇ ▆ ▅ ▄ ▂ ▁

                        Comment


                          #42
                          Please tell me what you are attempting to discern. I don't see the point in continually providing the output of the commands; same commands; over and over again.
                          Slava Ukraini! 🇺🇦
                          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


                            #43
                            sorry ...yea i can understand the frustration , just running commands without any explanation ...(i'm just lazy at typing lol)
                            We have already established several things:
                            -grubenv is readable and valid.
                            -grub-editenv works.
                            -Running grub-editenv manually takes 1–2 seconds.
                            -Starting grub-common.service manually takes 4.6 seconds.
                            -Therefore, GRUB itself isn't inherently taking 80–90 seconds.
                            -The kernel shows no obvious SATA/Btrfs I/O errors.
                            -grub-common is a legacy SysV script automatically wrapped by systemd.
                            -There is also a separate native grub2-common.service.

                            We also see grub-common.service +1min 24.894s and grub2-common.service +1min 0.232s​ , ,yet both have a critical-chain beginning around basic.target @21.949s
                            That says it's probably a systemd boot-ordering/transaction issue, not a slow GRUB operation.​
                            Then there is also this : run-snapd-ns.mount @34.574s
                            run-snapd-ns-canonical-livepatch.mnt.mount @37.540s​
                            and snapd.apparmor.service
                            apparmor.service​

                            So we wanna see whether the delay is actually being introduced by the Snap/AppArmor/Livepatch part of the boot transaction, and merely being attributed to the GRUB services because of systemd's ordering.​

                            grub2-common.service explicitly waits for boot-complete.target. So we want to see which unit is holding boot-complete.target up.​
                            We're looking for something like:
                            boot-complete.target @...
                            ─ some-service.service @... +60s
                            or a dependency involving Snap/Livepatch, networking, storage, etc.
                            ​so this will tell us hopefully
                            Code:
                            systemd-analyze critical-chain boot-complete.target
                            ▁ ▂ ▄ ▅ ▆ ▇ █ ᄂIПЦX FӨЯ ᄂIFΣ █ ▇ ▆ ▅ ▄ ▂ ▁

                            Comment


                              #44
                              Thank you!

                              systemctl show grub2-common.service \
                              -p TimeoutStartUSec \
                              -p TimeoutStopUSec \
                              -p JobTimeoutUSec \
                              -p JobRunningTimeoutUSec \
                              -p Type \
                              -p RemainAfterExit \
                              -p ExecMainStartTimestamp \
                              -p ExecMainExitTimestamp​
                              JobTimeoutUSec=infinity
                              JobRunningTimeoutUSec=infinity
                              Type=oneshot
                              TimeoutStartUSec=infinity
                              TimeoutStopUSec=1min 30s
                              RemainAfterExit=no
                              ExecMainStartTimestamp=Mon 2026-08-24 14:55:49 CDT


                              ​
                              systemctl show grub-common.service \
                              -p TimeoutStartUSec \
                              -p TimeoutStopUSec \
                              -p JobTimeoutUSec \
                              -p JobRunningTimeoutUSec \
                              -p Type \

                              -p RemainAfterExit​
                              JobTimeoutUSec=infinity
                              JobRunningTimeoutUSec=infinity
                              Type=forking
                              TimeoutStartUSec=5min
                              TimeoutStopUSec=5min


                              ​
                              systemd-analyze critical-chain boot-complete.target
                              The time when unit became active or started is printed after the "@" character.
                              The time the unit took to start is printed after the "+" character.


                              boot-complete.target @21.930s
                              └─sysinit.target @21.865s
                              └─snapd.apparmor.service @21.226s +638ms
                              └─apparmor.service @18.754s +2.467s
                              └─local-fs.target @18.749s
                              └─run-snapd-ns-canonical\x2dlivepatch.mnt.mount @37.540s
                              └─run-snapd-ns.mount @34.574s
                              └─local-fs-pre.target @7.261s
                              └─keyboard-setup.service @5.422s +1.838s
                              └─systemd-journald.socket @5.319s +306us
                              └─system.slice @5.232s
                              └─-.slice @5.232s

                              ​
                              systemctl status boot-complete.target --no-pager -l
                              ● boot-complete.target - Boot Completion Check
                              Loaded: loaded (/usr/lib/systemd/system/boot-complete.target; static)
                              Active: active since Fri 2026-08-21 16:52:06 CDT; 2 days ago
                              Invocation: a1b2d66061634c9d8608aa275af75647
                              Docs: man:systemd.special(7)

                              Aug 21 16:52:06 maccat systemd[1]: Reached target boot-complete.target - Boot Completion Check.


                              systemctl list-dependencies boot-complete.target
                              boot-complete.target

                              ● └─sysinit.target
                              ● ├─apparmor.service
                              ● ├─dev-hugepages.mount
                              ● ├─dev-mqueue.mount
                              ● ├─keyboard-setup.service
                              ● ├─kmod-static-nodes.service
                              ○ ├─ldconfig.service
                              ● ├─netplan-configure.service
                              ● ├─plymouth-read-write.service
                              ● ├─plymouth-start.service
                              ● ├─proc-sys-fs-binfmt_misc.automount
                              ● ├─setvtrgb.service
                              ● ├─sys-fs-fuse-connections.mount
                              ● ├─sys-kernel-config.mount
                              ● ├─sys-kernel-debug.mount
                              ● ├─sys-kernel-tracing.mount
                              ○ ├─systemd-ask-password-console.path
                              ● ├─systemd-binfmt.service
                              ○ ├─systemd-firstboot.service
                              ○ ├─systemd-hibernate-clear.service
                              ○ ├─systemd-hwdb-update.service
                              ○ ├─systemd-journal-catalog-update.service
                              ● ├─systemd-journal-flush.service
                              ● ├─systemd-journald.service
                              ○ ├─systemd-machine-id-commit.service
                              ● ├─systemd-modules-load.service
                              ○ ├─systemd-pcrmachine.service
                              ○ ├─systemd-pcrnvdone.service
                              ○ ├─systemd-pcrphase-sysinit.service
                              ○ ├─systemd-pcrphase.service

                              ​
                              Slava Ukraini! 🇺🇦
                              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


                                #45
                                lets see if the 84-second delay happens inside the script or because systemd is waiting for the script/process incorrectly​
                                Code:
                                sudo time /etc/init.d/grub-common start
                                ▁ ▂ ▄ ▅ ▆ ▇ █ ᄂIПЦX FӨЯ ᄂIFΣ █ ▇ ▆ ▅ ▄ ▂ ▁

                                Comment

                                Users Viewing This Topic

                                Collapse

                                There are 0 users viewing this topic.

                                Working...
                                X