2

I upgraded Ubuntu from 18.04 to 20.04. I am experiencing very slow boot up times. It takes about 2+ minutes to fully boot up.

I have tried to find the solution but couldn't find it.

Log from systemd-analyze

Startup finished in 10.845s (kernel) + 1min 42.843s (userspace) = 1min 53.688s 
graphical.target reached after 1min 42.647s in userspace

log from `systemd-analyze blame`
53.567s plymouth-quit-wait.service
41.950s mysql.service                                        
30.942s systemd-journal-flush.service                        
18.520s udisks2.service                                      
16.008s snapd.service                                        
14.604s NetworkManager-wait-online.service                   
13.868s networkd-dispatcher.service                          
12.827s accounts-daemon.service                              
12.276s dev-sda5.device                                      
10.716s polkit.service                                       
10.382s NetworkManager.service                               
10.382s avahi-daemon.service                                 
10.378s bluetooth.service                                    
10.058s switcheroo-control.service                           
10.051s wpa_supplicant.service                               
10.045s thermald.service                                     
10.037s systemd-logind.service                               
 9.005s dev-loop3.device                                     
 8.541s ModemManager.service                                 
 7.917s dev-loop16.device                                    
 7.326s dev-loop10.device                                    
 7.284s dev-loop15.device                                    
 7.084s grub-common.service                                  
 6.983s teamviewerd.service                                  
 6.983s dev-loop12.device                                    
 6.906s dev-loop4.device                                     
 6.906s dev-loop14.device                                    
 6.906s dev-loop0.device                                     
 6.905s dev-loop5.device                                     
 6.831s dev-loop9.device                                     
 6.812s dev-loop7.device                                     
 6.630s apport.service                                       
 6.450s dev-loop13.device                                    
 6.392s dev-loop11.device                                    
 6.153s e2scrub_reap.service                                 
 6.150s grub-initrd-fallback.service                         
 5.294s apport-autoreport.service                            
 4.968s dev-loop2.device                                     
 4.886s dev-loop8.device                                     
 4.603s gpu-manager.service                                  
 4.465s secureboot-db.service                                
 3.973s dev-loop1.device                                     
 3.876s dev-loop6.device                                     
 3.572s rsyslog.service                                      
                               

Log from journalctl -b -u udisks2 -u mysql

-- Logs begin at Tue 2019-05-28 06:03:37 IST, end at Sat 2020-10-10 10:59:44 IS>
Oct 10 09:57:02 asus systemd[1]: Starting Disk Manager...
Oct 10 09:57:07 asus udisksd[777]: udisks daemon version 2.8.4 starting
Oct 10 09:57:13 asus systemd[1]: Starting MySQL Community Server...
Oct 10 09:57:16 asus udisksd[777]: failed to load module mdraid: libbd_mdraid.s>
Oct 10 09:57:16 asus udisksd[777]: Failed to load the 'mdraid' libblockdev plug>
Oct 10 09:57:21 asus udisksd[777]: Acquired the name org.freedesktop.UDisks2 on>
Oct 10 09:57:21 asus systemd[1]: Started Disk Manager.
Oct 10 09:57:54 asus systemd[1]: Started MySQL Community Server.

System Specs (Dual boot)
OS Name: Ubuntu 20.04 LTS (installed in HDD)
OS Type: 64-bit
Gnome Version: 3.36.3
Windowing System: X11
RAM memory: 7.6Gb
Processor: Intel® Core™ i5-8265U CPU @ 1.60GHz × 8
Graphics: Mesa Intel® UHD Graphics 620 (WHL GT2)
Disk Capacity: 1.0TB (HDD)

Windows is installed in SSD and it takes less than 5 sec to boot up.

I have attached the output of systemd-analyze critical-chain

3
  • So MySQL takes 41 seconds to start - I don't know if this is normal or not. Oct 10, 2020 at 10:30
  • Have you tried systemd-analyze critical-chain? In the output, the time after the + sign is the time it actually takes to start the unit from the time it begins, rather than from the beginning of boot. Oct 16, 2020 at 17:43
  • Possibly helpful - tecmint.com/systemd-analyze-monitor-linux-bootup-performance Oct 16, 2020 at 17:43

3 Answers 3

1

I resolved the slow booting as follows:

  1. Run:

    cd .. cd ..
    cd etc
    sudo gedit fstab
    
  2. Add a line for your swap partition only IF there is a swap partition:

    # swap was on /dev/sda? during installation
    UUID=?????????????? none            swap    sw              0       0
    

    To obtain the info (? and ??????????????) use the Disks application.

  3. Copy sda? and UUID, paste them into fstab and save it.

  4. Reboot.

Hope this works for you too.

0

Windows Fast Startup

"When you click “Shut Down” on your Windows 10 PC, Windows doesn't fully shut down. It hibernates the kernel, saving its state so it can boot faster"

For Ubuntu the closest thing is to hit Suspend or to enable Hibernate.

Swap area for ubuntu installation

4
  • giving command swapon --show NAME TYPE SIZE USED PRIO /swapfile file 2G 18.2M -2 Should I enlarge my swap area? Oct 11, 2020 at 18:00
  • Swap area should be at least the size of RAM.. Oct 12, 2020 at 2:37
  • if i enlarge my swap area, will my all data be erased? Oct 12, 2020 at 19:18
  • @Hritik Kumar No data will be erased, except perhaps what is in your swap area. That is only temporary anyway and will be rebuilt as soon as swap is turned back on.. Oct 13, 2020 at 1:11
0

Check if all to be mounted partitions specified by UUID in the /etc/fstab file do exist. I experienced that after new installations or updates the UUID can be modified on the disk but not in all configuration files. It's the reason for delay. Show UUIDs using blkid cmd and compare them with those listed in fstab. It could be necessary to use sudo blkid to see UUIDs of all partitions - also swap partition.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .