2

Problem description

I've taken to finally address the issue of my system booting slower than it should. My first step was to have a look at the boot log, which showed the start job for a device timing out and directly afterwards failing the cryptography setup of a device referenced as cr_usb-General_USB_Flash_Disk. I am unsure whether the two are connected.

         Starting Switch Root...
[  ^[[0;31m*^[[0;1;31m*^[[0m^[[0;31m* ^[[0m] (1 of 3) A start job is running for dev-disk-by\x2duuid-00a69115\x2d956d\x2d41b3\x2d830c\x2d9a3878087d41.device (19s / 1min 30s)
^[[K[ ^[[0;31m*^[[0;1;31m*^[[0m^[[0;31m*  ^[[0m] (1 of 3) A start job is running for dev-disk-by\x2duuid-00a69115\x2d956d\x2d41b3\x2d830c\x2d9a3878087d41.device (20s / 1min 30$
^[[K[^[[0;31m*^[[0;1;31m*^[[0m^[[0;31m*   ^[[0m] (2 of 3) A start job is running for Cryptography Setup for cr_sda2 (14s / no limit)
^[[K[^[[0;1;31m*^[[0m^[[0;31m*    ^[[0m] (2 of 3) A start job is running for Cryptography Setup for cr_sda2 (15s / no limit)
^[[K[^[[0m^[[0;31m*     ^[[0m] (2 of 3) A start job is running for Cryptography Setup for cr_sda2 (15s / no limit)
^[[K[^[[0;32m  OK  ^[[0m] Found device /dev/disk/by-uuid/3f9a66f0-dea7-4d5d-a200-bd1033718af8.
[^[[0;32m  OK  ^[[0m] Started Cryptography Setup for cr_sda2.
         Starting File System Check on /dev/disk/by-uuid/3f9a66f0-dea7-4d5d-a200-bd1033718af8...
[^[[0;32m  OK  ^[[0m] Started File System Check on /dev/disk/by-uuid/3f9a66f0-dea7-4d5d-a200-bd1033718af8.
         Mounting /home...
[^[[0;32m  OK  ^[[0m] Mounted /home.
[^[[0;32m  OK  ^[[0m] Reached target Local File Systems.
         Starting Restore /run/initramfs on shutdown...
         Starting Create Volatile Files and Directories...
         Starting Tell Plymouth To Write Out Runtime Data...
[^[[0;32m  OK  ^[[0m] Started Tell Plymouth To Write Out Runtime Data.
[^[[0;32m  OK  ^[[0m] Started Restore /run/initramfs on shutdown.
[^[[0;32m  OK  ^[[0m] Started Create Volatile Files and Directories.
         Starting Security Auditing Service...
[^[[0;32m  OK  ^[[0m] Started Security Auditing Service.
         Starting Update UTMP about System Boot/Shutdown...
[^[[0;32m  OK  ^[[0m] Started Update UTMP about System Boot/Shutdown.
^[[K[     ^[[0;31m*^[[0m] A start job is running for dev-disk-by\x2duuid-00a69115\x2d956d\x2d41b3\x2d830c\x2d9a3878087d41.device (1min 22s / 1min 30s)
^[[K[    ^[[0;31m*^[[0;1;31m*^[[0m] A start job is running for dev-disk-by\x2duuid-00a69115\x2d956d\x2d41b3\x2d830c\x2d9a3878087d41.device (1min 23s / 1min 30s)
^[[K[   ^[[0;31m*^[[0;1;31m*^[[0m^[[0;31m*^[[0m] A start job is running for dev-disk-by\x2duuid-00a69115\x2d956d\x2d41b3\x2d830c\x2d9a3878087d41.device (1min 23s / 1min 30s)
^[[K[  ^[[0;31m*^[[0;1;31m*^[[0m^[[0;31m* ^[[0m] A start job is running for dev-disk-by\x2duuid-00a69115\x2d956d\x2d41b3\x2d830c\x2d9a3878087d41.device (1min 24s / 1min 30s)
^[[K[ ^[[0;31m*^[[0;1;31m*^[[0m^[[0;31m*  ^[[0m] A start job is running for dev-disk-by\x2duuid-00a69115\x2d956d\x2d41b3\x2d830c\x2d9a3878087d41.device (1min 24s / 1min 30s)
^[[K[^[[0;31m*^[[0;1;31m*^[[0m^[[0;31m*   ^[[0m] A start job is running for dev-disk-by\x2duuid-00a69115\x2d956d\x2d41b3\x2d830c\x2d9a3878087d41.device (1min 25s / 1min 30s)
^[[K[^[[0;1;31m*^[[0m^[[0;31m*    ^[[0m] A start job is running for dev-disk-by\x2duuid-00a69115\x2d956d\x2d41b3\x2d830c\x2d9a3878087d41.device (1min 25s / 1min 30s)
^[[K[^[[0m^[[0;31m*     ^[[0m] A start job is running for dev-disk-by\x2duuid-00a69115\x2d956d\x2d41b3\x2d830c\x2d9a3878087d41.device (1min 26s / 1min 30s)
^[[K[^[[0;1;31m*^[[0m^[[0;31m*    ^[[0m] A start job is running for dev-disk-by\x2duuid-00a69115\x2d956d\x2d41b3\x2d830c\x2d9a3878087d41.device (1min 26s / 1min 30s)
^[[K[^[[0;31m*^[[0;1;31m*^[[0m^[[0;31m*   ^[[0m] A start job is running for dev-disk-by\x2duuid-00a69115\x2d956d\x2d41b3\x2d830c\x2d9a3878087d41.device (1min 27s / 1min 30s)
^[[K[ ^[[0;31m*^[[0;1;31m*^[[0m^[[0;31m*  ^[[0m] A start job is running for dev-disk-by\x2duuid-00a69115\x2d956d\x2d41b3\x2d830c\x2d9a3878087d41.device (1min 27s / 1min 30s)
^[[K[  ^[[0;31m*^[[0;1;31m*^[[0m^[[0;31m* ^[[0m] A start job is running for dev-disk-by\x2duuid-00a69115\x2d956d\x2d41b3\x2d830c\x2d9a3878087d41.device (1min 28s / 1min 30s)
^[[K[   ^[[0;31m*^[[0;1;31m*^[[0m^[[0;31m*^[[0m] A start job is running for dev-disk-by\x2duuid-00a69115\x2d956d\x2d41b3\x2d830c\x2d9a3878087d41.device (1min 28s / 1min 30s)
^[[K[    ^[[0;31m*^[[0;1;31m*^[[0m] A start job is running for dev-disk-by\x2duuid-00a69115\x2d956d\x2d41b3\x2d830c\x2d9a3878087d41.device (1min 29s / 1min 30s)
^[[K[     ^[[0;31m*^[[0m] A start job is running for dev-disk-by\x2duuid-00a69115\x2d956d\x2d41b3\x2d830c\x2d9a3878087d41.device (1min 29s / 1min 30s)
^[[K[    ^[[0;31m*^[[0;1;31m*^[[0m] A start job is running for dev-disk-by\x2duuid-00a69115\x2d956d\x2d41b3\x2d830c\x2d9a3878087d41.device (1min 30s / 1min 30s)
^[[K[^[[0;1;31m TIME ^[[0m] Timed out waiting for device dev-disk-by\x2duuid-00a69115\x2d956d\x2d41b3\x2d830c\x2d9a3878087d41.device.
[^[[0;1;33mDEPEND^[[0m] Dependency failed for Cryptography Setup for cr_usb-General_USB_Flash_Disk_0349315060001623-0:0-part2.
[^[[0;1;33mDEPEND^[[0m] Dependency failed for Encrypted Volumes.
[^[[0;32m  OK  ^[[0m] Reached target System Initialization.

This is particularly odd, as there is no usb drive connected to my system.

I found the corresponding device service in systemd (pastebin link, see line 67), however I am unable to tell what exactly this device is or why it is there to begin with.

Turns out that ominous usb device has an entry in /etc/crypttab

cr_sda2  UUID=7f99168c-4972-468b-900f-fb5bbfb90e66
cr_usb-General_USB_Flash_Disk_0349315060001623-0:0-part2  UUID=00a69115-956d-41b3-83 

Questions

How can I determine what device this is?
Can it be safely removed from startup and if so, how?

Similar problems

While researching this I came across several posts that describe similar symptoms but apparently with different causes. Examples of these are this blog entry and this question on Superuser SE, both tracking this issue to a faulty swap partition / entry in fstab. The excerpt from the bootlog however leads me to believe that these are not related to my particular problem.

System information

General info
I'm running OpenSUSE Leap 15 with an HDD (sda), an SSD (sdb)and an sd card (mmcblk0) connected.

blkid

/dev/sda1: UUID="7b4cf082-a27d-458a-b92b-bc4eb3f81dc5" TYPE="ext4" PARTUUID="b9b6e898-306d-4834-bc40-b06a0b05c255"
/dev/sda2: UUID="7f99168c-4972-468b-900f-fb5bbfb90e66" TYPE="crypto_LUKS" PARTUUID="eda06af5-b65d-4a41-88f3-76c884eda694"
/dev/sda3: UUID="35de195e-c983-4f53-9ef2-f3e9f42539e7" TYPE="swap" PARTUUID="15489cc9-d2c6-4446-b7fc-0efdb26c3dfe"
/dev/sdb1: UUID="3DC1-430C" TYPE="vfat" PARTUUID="7093ce52-e282-45ef-a09a-b19eb54a268e"
/dev/sdb3: UUID="1f987306-6da7-4393-b1cb-eb9c541da80c" TYPE="ext4" PARTUUID="96e413c8-1b55-4383-87f1-5c2094c27b47"
/dev/mmcblk0p1: UUID="77FB-45CC" TYPE="vfat" PARTUUID="09b07cfe-1f9b-40e9-aa52-27892b6971ff"
/dev/mapper/cr_sda2: UUID="3f9a66f0-dea7-4d5d-a200-bd1033718af8" TYPE="ext4"
/dev/mmcblk0: PTUUID="21d3220a-de4c-4f1c-9abc-e57d62434b4e" PTTYPE="gpt"

/etc/fstab

UUID=7b4cf082-a27d-458a-b92b-bc4eb3f81dc5  /          ext4  acl,user_xattr               0  1
UUID=35de195e-c983-4f53-9ef2-f3e9f42539e7  swap       swap  defaults                     0  0
UUID=1f987306-6da7-4393-b1cb-eb9c541da80c  /boot      ext4  data=ordered,acl,user_xattr  0  2
UUID=3f9a66f0-dea7-4d5d-a200-bd1033718af8  /home      ext4  data=ordered,acl,user_xattr  0  2
UUID=3DC1-430C                             /boot/efi  vfat  defaults                     0  0

ls -l /dev/disk/by-uuid

total 0
lrwxrwxrwx 1 root root 10 Nov 29 08:59 1f987306-6da7-4393-b1cb-eb9c541da80c -> ../../sdb3
lrwxrwxrwx 1 root root 10 Nov 29 08:59 35de195e-c983-4f53-9ef2-f3e9f42539e7 -> ../../sda3
lrwxrwxrwx 1 root root 10 Nov 29 08:59 3DC1-430C -> ../../sdb1
lrwxrwxrwx 1 root root 10 Nov 29 08:25 3f9a66f0-dea7-4d5d-a200-bd1033718af8 -> ../../dm-0
lrwxrwxrwx 1 root root 15 Nov 29 08:59 77FB-45CC -> ../../mmcblk0p1
lrwxrwxrwx 1 root root 10 Nov 29 08:59 7b4cf082-a27d-458a-b92b-bc4eb3f81dc5 -> ../../sda1
lrwxrwxrwx 1 root root 10 Nov 29 08:59 7f99168c-4972-468b-900f-fb5bbfb90e66 -> ../../sda2
2
  • How can I determine what device this is?

You can double-check this device is not present by comparing it to the list of block devices and their UUIDs. The commands you already used to list them are fine. The device logic is driven by udev, which uses blkid internally.

  • Can it be safely removed from startup and if so, how?

You can create a backup copy of crypttab and then remove the line, or add a # at the start of the line to comment it out.

(I like to use etckeeper, it's like having "system restore points" for individual configuration files in /etc :-). You have to know how to use a version control system though).

While researching this I came across several posts that describe similar symptoms but apparently with different causes. Examples of these are this blog entry and this question on Superuser SE, both tracking this issue to a faulty swap partition / entry in fstab. The excerpt from the bootlog however leads me to believe that these are not related to my particular problem.

Fair. It's a very closely related problem though. You have a device which is listed as being required for the boot process. Therefore your boot waits to find it. After a timeout, the device is considered failed.

(According to my documentation, the boot process should also require this device, meaning that a failure or timeout will boot into the emergency.target shell, instead of default.target). crypttab even supports the same named options as in fstab to modify this behaviour: noauto, nofail, and x-systemd.device-timeout=....

For fstab entries, systemd generates .mount and .swap units. For crypttab entries, it just generates an instance of a template .service unit, systemd-cryptsetup@.service.

The .device unit appears in systemd because it needs something to represent that it is waiting for a matching device. This is expected behaviour.

the boot log, which showed the start job for a device timing out and directly afterwards failing the cryptography setup of a device referenced as cr_usb-General_USB_Flash_Disk. I am unsure whether the two are connected.

They are. The UUID of the timed-out device is the same as the UUID the crypttab lists as belonging to this USB flash disk. EDIT: ah, you meant the slow bootup. Yes, absolutely.


[ TIME ] Timed out waiting for device dev-disk-by\x2duuid-00a69115\x2d956d\x2d41b3\x2d830c\x2d9a3878087d41.device.
[DEPEND] Dependency failed for Cryptography Setup for cr_usb-General_USB_Flash_Disk_0349315060001623-0:0-part2.

/etc/crypttab

cr_sda2 UUID=7f99168c-4972-468b-900f-fb5bbfb90e66
cr_usb-General_USB_Flash_Disk_0349315060001623-0:0-part2 UUID=00a69115-956d-41b3-83

  • And how can I deal with that? Simply remove the entry in crypttab? – deemel Nov 29 '18 at 20:45
  • @Rickyfox yes :-). Edited answer. – sourcejedi Nov 29 '18 at 21:02
  • "It relies on you knowing Git though". Correction: etckeeper, despite the name, supports a number of other VCSs, namely (at least for my version) Mercurial, Bazaar, and Darcs. – Faheem Mitha Nov 29 '18 at 21:17
  • @FaheemMitha hah, which is fair point when it comes to Git's user friendliness, compared to mercurial. Fixed. – sourcejedi Nov 29 '18 at 21:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.