0

For the past few months booting my system (Windows-Ubuntu dual boot) has taken way too long (~3 min). I'm trying to fix it right now and I'm having very little luck.

The symptoms

From turning on the computer until Grub appears takes about 1 minute. From Grub to the login screen for Ubuntu it takes about 1.5 minutes.

What I've tried

I've run systemd-analyze time which output:

Startup finished in 1min 22ms (firmware) + 3.807s (loader) + 1min 7.203s (kernel) + 1min 30.475s (userspace) = 3min 41.508s 
graphical.target reached after 11.713s in userspace

I've run systemd-analyze plot which showed that dev-fuse.device takes orders of magnitude longer than everything else. The red bar goes all the way off the screen to the right.

Based on some googling this lead me to believe that my /etc/fstab file is using an incorrect UUID for my swap, but I don't think that is the case. This is my /etc/fstab:

# /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/sdb6 during installation
UUID=0e0a0e10-243f-4be1-b285-f231826bf1bc /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sdb2 during installation
UUID=5EC7-7108  /boot/efi       vfat    umask=0077      0       1
# /home was on /dev/sdb7 during installation
UUID=8226e8a2-cb20-438f-9192-f8100a06c172 /home           ext4    defaults        0       2
# swap was on /dev/sdb5 during installation
UUID=b492987e-be36-43a5-97cc-39779d160353 none            swap    sw              0       0

And this is what I get for sudo blkid | grep swap:

/dev/sdb5: UUID="b492987e-be36-43a5-97cc-39779d160353" TYPE="swap" PARTUUID="98261e45-3e1b-4ca5-828a-f413cfcbf251"

Based on comments it seems that swap is not the issue. Here is some more diagnostic output.

caleb@pangea:~$ free -h
              total        used        free      shared  buff/cache   available
Mem:           15Gi       4.6Gi       6.9Gi       327Mi       4.0Gi        10Gi
Swap:          18Gi          0B        18Gi

caleb@pangea:~$ sudo lshw -C memory
[sudo] password for caleb: 
  *-firmware                
       description: BIOS
       vendor: American Megatrends Inc.
       physical id: 0
       version: P1.00
       date: 04/25/2014
       size: 64KiB
       capacity: 16MiB
       capabilities: pci upgrade shadowing cdboot bootselect socketedrom edd int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer acpi usb biosbootspecification uefi
  *-memory
       description: System Memory
       physical id: b
       slot: System board or motherboard
       size: 16GiB
     *-bank:0
          description: DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
          product: CT51264BD160B.M16F
          vendor: Conexant (Rockwell)
          physical id: 0
          serial: E33A9D3C
          slot: ChannelA-DIMM0
          size: 4GiB
          width: 64 bits
          clock: 1600MHz (0.6ns)
     *-bank:1
          description: DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
          product: F3-12800CL9-4GBXL
          vendor: Fujitsu
          physical id: 1
          serial: 00000000
          slot: ChannelA-DIMM1
          size: 4GiB
          width: 64 bits
          clock: 1600MHz (0.6ns)
     *-bank:2
          description: DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
          product: CT51264BD160B.M16F
          vendor: Conexant (Rockwell)
          physical id: 2
          serial: E33A9E22
          slot: ChannelB-DIMM0
          size: 4GiB
          width: 64 bits
          clock: 1600MHz (0.6ns)
     *-bank:3
          description: DIMM DDR3 Synchronous 1600 MHz (0.6 ns)
          product: F3-12800CL9-4GBXL
          vendor: Fujitsu
          physical id: 3
          serial: 00000000
          slot: ChannelB-DIMM1
          size: 4GiB
          width: 64 bits
          clock: 1600MHz (0.6ns)
  *-cache:0
       description: L1 cache
       physical id: d
       slot: CPU Internal L1
       size: 256KiB
       capacity: 256KiB
       capabilities: synchronous internal write-back
       configuration: level=1
  *-cache:1
       description: L2 cache
       physical id: e
       slot: CPU Internal L2
       size: 1MiB
       capacity: 1MiB
       capabilities: synchronous internal write-back unified
       configuration: level=2
  *-cache:2
       description: L3 cache
       physical id: f
       slot: CPU Internal L3
       size: 6MiB
       capacity: 6MiB
       capabilities: synchronous internal write-back unified
       configuration: level=3
