Since some time I have problems that my Linux Ubuntu 18.04 is very slowly booting (sometimes 5-10 minutes).
Strangely, this seems to have started since I edited the Swapfile or/and that I used Gparted. The top
command and swapon -s
command show that the Swapfile is working (I reserved 4 GB).
But the following command showed something weird:
sudo findmnt --verify --verbose
All lines are fine except the following warning appears:
[W] non-bind mount source /swapfile is a directory or regular file
What does that line exactly mean? Does it mean that it could not mount the swapfile? (while actually in the end it is working). So I wondered if something is wrong in my fstab file.
cat /etc/fstab
The swap line gives the following:
/swapfile none swap sw 0 0
I heard that problems of finding and mounting the swapfile during boot can slow down the whole process. The swapfile is running from the main disk so I wondered if the above line should be changed in something like this:
UUID=xx9999x9-9x99-9xx9-9999-xx9x9xx99xx9/swapfile none swap sw 0 0
Where the UUID is the hard disk. I did not use any partitioning.
Systemd-analyze blame gives the following output:
systemd-analyze blame | head
17.041s dev-sda1.device
11.192s dev-loop9.device
11.056s dev-loop16.device
10.964s dev-loop14.device
10.704s dev-loop6.device
10.703s dev-loop1.device
10.703s dev-loop7.device
10.703s dev-loop2.device
10.702s dev-loop4.device
10.687s dev-loop13.device
After having used sudo apt-get purge snapd
this is the following:
systemd-analyze blame | head
7.902s dev-sda1.device
7.152s NetworkManager-wait-online.service
5.121s ufw.service
4.792s systemd-udevd.service
4.539s docker.service
4.298s accounts-daemon.service
4.152s systemd-journal-flush.service
3.970s apparmor.service
3.808s avahi-daemon.service
3.751s bluetooth.service
The command sudo blkid
gives one line (I anonymized the ID). Previously, there were a lot of lines /dev/loopX: TYPE="squashfs"
/dev/sda1: UUID="xx9999x9-9x99-9xx9-9999-xx9x9xx99xx9" TYPE="ext4" PARTUUID="9999xx999-01"
A screenshot of Disks
parameters:
Output of syslog:
grep -i FPDMA /var/log/syslog*
[ 48.245514] ata6.00: failed command: READ FPDMA QUEUED
[ 48.247916] ata6.00: failed command: READ FPDMA QUEUED
[ 48.250316] ata6.00: failed command: READ FPDMA QUEUED
[ 48.252774] ata6.00: failed command: READ FPDMA QUEUED
Here follows a screenshot of Gparted:
Another observation: when I start the computer, the screen stays black 5-10 minutes. Then after long waiting, it gives a title screen with the laptop mark. From there all seems to run smoothly. Just wanted to say this as it may indicate where during the booting something is going wrong. I wondered if the boot loader (Grub) can be broken, since I previously run dual boot on this system and removed Windows 7 recently.
File system table
sudo cat /etc/fstab
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=ae2158a5-6f28-4da8-8082-cc6d6bb20ed2 / ext4 errors=remount-ro 0 1
/swapfile none swap sw 0 0
sudo blkid
/dev/sda1: UUID="ae2158a5-6f28-4da8-8082-cc6d6bb20ed2" TYPE="ext4" PARTUUID="630bb523-01"
BIOS version
sudo dmidecode -s bios-version
1.03.05
Motherboard infos:
TUXEDO Book DC1504
Model: W650SJ
Clevo CO
sudo dmidecode -t 2
dmidecode 3.1
Getting SMBIOS data from sysfs.
SMBIOS 2.8 present.
Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
Manufacturer: Notebook
Product Name: W65_67SJ
Version: Not Applicable
Serial Number: Not Applicable
Asset Tag: Tag 12345
Features:
Board is a hosting board
Board is replaceable
Location In Chassis: Not Applicable
Chassis Handle: 0x0003
Type: Motherboard
Contained Object Handles: 0
I am running Ubuntu 18.04.5 LTS.
Grub
The command dpkg -l grub* | grep ii
gives the following output:
ii grub-common 2.02-2ubuntu8.18 amd64 GRand Unified Bootloader (common files)
ii grub-gfxpayload-lists 0.7 amd64 GRUB gfxpayload blacklist
ii grub-pc 2.02-2ubuntu8.18 amd64 GRand Unified Bootloader, version 2 (PC/BIOS version)
ii grub-pc-bin 2.02-2ubuntu8.18 amd64 GRand Unified Bootloader, version 2 (PC/BIOS binaries)
ii grub2-common 2.02-2ubuntu8.18 amd64 GRand Unified Bootloader (common files for version 2)
Thank you for your help!
gparted
? All of these details should be in your question. Hit the ESC key during boot, and see where booting stops... that will give a clue as to why it's taking so long to boot. – heynnema Sep 11 '20 at 14:48systemd-analyze blame | head
in your system? Please [edit] your question and add this info. – FedKad Sep 11 '20 at 15:16losetup
command to your original question. – FedKad Sep 11 '20 at 15:21sudo apt-get purge snapd
. That does clearly improve the noted times insystem-analyze blame | head
, but booting remains very slow. Is it possible that an outdated or broken Grub causes these kind of problems? – Partoudata Sep 11 '20 at 19:55system-analyze blame | head
? – FedKad Sep 12 '20 at 07:21