1

I have just done a basic ubuntu installation - i selected LVM but apart from that it was defaults all the way..

My machine is taking a very long time to boot, I am not experienced with linux and have been googling away..

Looking at dmesg:

[    8.846613] audit: type=1400 audit(1480970603.520:10): apparmor="STATUS" operation="profile_load" profile="unconfined" name="webbrowser-app//oxide_helper" pid=2030 comm="apparmor_parser"
[    8.849130] audit: type=1400 audit(1480970603.520:11): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/cups-browsed" pid=2043 comm="apparmor_parser"
[    9.069385] Adding 8081404k swap on /dev/mapper/ubuntu--vg-swap_1.  Priority:-1 extents:1 across:8081404k SSFS
[   66.019923] random: nonblocking pool is initialized
[   68.827796] ata7.00: exception Emask 0x0 SAct 0x70003fff SErr 0x0 action 0x6 frozen
[   68.827803] ata7.00: failed command: READ FPDMA QUEUED
[   68.827809] ata7.00: cmd 60/20:00:68:b5:a4/00:00:08:00:00/40 tag 0 ncq 16384 in
                        res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)

I am thinking its an issue with the SSD in some way, I have seen some people saying that they have had issues with the content of 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>
/dev/mapper/ubuntu--vg-root /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sdb1 during installation
UUID=877bdd16-7292-43df-b8d0-2c15b0fd29b3 /boot           ext2    defaults        0       2
/dev/mapper/ubuntu--vg-swap_1 none            swap    sw              0       0

which they fixed after looking at the output of blkid:

/dev/sda1: UUID="877bdd16-7292-43df-b8d0-2c15b0fd29b3" TYPE="ext2" PARTUUID="29128885-01"
/dev/sda5: UUID="btlIPb-5JH7-PKen-NJd0-1LS2-O2WG-VJGO0i" TYPE="LVM2_member" PARTUUID="29128885-05"
/dev/sdb1: UUID="061D-D50F" TYPE="vfat"
/dev/mapper/ubuntu--vg-root: UUID="6da0bd40-c7ba-429c-872c-65baf117612f" TYPE="ext4"
/dev/mapper/ubuntu--vg-swap_1: UUID="19dda764-b7ff-48b1-ad3f-0c938c886b95" TYPE="swap"

But I don't know what it should look like?

However when I run systemd-analyze blame I get this, which makes me think its the graphics card?

      1min 254ms gpu-manager.service
  1min 209ms ModemManager.service
  1min 142ms plymouth-quit-wait.service
   1min 76ms polkitd.service
      1.299s dev-mapper-ubuntu\x2d\x2dvg\x2droot.device
       707ms lvm2-monitor.service
       335ms apparmor.service
       265ms plymouth-read-write.service
       193ms systemd-logind.service
       192ms lightdm.service

Any help greatly appreciated!

After re-installing twice i seem to always get the same issue, blame is very different though which make me more sure it relates to the drive - maybe there is something wrong with it or it requires some specific settings (Its a crucial SSD?).. files as they are now:

UPDATE: Solved? -

Based on comment from @jsalatas turned off NCQ by modifying /etc/default/grub:

GRUB_CMDLINE_LINUX="" -> GRUB_CMDLINE_LINUX="libata.force=noncq"

This has certainly stopped the errors, and has he system booting in about 12 seconds. dmesg3 (dunno what the ACPI Warnings are)

I hope this does not affect other spindle drives that I intend to add (ZFS Pool that i may switch to raid 10).

UPDATE 2 (FYI):

I was adding more ram and a new CPU and decided to reinstall at the same time.. after this reinstall I no longer had this issue!

apart from the more ram and the CPU change I also changed the port that the SSD was connected to.. I am not sure but it may have been from SATA 3 to SATA 2 (I don't think so but its possible - I just know i changed it for neater cabling).

5
  • What happens if you change UUID=877bdd16-7292-43df-b8d0-2c15b0fd29b3 /boot ext2 defaults 0 2 to UUID=877bdd16-7292-43df-b8d0-2c15b0fd29b3 /boot ext2 defaults 0 1?
    – heynnema
    Dec 5, 2016 at 22:27
  • basically nothing as far as i can see... boot times are still very long, the first error is still the same.. i have done 2 re-installs since posting the question but the errors etc. that i am getting are the same as far as i can see.
    – user83505
    Dec 5, 2016 at 22:55
  • 1
    have a look at this itechlounge.net/2013/07/… and also check if there is any updated firmware for your disk.
    – jsalatas
    Dec 5, 2016 at 23:09
  • @jsalatas the technique for disabling in that link didn't work (that file doesnt exist on my system but i did find this howtoeverything.net/linux/hardware/… .. which said to modify the grub config: GRUB_CMDLINE_LINUX="libata.force=noncq" which has drastically improved the boot time. I will have to investigate further to see what the full implications of this are.. i was about to mount a zfs pool too but i don't know if it will matter for that. thanks very much though, at least i don't have to wait 5 mins for each reboot in the mean time! :D
    – user83505
    Dec 6, 2016 at 0:00
  • 1
    @gordatron You are close but you could improve a couple of seconds more. I have a similar system which boots at about 7 seconds. I'll put my comment as an answer soon. Thanks..... :)
    – jsalatas
    Dec 6, 2016 at 0:22

1 Answer 1

0

According to http://www.itechlounge.net/2013/07/linux-ata-failed-command-read-fpdma-queued/ if you are getting messages like this

ata2.00: failed command: READ FPDMA QUEUED

mean that you need to disable NCQ (Native Command Queuing). According to the article, you can do this with the following command

echo 1 > /sys/block/sdX/device/queue_depth

in which you need to replace sdX with your actual drive (eg sda).

As @gordatron mentioned, if /sys/block/sdX/device/queue_depth is missing you can try to disable NCQ globally for all drives by adding the libata.force=noncq option in GRUB_CMDLINE_LINUX:

GRUB_CMDLINE_LINUX="libata.force=noncq"

You must log in to answer this question.