1

Firstly I'm very new to Ubuntu so apologies if I don't provide enough info to begin with.

Secondly, I've seen lots of other posts about this bug, but none of the answers worked for me. Most of them rely on changing files which for whatever reason don't exist in my system.

Previous posts with answers that don't work for me:

Ubuntu 17.04 slow boot on SSD with dual boot : I don't have /etc/crypttab

Slow boot time (Ubuntu 18.04) on SSD : I don't have /etc/initramfs-tools/conf.d/resume

I have Windows 10 and just installed Ubuntu 20.04.1 LTS last night. There is no partition, I gave Ubuntu its own 500gb SSD disk. Windows generally boots in a matter of seconds. Here is my times for Ubuntu.

 CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
 Memory: 16GB 
 GPU: GeForce RTX 2070

systemd-analyze :

Startup finished in 1min 8.370s (kernel) + 25.685s (userspace) = 1min 34.055s 
graphical.target reached after 25.660s in userspace

systemd-analyze blame :

21.076s plymouth-quit-wait.service                    
 6.066s NetworkManager-wait-online.service            
 2.228s apt-daily-upgrade.service                     
 2.082s systemd-udev-settle.service                   
 1.955s zfs-load-module.service                       
  925ms snapd.service                                 
  614ms snap-snap\x2dstore-481.mount                  
  603ms systemd-logind.service                        
  583ms snap-snap\x2dstore-467.mount                  
  547ms snap-spotify-42.mount                         
  504ms fwupd-refresh.service                         
  477ms snap-snapd-9607.mount                         
  472ms dev-loop1.device                              
  455ms dev-sdc5.device                               
  414ms snap-snapd-8542.mount                         
  404ms upower.service                                
  396ms dev-loop2.device                              
  363ms udisks2.service                               
  353ms snap-core-10126.mount                         
  325ms snap-canonical\x2dlivepatch-95.mount          
  318ms dev-loop7.device                              
  316ms snap-gnome\x2d3\x2d34\x2d1804-60.mount        
  315ms dev-loop4.device                              
  315ms snap-gtk\x2dcommon\x2dthemes-1506.mount       
  310ms dev-loop3.device                              
  298ms dev-loop5.device                              
  294ms dev-loop6.device                              
  276ms dev-loop8.device                              
  272ms networkd-dispatcher.service                   
  244ms dev-loop0.device                              
  241ms dev-loop9.device                              
  240ms snap-slack-29.mount                           
  239ms accounts-daemon.service                       
  188ms snap-gnome\x2d3\x2d34\x2d1804-36.mount        
  174ms snap-core18-1880.mount                        
  167ms polkit.service                                
  161ms avahi-daemon.service                          
  161ms NetworkManager.service                        
  144ms switcheroo-control.service                    
  139ms dev-loop10.device                             
  135ms thermald.service                              
  135ms snap-code-47.mount                            
  129ms snap-core18-1885.mount                        
  127ms wpa_supplicant.service                        
  127ms lvm2-monitor.service                          
  122ms systemd-resolved.service                      
  119ms user@1000.service                             
  118ms systemd-modules-load.service                  
  117ms ModemManager.service                          
   90ms alsa-restore.service                          
   90ms apport.service                                
   90ms gpu-manager.service                           
   87ms systemd-journald.service                      
   87ms systemd-journal-flush.service                 
   85ms e2scrub_reap.service

systemd-analyze critical-chain :

graphical.target @25.660s
└─multi-user.target @25.660s
  └─kerneloops.service @10.637s +13ms
    └─network-online.target @10.636s
      └─NetworkManager-wait-online.service @4.570s +6.066s
        └─NetworkManager.service @4.407s +161ms
          └─dbus.service @4.404s
            └─basic.target @4.396s
              └─sockets.target @4.396s
                └─snapd.socket @4.395s +779us
                  └─sysinit.target @4.391s
                    └─systemd-timesyncd.service @4.320s +70ms
                      └─systemd-tmpfiles-setup.service @4.292s +25ms
                        └─local-fs.target @4.288s
                          └─media-alastair-Films.mount @9.827s
                            └─clean-mount-point@media-alastair-Films.service @9>
                              └─system-clean\x2dmount\x2dpoint.slice @9.836s
                                └─system.slice @168ms
                                  └─-.slice @168ms

EDIT:

lsblk :

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0    7:0    0   9.1M  1 loop /snap/canonical-livepatch/95
loop1    7:1    0 146.5M  1 loop /snap/code/47
loop2    7:2    0  55.3M  1 loop /snap/core18/1885
loop3    7:3    0    55M  1 loop /snap/core18/1880
loop4    7:4    0 255.6M  1 loop /snap/gnome-3-34-1804/36
loop5    7:5    0 137.3M  1 loop /snap/slack/29
loop6    7:6    0  62.1M  1 loop /snap/gtk-common-themes/1506
loop7    7:7    0 217.9M  1 loop /snap/gnome-3-34-1804/60
loop8    7:8    0  97.7M  1 loop /snap/core/10126
loop9    7:9    0  29.9M  1 loop /snap/snapd/8542
loop10   7:10   0    31M  1 loop /snap/snapd/9607
loop11   7:11   0 169.3M  1 loop /snap/spotify/42
loop12   7:12   0  49.8M  1 loop /snap/snap-store/467
loop13   7:13   0  50.7M  1 loop /snap/snap-store/481
sda      8:0    0 698.7G  0 disk 
└─sda1   8:1    0 698.7G  0 part 
sdb      8:16   0 111.8G  0 disk 
├─sdb1   8:17   0   350M  0 part 
├─sdb2   8:18   0 110.9G  0 part 
└─sdb3   8:19   0   578M  0 part 
sdc      8:32   0 465.8G  0 disk 
├─sdc1   8:33   0   512M  0 part 
├─sdc2   8:34   0     1K  0 part 
└─sdc5   8:37   0 465.3G  0 part /
sdd      8:48   0   1.8T  0 disk 
└─sdd1   8:49   0   1.8T  0 part 
sde      8:64   0   3.7T  0 disk 
├─sde1   8:65   0   200M  0 part 
└─sde2   8:66   0   3.7T  0 part /media/alastair/Films
sr0     11:0    1  1024M  0 rom  

sudo dd bs=512 count=1 if=/dev/sdc 2>/dev/null | strings :

ZRr=
`|f 
\|f1
GRUB 
Geom
Hard Disk
Read
 Error

EDIT2: I tried @oldfred suggestions. Although none of them worked for me they did lead me to the problem. Once I disabled quiet splash and saw the boot process I noticed how long it was spending on USB devices. I unplugged 2 external hard drives and a USB hub and my boot time is down to 13 seconds. Any idea why USB devices would cause this kind of problem?

Startup finished in 5.741s (kernel) + 7.264s (userspace) = 13.005s 
graphical.target reached after 7.244s in userspace
  • It would be useful to know your disk setup. Add the output of lsblk to the question. – Jaydin Oct 14 '20 at 22:19
  • Is Grub installed on "Ubuntu its own 500gb SSD disk"? If so, have you changed the Boot Order in BIOS to boot from that Ubuntu SSD? – Jaydin Oct 14 '20 at 22:26
  • @JayDin I'll add the lsblk as an edit. – Alastair Wright Oct 14 '20 at 23:22
  • @JayDin I put in an edit that shows grub is installed on the Ubuntu disk. I haven't changed the boot order, i can try that. I do load the boot switcher quickly, it's once I choose to boot Ubuntu it takes the long time. Its mostly just black screen for a minute after selecting Ubuntu. – Alastair Wright Oct 14 '20 at 23:25
  • see: https://askubuntu.com/questions/1187117/slow-boot-boot-19-10-tried-almost-everything & https://askubuntu.com/questions/1018576/what-does-networkmanager-wait-online-service-do & https://askubuntu.com/questions/800479/ubuntu-16-04-slow-boot-apt-daily-service I change these: turned off NetworkManager-wait with systemctl, changed from quiet splash to noplymouth, will see boot process rather than Ubuntu logo, sudo apt install libblockdev-crypto2 libblockdev-mdraid2, turned off printer when rebooting, removed snaps And my system does not support fwupd, so I uninstall that. – oldfred Oct 15 '20 at 02:50

2 Answers2

1

Thanks for the help. It turns out some of my USB devices were causing the slow boot. I have no idea why though.

Turns out unplugging them and plugging them back in solved all the boot problems. I've spent hours on this and of course that's the solution.

0

Given that specific USB devices are causing the long boot times and you want to keep them plugged in, you could try disabling automounting during boot. There are two ways you could do this: gnome-disk-utility and manually editing fstab. That second method is for the experienced users only.

For a beginner, use the gnome-disk-utility

  1. Make sure the USB devices are connected.
  2. Open the Disks application from the dash.
  3. Select the disk (in the left pane) and then the partition (in the right pane) that you DO NOT want to mount at startup.
  4. Click on the cogwheel for Additional Partition Options and select Edit Mount Options.
  5. Ensure Mount at system startup at the top is disabled.

Edit Mount Options menu

  1. Click OK and reboot.

See answers to this question (on enabling automount) for further information.

Jaydin
  • 1,446