1

The booting process of Ubuntu 20.04 is taking too much time. I would like to know how to improve boot time.

Here is my Hardware Information:

  • RAM - 4GB
  • Disk Type - HDD
  • Disk Space - 1TB
  • Architecture - amd64
  • Processor - Intel(core i3) 7th generation

If there is any other required information, please comment and I will provide it.

output of dmesg:

Output file click to see

systemd-analyze output:

Startup finished in 4.133s (firmware) + 5.169s (loader) + 5.074s (kernel) + 31min 12.092s (userspace) = 31min 26.470s 
graphical.target reached after 3min 9.875s in userspace

systemd-anlyze blame output :

30min 36.678s fstrim.service                                                                           
 2min 19.796s plymouth-quit-wait.service                                                               
      33.670s snapd.service                                                                            
      31.615s networkd-dispatcher.service                                                              
      28.168s udisks2.service                                                                          
      21.824s accounts-daemon.service                                                                  
      21.649s fwupd.service                                                                            
      16.696s systemd-tmpfiles-clean.service                                                           
      16.168s ModemManager.service                                                                     
      15.824s dev-sda3.device                                                                          
      14.959s polkit.service                                                                           
      14.086s avahi-daemon.service                                                                     
      14.085s bluetooth.service                                                                        
      14.060s NetworkManager.service                                                                   
      14.049s dundee.service                                                                           
      14.018s ofono.service                                                                            
      13.795s switcheroo-control.service                                                               
      13.787s thermald.service                                                                         
      13.782s wpa_supplicant.service                                                                   
      13.780s systemd-logind.service                                                                   
      10.643s systemd-tmpfiles-setup.service                                                           
       9.122s user@125.service                                                                         
       9.110s plymouth-read-write.service                                                              
       8.307s dev-loop11.device                                                                        
       8.275s dev-loop1.device                                                                         
       8.188s dev-loop8.device                                                                         
       7.778s dev-loop5.device                                                                         
       7.385s dev-loop10.device                                                                        
       7.307s dev-loop9.device                                                                         
       6.845s dev-loop3.device                                                                         
       6.568s dev-loop2.device                                                                         
       6.476s dev-loop4.device                                                                         
       6.474s dev-loop7.device                                                                         
       6.210s grub-common.service                                                                      
       6.074s apport.service                                                                           
       5.830s systemd-resolved.service                                                                 
       5.821s bolt.service                                                                             
       5.818s secureboot-db.service                                                                    
       5.184s gpu-manager.service                                                                      
       4.838s gdm.service                                                                              
       4.580s dev-loop6.device                                                                         
       4.534s dev-loop0.device                                                                         
       4.447s rsyslog.service                                                                          
       4.261s ubuntu-fan.service                                                                       
       3.503s apparmor.service                                                                         
       3.407s grub-initrd-fallback.service                                                             
       2.575s snap-canonical\x2dlivepatch-95.mount                                                     
       2.253s binfmt-support.service                                                                   
       2.234s snapd.apparmor.service                                                                   
       2.221s snap-chromium-1399.mount                                                                 
       2.050s e2scrub_reap.service                                                                     
       1.964s systemd-rfkill.service                                                                   
       1.873s snap-core-10185.mount                                                                    
       1.616s snap-core18-1932.mount                                                                   
       1.491s pppd-dns.service                                                                         
       1.478s colord.service                                                                           
       1.448s snapd.seeded.service                                                                     
       1.353s upower.service                                                                           
       1.333s snap-gnome\x2d3\x2d28\x2d1804-145.mount                                                  
       1.181s systemd-backlight@backlight:intel_backlight.service                                      
       1.164s systemd-udevd.service                                                                    
       1.059s snap-gnome\x2d3\x2d34\x2d1804-60.mount                                                   
        984ms systemd-fsck@dev-disk-by\x2duuid-565baeeb\x2df53c\x2d44c6\x2da9b3\x2d7604d7b7e16f.service
        949ms systemd-modules-load.service                                                             
        908ms apport-autoreport.service                                                                
        828ms kerneloops.service                                                                       
        771ms systemd-random-seed.service                                                              
        770ms openvpn.service                                                                          
        752ms modprobe@drm.service                                                                     
        749ms snap-gtk\x2dcommon\x2dthemes-1506.mount                                                  
        725ms systemd-sysusers.service                                                                 
        675ms containerd.service                                                                       
        651ms systemd-udev-trigger.service                                                             
        638ms virtualbox.service                                                                       
        628ms systemd-sysctl.service                                                                   
        608ms snap-kde\x2dframeworks\x2d5\x2dcore18-32.mount                                           
        600ms snap-simplescreenrecorder\x2dbrlin-69.mount                                              
        588ms systemd-fsck@dev-disk-by\x2duuid-2F60\x2d3524.service                                    
        538ms user@1000.service                                                                        
        538ms ufw.service                                                                              
        530ms systemd-journald.service                                                                 
        513ms snap-slack-32.mount                                                                      
        467ms systemd-remount-fs.service                                                               
        464ms qemu-kvm.service                                                                         
        414ms systemd-user-sessions.service                                                            
        413ms console-setup.service                                                                    
        396ms plymouth-start.service                                                                   
        324ms systemd-tmpfiles-setup-dev.service                                                       
        308ms systemd-timesyncd.service                                                                
        268ms fam.service                                                                              
        255ms alsa-restore.service                                                                     
        236ms rtkit-daemon.service                                                                     
        227ms dev-hugepages.mount                                                                      
        226ms dev-mqueue.mount                                                                         
        224ms sys-kernel-debug.mount                                                                   
        223ms sys-kernel-tracing.mount                                                                 
        220ms kmod-static-nodes.service                                                                
        204ms snap-snap\x2dstore-481.mount                                                             
        195ms user-runtime-dir@125.service                                                             
        181ms setvtrgb.service                                                                         
        174ms dev-disk-by\x2duuid-628e5f66\x2dda0b\x2d41af\x2dbaca\x2dc4d1fafee694.swap                
        158ms systemd-update-utmp.service                                                              
        144ms home.mount                                                                               
        138ms snap-snapd-9721.mount                                                                    
        124ms boot-efi.mount                                                                           
         44ms proc-sys-fs-binfmt_misc.mount                                                            
         38ms systemd-update-utmp-runlevel.service                                                     
         34ms user-runtime-dir@1000.service                                                            
          5ms sys-fs-fuse-connections.mount                                                            
          4ms sys-kernel-config.mount                                                                  
          2ms docker.socket                                                                            
          1ms snapd.socket

