Announcement

Collapse
No announcement yet.

Extremely long boot time

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

    #16
    and these
    Code:
    systemctl show grub-common.service -p After -p Before -p Wants -p Requires
    Code:
    systemctl list-dependencies --reverse grub-common.service
    Code:
    systemd-analyze critical-chain grub-common.service
    all are read only
    ▁ ▂ ▄ ▅ ▆ ▇ █ ᄂIПЦX FӨЯ ᄂIFΣ █ ▇ ▆ ▅ ▄ ▂ ▁

    Comment


      #17
      That's the result I get running that command on my Linux desktop PC. The final number for mine is (914).

      But I can't run the command on the laptop as shown in post #12 above.
      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


        #18
        can you do post #16 ?
        ▁ ▂ ▄ ▅ ▆ ▇ █ ᄂIПЦX FӨЯ ᄂIFΣ █ ▇ ▆ ▅ ▄ ▂ ▁

        Comment


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


          ​
          systemctl list-dependencies --reverse grub-common.service
          grub-common.service
          ● ├─graphical.target
          ○ ├─hibernate.target
          ○ ├─hybrid-sleep.target
          ● ├─multi-user.target
          ● │ └─graphical.target
          ○ ├─sleep.target
          ○ │ ├─systemd-hibernate.service
          ○ │ ├─systemd-hybrid-sleep.service
          ○ │ ├─systemd-suspend-then-hibernate.service
          ○ │ └─systemd-suspend.service
          ○ ├─suspend-then-hibernate.target
          ○ └─suspend.target

          ​

          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 35.408s
          └─basic.target @30.938s
          └─sockets.target @30.938s
          └─snapd.socket @30.924s +13ms
          └─sysinit.target @30.870s
          └─snapd.apparmor.service @29.529s +1.338s
          └─apparmor.service @26.874s +2.651s
          └─local-fs.target @26.867s
          └─run-snapd-ns-canonical\x2dlivepatch.mnt.mount @48.817s
          └─run-snapd-ns.mount @45.733s
          └─local-fs-pre.target @8.897s
          └─systemd-tmpfiles-setup-dev.service @8.838s +55ms
          └─systemd-tmpfiles-setup-dev-early.service @6.252s +2.562s
          └─kmod-static-nodes.service @5.528s +222ms
          └─systemd-journald.socket @5.450s +195us
          └─-.mount @5.355s
          └─-.slice @5.355s


          ​
          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


            #20
            make backup 1st
            Code:
            sudo cp -a /boot/grub/grubenv /boot/grub/grubenv.backup
            then run
            Code:
            time sudo grub-editenv /boot/grub/grubenv unset recordfail
            and post the timing/output.
            ▁ ▂ ▄ ▅ ▆ ▇ █ ᄂIПЦX FӨЯ ᄂIFΣ █ ▇ ▆ ▅ ▄ ▂ ▁

            Comment


              #21
              real0m0.003s
              user0m0.001s
              sys0m0.003s


              ​
              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


                #22
                Code:
                journalctl -b -u grub-common.service --no-pager
                Code:
                systemctl status grub-common.service --no-pager -l
                you know what to do lol...
                ▁ ▂ ▄ ▅ ▆ ▇ █ ᄂIПЦX FӨЯ ᄂIFΣ █ ▇ ▆ ▅ ▄ ▂ ▁

                Comment


                  #23
                  journalctl -b -u grub-common.service --no-pager
                  Aug 19 11:55:46 maccat systemd[1]: Starting grub-common.service - LSB: Record successful boot for 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.


                  ​
                  systemctl status grub-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 Wed 2026-08-19 11:57:22 CDT; 1 day 3h ago
                  Invocation: f359848bcb2f4113a5d360bdb4e16e8f
                  Docs: man:systemd-sysv-generator(8)
                  Mem peak: 3.7M
                  CPU: 69ms

                  Aug 19 11:55:46 maccat systemd[1]: Starting grub-common.service - LSB: Record successful boot for 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.


                  ​
                  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


                    #24
                    ok... what we know , the timeline is:
                    ​11:55:46 systemd starts grub-common
                    11:55:47 "Recording successful boot for GRUB"
                    ↓
                    ↓ 95 seconds
                    ↓
                    11:57:22 "...done."
                    11:57:22 systemd considers it started​

                    and CPU is CPU: 69ms
                    while the actual command: sudo grub-editenv /boot/grub/grubenv unset recordfail takes 0.003 seconds
                    So the 95 seconds is not normal GRUB work.​
                    log_end_msg $? The script calls log_end_msg after grub-editenv finishes. We know grub-editenv finishes almost immediately when run manually​
                    That means we should determine exactly which part of the init script is blocking under systemd.​

                    please run
                    Code:
                    time sudo test -s /boot/grub/grubenv
                    then
                    Code:
                    time sudo mkdir -p /boot/grub
                    (These are all safe, except none of them will alter anything except the grub-editenv command we've already tested.​ mkdir -p is harmless if the directory already exists.​)
                    finally
                    Code:
                    time sudo true
                    If those all return essentially instantly, then we're left with the LSB logging/systemd interaction itself.


                    also:your system is showing:
                    run-snapd-ns-canonical-livepatch.mnt.mount @48.817s
                    run-snapd-ns.mount @45.733s​


                    That tells us Canonical Livepatch/Snap is installed and participating in boot.
                    It doesn't prove that Snap causes the 95-second grub-common delay, but the combination is unusual

                    also run
                    Code:
                    snap list
                    Code:
                    systemctl list-units --failed
                    Code:
                    systemd-analyze blame | head -30
                    (all are read-only)

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

                    Comment


                      #25
                      time sudo test -s /boot/grub/grubenv
                      [sudo: authenticate] Password:

                      real0m4.203s
                      user0m0.046s
                      sys0m0.044s
                      ​
                      systemctl list-units --failed
                      UNIT LOAD ACTIVE SUB DESCRIPTION

                      0 loaded units listed.
                      ​

                      systemd-analyze blame | head -30
                      1min 35.408s grub-common.service
                      1min 30.315s apt-daily.service
                      56.110s e2scrub_reap.service
                      40.350s smbd.service
                      21.103s systemd-journal-flush.service
                      19.916s dev-sda3.device
                      18.258s fwupd.service
                      15.807s grub2-common.service
                      15.668s man-db.service
                      11.031s udisks2.service
                      10.829s plocate-updatedb.service
                      10.346s dev-loop6.device
                      10.212s dev-loop9.device
                      10.136s dev-loop8.device
                      9.675s dev-loop10.device
                      9.298s dev-loop3.device
                      9.280s dev-loop4.device
                      9.194s dev-loop1.device
                      9.037s dev-loop7.device
                      8.843s dev-loop2.device
                      8.815s dev-loop0.device
                      8.702s accounts-daemon.service
                      7.160s systemd-suspend.service
                      6.982s polkit.service
                      6.949s NetworkManager.service
                      6.338s avahi-daemon.service
                      6.334s bluetooth.service
                      6.299s dbus.service
                      6.138s switcheroo-control.service
                      6.082s ModemManager.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


                        #26
                        At this point, it looks like GRUB is not broken . but there is an underlying storage/filesystem or boot-time I/O delay, and several services are getting caught in it​

                        run

                        Code:
                        findmnt /
                        Code:
                        lsblk -o NAME,TYPE,FSTYPE,SIZE,MOUNTPOINTS,UUID
                        Code:
                        systemctl status apt-daily.service --no-pager -l
                        Code:
                        systemd-analyze critical-chain apt-daily.service
                        ▁ ▂ ▄ ▅ ▆ ▇ █ ᄂIПЦX FӨЯ ᄂIFΣ █ ▇ ▆ ▅ ▄ ▂ ▁

                        Comment


                          #27
                          findmnt /
                          TARGET SOURCE FSTYPE OPTIONS
                          / /dev/sda3[/@] btrfs rw,relatime,space_cache=v2,subvolid=256,subvol=/@


                          ​
                          lsblk -o NAME,TYPE,FSTYPE,SIZE,MOUNTPOINTS,UUID
                          NAME TYPE FSTYPE SIZE MOUNTPOINTS UUID
                          loop0 loop squashfs 74M /snap/core22/2437
                          loop1 loop squashfs 13.5M /snap/canonical-livepatch/406
                          loop2 loop squashfs 63.8M /snap/core20/2866
                          loop3 loop squashfs 66.8M /snap/core24/1643
                          loop4 loop squashfs 349.7M /snap/gnome-3-38-2004/143
                          loop5 loop squashfs 4K /snap/bare/5
                          loop6 loop squashfs 531.5M /snap/gnome-42-2204/263
                          loop7 loop squashfs 91.7M /snap/gtk-common-themes/1535
                          loop8 loop squashfs 614.5M /snap/gnome-46-2404/164
                          loop9 loop squashfs 50.1M /snap/snapd/27710
                          loop10 loop squashfs 402M /snap/mesa-2404/1839
                          loop12 loop squashfs 221.1M /snap/thunderbird/1228
                          sda disk 465.8G
                          ├─sda1 part 1M
                          ├─sda2 part vfat 513M /boot/efi DE2A-0851
                          └─sda3 part btrfs 465.3G /home 6209eee3-35d1-4fcd-b70a-1ac283cc2728
                          /
                          sr0 rom 1024M


                          ​
                          systemctl status apt-daily.service --no-pager -l
                          ○ apt-daily.service - Daily apt download activities
                          Loaded: loaded (/usr/lib/systemd/system/apt-daily.service; static)
                          Active: inactive (dead) since Fri 2026-08-21 13:36:45 CDT; 37min ago
                          Invocation: f8e29f7c5ade499998a31759b6c1e8d0
                          TriggeredBy: ● apt-daily.timer
                          Docs: man:apt(8)
                          Main PID: 128773 (code=exited, status=0/SUCCESS)
                          Mem peak: 374.8M
                          CPU: 46.456s

                          Aug 21 13:35:15 maccat systemd[1]: Starting apt-daily.service - Daily apt download activities...
                          Aug 21 13:36:45 maccat systemd[1]: apt-daily.service: Deactivated successfully.
                          Aug 21 13:36:45 maccat systemd[1]: Finished apt-daily.service - Daily apt download activities.
                          Aug 21 13:36:45 maccat systemd[1]: apt-daily.service: Consumed 46.456s CPU time over 1min 30.315s wall c
                          lock time, 374.8M memory peak.


                          ​
                          systemd-analyze critical-chain apt-daily.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.

                          apt-daily.service +1min 30.315s
                          └─network-online.target @50.306s
                          └─NetworkManager-wait-online.service @44.245s +6.059s
                          └─NetworkManager.service @37.290s +6.949s
                          └─dbus.service @30.960s +6.299s
                          └─basic.target @30.938s
                          └─sockets.target @30.938s
                          └─uuidd.socket @30.929s +114us
                          └─sysinit.target @30.870s
                          └─apparmor.service @26.874s +2.651s
                          └─local-fs.target @26.867s
                          └─run-snapd-ns-canonical\x2dlivepatch.mnt.mount @48.817s
                          └─run-snapd-ns.mount @45.733s
                          └─local-fs-pre.target @8.897s
                          └─systemd-tmpfiles-setup-dev.service @8.838s +55ms
                          └─systemd-tmpfiles-setup-dev-early.service @6.252s +2.562s
                          └─kmod-static-nodes.service @5.528s +222ms
                          └─systemd-journald.socket @5.450s +195us
                          └─-.mount @5.355s
                          └─-.slice @5.355s
                          paul@mac

                          ​
                          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


                            #28
                            output of these ?

                            Code:
                            systemctl status grub2-common.service --no-pager -l
                            Code:
                            systemctl cat grub2-common.service
                            Code:
                            systemd-analyze critical-chain grub2-common.service
                            Code:
                            journalctl -b -u apt-daily.service --no-pager -l
                            Code:
                            sudo dmesg -T | grep -Ei 'sda|ata|btrfs|I/O error|error|timeout|reset'
                            ▁ ▂ ▄ ▅ ▆ ▇ █ ᄂIПЦX FӨЯ ᄂIFΣ █ ▇ ▆ ▅ ▄ ▂ ▁

                            Comment


                              #29
                              systemctl status grub2-common.service --no-pager -l
                              ○ grub2-common.service - Record successful boot for GRUB
                              Loaded: loaded (/usr/lib/systemd/system/grub2-common.service; enabled; preset: enabled)
                              Active: inactive (dead) since Fri 2026-08-21 14:41:36 CDT; 32s ago
                              Invocation: 0322c667782945a4b77f0bd191a95f46
                              Process: 163798 ExecStartPre=/bin/sh -c [ -s /boot/grub/grubenv ] || rm -f /boot/grub/grubenv; mkdir
                              -p /boot/grub (code=exited, status=0/SUCCESS)
                              Process: 163808 ExecStart=grub-editenv /boot/grub/grubenv unset recordfail (code=exited, status=0/SU
                              CCESS)
                              Process: 163885 ExecStartPost=/bin/sh -c if grub-editenv /boot/grub/grubenv list | grep -q initrdles
                              s_boot_fallback_triggered=1; then echo "grub: GRUB_FORCE_PARTUUID set, initrdless boot paniced, fallback
                              triggered."; fi (code=exited, status=0/SUCCESS)
                              Main PID: 163808 (code=exited, status=0/SUCCESS)
                              Mem peak: 7.8M
                              CPU: 250ms

                              Aug 21 14:41:28 maccat systemd[1]: Starting grub2-common.service - Record successful boot for GRUB...
                              Aug 21 14:41:36 maccat systemd[1]: grub2-common.service: Deactivated successfully.
                              Aug 21 14:41:36 maccat systemd[1]: Finished grub2-common.service - Record successful boot for GRUB.


                              ​
                              systemctl cat grub2-common.service
                              # /usr/lib/systemd/system/grub2-common.service
                              [Unit]
                              Description=Record successful boot for GRUB
                              Requires=boot-complete.target
                              After=boot-complete.target suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.t>
                              ConditionPathExists=/boot/grub/grub.cfg

                              [Service]
                              Type=oneshot
                              Restart=no
                              ExecStartPre=/bin/sh -c '[ -s /boot/grub/grubenv ] || rm -f /boot/grub/grubenv; mkdir -p /boot/grub'
                              ExecStart=grub-editenv /boot/grub/grubenv unset recordfail
                              ExecStartPost=/bin/sh -c 'if grub-editenv /boot/grub/grubenv list | grep -q initrdless_boot_fallback_tr>
                              StandardOutput=kmsg

                              [Install]
                              WantedBy=multi-user.target
                              ​

                              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 +8.030s
                              └─basic.target @30.938s
                              └─sockets.target @30.938s
                              └─uuidd.socket @30.929s +114us
                              └─sysinit.target @30.870s
                              └─apparmor.service @26.874s +2.651s
                              └─local-fs.target @26.867s
                              └─run-snapd-ns-canonical\x2dlivepatch.mnt.mount @48.817s
                              └─run-snapd-ns.mount @45.733s
                              └─local-fs-pre.target @8.897s
                              └─systemd-tmpfiles-setup-dev.service @8.838s +55ms
                              └─systemd-tmpfiles-setup-dev-early.service @6.252s +2.562s
                              └─kmod-static-nodes.service @5.528s +222ms
                              └─systemd-journald.socket @5.450s +195us
                              └─-.mount @5.355s


                              ​
                              journalctl -b -u apt-daily.service --no-pager -l
                              Aug 19 13:58:55 maccat systemd[1]: Starting apt-daily.service - Daily apt download activities...
                              Aug 19 13:59:31 maccat systemd[1]: apt-daily.service: Deactivated successfully.
                              Aug 19 13:59:31 maccat systemd[1]: Finished apt-daily.service - Daily apt download activities.
                              Aug 19 13:59:31 maccat systemd[1]: apt-daily.service: Consumed 19.365s CPU time over 35.575s wall clock
                              time, 300.3M memory peak.
                              Aug 19 20:01:49 maccat systemd[1]: Starting apt-daily.service - Daily apt download activities...
                              Aug 19 20:01:51 maccat systemd[1]: apt-daily.service: Deactivated successfully.
                              Aug 19 20:01:51 maccat systemd[1]: Finished apt-daily.service - Daily apt download activities.
                              Aug 19 20:01:51 maccat systemd[1]: apt-daily.service: Consumed 1.646s CPU time over 1.680s wall clock ti
                              me, 27.9M memory peak.
                              Aug 20 10:08:47 maccat systemd[1]: Starting apt-daily.service - Daily apt download activities...
                              Aug 20 10:09:20 maccat systemd[1]: apt-daily.service: Deactivated successfully.
                              Aug 20 10:09:20 maccat systemd[1]: Finished apt-daily.service - Daily apt download activities.
                              Aug 20 10:09:20 maccat systemd[1]: apt-daily.service: Consumed 27.634s CPU time over 32.996s wall clock
                              time, 473.4M memory peak.
                              Aug 20 19:43:59 maccat systemd[1]: Starting apt-daily.service - Daily apt download activities...
                              Aug 20 19:44:00 maccat systemd[1]: apt-daily.service: Deactivated successfully.
                              Aug 20 19:44:00 maccat systemd[1]: Finished apt-daily.service - Daily apt download activities.
                              Aug 20 19:44:00 maccat systemd[1]: apt-daily.service: Consumed 1.480s CPU time over 1.497s wall clock ti
                              me, 28M memory peak.
                              Aug 21 13:35:15 maccat systemd[1]: Starting apt-daily.service - Daily apt download activities...
                              Aug 21 13:36:45 maccat systemd[1]: apt-daily.service: Deactivated successfully.
                              Aug 21 13:36:45 maccat systemd[1]: Finished apt-daily.service - Daily apt download activities.
                              Aug 21 13:36:45 maccat systemd[1]

                              ​lock time, 374.8M memory peak.


                              sudo dmesg -T | grep -Ei 'sda|ata|btrfs|I/O error|error|timeout|reset'
                              ​ dmest.txt
                              Attached Files
                              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


                                #30
                                we getting somewhere eventually lol
                                output of these 2 ?
                                Code:
                                systemctl list-unit-files | grep -i grub
                                Code:
                                dpkg -l | grep -i grub​
                                ▁ ▂ ▄ ▅ ▆ ▇ █ ᄂIПЦX FӨЯ ᄂIFΣ █ ▇ ▆ ▅ ▄ ▂ ▁

                                Comment

                                Users Viewing This Topic

                                Collapse

                                There are 0 users viewing this topic.

                                Working...
                                X