caleb@pangea:~$ sysctl vm.swappiness
vm.swappiness = 60
caleb@pangea:~$ ls -al /var/crash
total 8
drwxrwsrwt  2 root whoopsie 4096 Apr 24 15:49 .
drwxr-xr-x 14 root root     4096 Jul 31  2020 ..
caleb@pangea:~$ ls -al /boot
total 134305
drwxr-xr-x  4 root root     4096 Apr 24 15:46 .
drwxr-xr-x 20 root root     4096 Dec 31 00:21 ..
-rw-r--r--  1 root root   248245 Mar 25 16:35 config-5.8.0-49-generic
-rw-r--r--  1 root root   248245 Apr 12 12:47 config-5.8.0-50-generic
drwx------  3 root root     1024 Dec 31  1969 efi
drwxr-xr-x  5 root root     4096 Apr 17 06:12 grub
lrwxrwxrwx  1 root root       27 Apr 16 11:46 initrd.img -> initrd.img-5.8.0-50-generic
-rw-r--r--  1 root root 52898024 Apr 22 11:48 initrd.img-5.8.0-49-generic
-rw-r--r--  1 root root 52897830 Apr 24 15:46 initrd.img-5.8.0-50-generic
lrwxrwxrwx  1 root root       27 Apr 16 11:46 initrd.img.old -> initrd.img-5.8.0-49-generic
-rw-r--r--  1 root root   182704 Aug 18  2020 memtest86+.bin
-rw-r--r--  1 root root   184380 Aug 18  2020 memtest86+.elf
-rw-r--r--  1 root root   184884 Aug 18  2020 memtest86+_multiboot.bin
-rw-------  1 root root  5531453 Mar 25 16:35 System.map-5.8.0-49-generic
-rw-------  1 root root  5531453 Apr 12 12:47 System.map-5.8.0-50-generic
lrwxrwxrwx  1 root root       24 Apr 16 11:46 vmlinuz -> vmlinuz-5.8.0-50-generic
-rw-------  1 root root  9786496 Mar 25 18:13 vmlinuz-5.8.0-49-generic
-rw-------  1 root root  9785696 Apr 12 14:17 vmlinuz-5.8.0-50-generic
lrwxrwxrwx  1 root root       24 Apr 16 11:46 vmlinuz.old -> vmlinuz-5.8.0-49-generic
caleb@pangea:~$ snap list
Name               Version                     Rev    Tracking         Publisher     Notes
android-studio     4.1.3.0                     101    latest/stable    snapcrafters  classic
bottom             nightly                     219    latest/stable    kz6fittycent  -
core18             20210309                    1997   latest/stable    canonical✓    base
core20             20210319                    975    latest/stable    canonical✓    base
discord            0.0.14                      122    latest/stable    snapcrafters  -
gnome-3-28-1804    3.28.0-19-g98f9e67.98f9e67  145    latest/stable    canonical✓    -
gnome-3-34-1804    0+git.3556cb3               66     latest/stable/…  canonical✓    -
gtk-common-themes  0.1-52-gb92ac40             1515   latest/stable/…  canonical✓    -
snap-store         3.38.0-59-g494f078          518    latest/stable/…  canonical✓    -
snapd              2.49.2                      11588  latest/stable    canonical✓    snapd
spotify            1.1.55.498.gf9a83c60        46     latest/stable    spotify✓      -
vlc                3.0.12.1                    2103   latest/stable    videolan✓     -
caleb@pangea:~$ sudo fdisk -l
Disk /dev/loop0: 2.31 MiB, 2412544 bytes, 4712 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 925.54 MiB, 970485760 bytes, 1895480 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 925.55 MiB, 970493952 bytes, 1895496 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop3: 2.31 MiB, 2412544 bytes, 4712 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop4: 55.48 MiB, 58159104 bytes, 113592 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop5: 55.46 MiB, 58142720 bytes, 113560 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop6: 61.65 MiB, 64626688 bytes, 126224 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop7: 61.74 MiB, 64720896 bytes, 126408 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDC WD10EZEX-00E
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 7944FAED-B542-495B-A438-0D0B7C6B6F1B

Device     Start        End    Sectors   Size Type
/dev/sda1   2048 1953523711 1953521664 931.5G Microsoft basic data




Disk /dev/sdb: 465.78 GiB, 500107862016 bytes, 976773168 sectors
Disk model: Samsung SSD 850 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: CBFA4ACC-57CD-47C4-8D54-A64557D9E931

Device         Start       End   Sectors   Size Type
/dev/sdb1       2048   1023999   1021952   499M Windows recovery environment
/dev/sdb2    1024000   1228799    204800   100M EFI System
/dev/sdb3    1228800   1261567     32768    16M Microsoft reserved
/dev/sdb4    1261568 490891263 489629696 233.5G Microsoft basic data
/dev/sdb5  490891264 529952767  39061504  18.6G Linux swap
/dev/sdb6  529952768 647139327 117186560  55.9G Linux filesystem
/dev/sdb7  647139328 976771071 329631744 157.2G Linux filesystem