systemd-analyze critical-chain output :

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.

graphical.target @3min 9.875s └─multi-user.target @3min 9.875s └─snapd.seeded.service @1min 9.328s +1.448s └─snapd.service @35.652s +33.670s └─basic.target @35.221s └─sockets.target @35.221s └─snapd.socket @35.219s +1ms └─sysinit.target @35.071s └─systemd-timesyncd.service @34.762s +308ms └─systemd-tmpfiles-setup.service @24.029s +10.643s └─local-fs.target @24.017s └─run-snapd-ns-chromium.mnt.mount @12min 46.580s └─run-snapd-ns.mount @57.339s └─swap.target @23.033s └─dev-disk-by\x2duuid-628e5f66\x2dda0b\x2d41af\x2dbaca\x2dc4d1fafee694.swap @22.857s +174ms └─dev-disk-by\x2duuid-628e5f66\x2dda0b\x2d41af\x2dbaca\x2dc4d1fafee694.device @22.854s

cat /etc/fstab output:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda3 during installation
UUID=bc7f56e3-b60c-48a9-b04d-385d9c46c938 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=2F60-3524  /boot/efi       vfat    umask=0077      0       1
# /home was on /dev/sda4 during installation
UUID=565baeeb-f53c-44c6-a9b3-7604d7b7e16f /home           ext4    defaults        0       2
# swap was on /dev/sda2 during installation
UUID=628e5f66-da0b-41af-baca-c4d1fafee694 none            swap    sw              0       0

I have checked the UUID of the swap.

  • 1
    All of these, but fstrim should not be taking that long. https://askubuntu.com/questions/1284302/is-it-possible-to-make-ubuntu-20-04-boot-faster Do your log files say what partition is running fstrim. Is drive SSD, as fstrim is really for SSD. Or is some setting changed that is not correct. Trim used to just be a crontab entry, but now systemctl, post this: systemctl cat fstrim.service and systemctl list-timers |grep fstrim – oldfred Nov 17 '20 at 14:51
  • @oldfred thanks for replying. I tried the first tip of https://www.techradar.com/in/how-to/how-to-speed-up-ubuntu-1804 and this time, the boot up time taken was the same. only in the blame list fstrim was not there. I really don't know what is going on with my Ubuntu. – Srijan Sengupta Nov 18 '20 at 04:11
  • @oldfred please don't mind, I cannot purge snapd as applications like chromium is only available at snap – Srijan Sengupta Nov 18 '20 at 04:23
  • I can't open your Google drive link. If you think this information is important and want people to read it, please make it accessible. Don't post pictures of text. Definitely don't put it behind a paywall or login, as in the case of Google docs. You can add the ouput to the body of your question as you've done here with other output. If it's too large, use https://pastebin.ubuntu.com/ – Nmath Nov 22 '20 at 19:11
  • https://pastebin.ubuntu.com/p/fHgt9xt87D/plain/ here is the link try it. – Srijan Sengupta Nov 24 '20 at 04:49

0 Answers0