1

Earlier I had dual boot ( Windows 10 + Ubuntu 24.04 ), which booted fast. Recently, I cleared the Windows partition and installed Ubuntu, but found out that now booting takes too much time. What can be done and how do I troubleshoot?

Using systemd-analyze gives the below result:

> systemd-analyze 
Startup finished in 10.413s (firmware) + 12.542s (loader) + 7.531s (kernel) + 26.536s (userspace) = 57.024s 
graphical.target reached after 26.511s in userspace.

update

> systemd-analyze  blame

51.204s apt-daily.service 20.255s plymouth-quit-wait.service 5.033s NetworkManager-wait-online.service 2.783s fwupd.service 1.695s plymouth-read-write.service 1.166s logrotate.service 1.008s NetworkManager.service 843ms snapd.seeded.service 742ms systemd-suspend.service 626ms boot-efi.mount 553ms snapd.service 489ms systemd-journal-flush.service 459ms apport.service 389ms man-db.service 333ms udisks2.service 333ms dev-nvme0n1p6.device 274ms gnome-remote-desktop.service

mpboden
  • 3,046
xkeshav
  • 809
  • 1
  • 9
  • 23

1 Answers1

2

Well, the top most time consuming thing is:

51.204s apt-daily.service

I suggest:

  1. Hit the Win key,
  2. start typing Software & Updates
  3. click or select the blue icon as it appears
  4. Click Updates in the top of the window that opened.
  5. Remove Daily from Automatically check for updates:
    Select anything that you find reasonable,
    but realize that short timeframes creates effects similar to what you have seen.

One might wish this check didn't happen at BOOT-time, but that might be hard to without some scripting at least.

A script that runs in Startup Applications (Win key again, as above to find it) might be one doable option

Actually:

#!/bin/env bash
sleep 600 # seconds
sudo apt update

... is enough, but it requires the suid bit to be set (due to sudo).
Hint: https://stackoverflow.com/a/63026866

Hannu
  • 6,605
  • 1
  • 28
  • 45