Disk /dev/loop8: 76.73 MiB, 80437248 bytes, 157104 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop9: 75.7 MiB, 79360000 bytes, 155000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop10: 162.89 MiB, 170778624 bytes, 333552 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop11: 217.92 MiB, 228478976 bytes, 446248 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop12: 65.1 MiB, 68259840 bytes, 133320 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop13: 32.28 MiB, 33841152 bytes, 66096 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop14: 295.32 MiB, 309661696 bytes, 604808 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop15: 179.46 MiB, 188170240 bytes, 367520 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop16: 32.28 MiB, 33841152 bytes, 66096 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop17: 49.8 MiB, 52203520 bytes, 101960 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop18: 290.45 MiB, 304545792 bytes, 594816 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop19: 51.4 MiB, 53522432 bytes, 104536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop20: 64.79 MiB, 67915776 bytes, 132648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop21: 179.58 MiB, 188289024 bytes, 367752 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop22: 218.102 MiB, 229629952 bytes, 448496 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

System information below. My system has a HDD and an SSD but both Windows and Ubuntu live on the SSD. My motherboard is an ASRock H97M Pro4.

OS: Ubuntu 20.04.2 LTS x86_64 
Kernel: 5.8.0-50-generic 
Uptime: 2 hours, 5 mins 
Packages: 2072 (dpkg), 13 (snap) 
Shell: bash 5.0.17 
Resolution: 1920x1080, 1920x1080 
DE: GNOME 
WM: Mutter 
WM Theme: Canta-dark 
Theme: Canta-dark [GTK2/3] 
Icons: Canta [GTK2/3] 
Terminal: gnome-terminal 
CPU: Intel i5-4570 (4) @ 3.600GHz 
GPU: NVIDIA GeForce GTX 760 
Memory: 5155MiB / 15946MiB 

SMART Data & Self-Tests in Disks application for HDD:

Screenshot of SMART Data and Self-Tests in Disks application for HDD

SMART Data and Self-Tests in Disks application for SSD:

Screenshot of SMART Data & Self-Tests in Disks application for SSD

13
  • Edit your question and show me free -h and sudo lshw -C memory and sysctl vm.swappiness and ls -al /var/crash and ls -al /boot. What version Ubuntu? What processor? Start comments to me with @heynnema or I'll miss them.
    – heynnema
    Apr 27, 2021 at 20:28
  • You haven’t said what equipment you are using. How old is it and are you using an ssd or HDD? I’ve never seen firmware take over a minute, my modest Acer laptop is 2.3 seconds. My loader is 3.7 seconds so similar to yours. My kernel is just under 2 seconds and userspace is 3.5 seconds. That is with an ssd, over a minute userspace is HDD territory. I very much doubt it has anything to do with swap but to prove it you can turn swap off and hash out the fstab file entry. Slow firmware and kernel suggests a hardware fault to me. Perhaps the disk is failing.
    – PonJar
    Apr 27, 2021 at 20:36
  • Also show me screenshots of the Disks application SMART Data & Tests data window. This window is scrollable, so it may take two screenshots.
    – heynnema
    Apr 27, 2021 at 21:08
  • @heynnema I have added all of the diagnostic information you requested to the question. Let me know if you need other things. Apr 27, 2021 at 21:22
  • @PonJar I've added information about my hardware to the question. Agreed that it probably isn't swap. Apr 27, 2021 at 21:23

1 Answer 1

0

BIOS

ASRock H97M Pro4

Your BIOS is very old at version 1.0 from 04/25/2014. There's a newer BIOS available, version 2.30, from 03/13/2018, and can be downloaded from here.

Note: Check that I have the correct web page for your motherboard.

Note: Have good backups before updating the BIOS.

SSD firmware

Samsung SSD 850

Download the Samsung Magician here, and check for newer firmware for your SSD.

6
  • SSD firmware was already up to date. I updated my BIOS to v2.30. I'm still experiencing ~3 minute startups. Still working on getting the syslogs to you. The logs don't want to cycle even when I restart the system. Apr 28, 2021 at 1:42
  • @CalebSchoepp syslog will probably rotate out today. I'm running out of ideas here. Two more things to try. Do sudo update-initramfs -c -k $(uname -r), then reboot and see if it's any faster. If it's not, then temporarily comment out the line that starts with /dev/sdb5: UUID= in /etc/fstab, reboot, recheck. Set this setting back after reboot.
    – heynnema
    Apr 28, 2021 at 14:17
  • Yep, it finally rotated. Here is the syslogs: paste.ubuntu.com/p/zqXSV7HFTd. I'll give these other things a try too Apr 28, 2021 at 18:16
  • No luck with the update-initramfs. I tried both things you mentioned and neither sped up the boot. Apr 28, 2021 at 18:35
  • @CalebSchoepp I've reviewed the syslog. I don't see any reasons there why the boot is slow. I don't know what's wrong, and I'm now out of ideas. Sorry. If you eventually find the problem, please let me know what it was.
    – heynnema
    Apr 28, 2021 at 19:06

You must log in to answer this question.

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