USB-Disks reported as "failed with result 'dependency'"

I’m using five USB-Disks which are only connected and mounted to the laptop-PC when needed.
Now I find these messages during shut-down:

$ journalctl -b -1 | grep -i dependency
Nov 12 09:06:08 IBM-T14s systemd[1]: Dependency failed for /media/myBook8_B.
Nov 12 09:06:08 IBM-T14s systemd[1]: media-myBook8_B.mount: Job media-myBook8_B.mount/start failed with result 'dependency'.
Nov 12 09:06:08 IBM-T14s systemd[1]: Dependency failed for /media/myBook8_A.
Nov 12 09:06:08 IBM-T14s systemd[1]: media-myBook8_A.mount: Job media-myBook8_A.mount/start failed with result 'dependency'.
Nov 12 09:06:08 IBM-T14s systemd[1]: Dependency failed for /media/myBook16_A.
Nov 12 09:06:08 IBM-T14s systemd[1]: media-myBook16_A.mount: Job media-myBook16_A.mount/start failed with result 'dependency'.
Nov 12 09:06:08 IBM-T14s systemd[1]: Dependency failed for /media/myBook16_B.
Nov 12 09:06:08 IBM-T14s systemd[1]: media-myBook16_B.mount: Job media-myBook16_B.mount/start failed with result 'dependency'.
Nov 12 09:06:08 IBM-T14s systemd[1]: Dependency failed for /media/HDD2go.
Nov 12 09:06:08 IBM-T14s systemd[1]: media-HDD2go.mount: Job media-HDD2go.mount/start failed with result 'dependency'.

In that session none of the drives has been used or connected or mounted.

In /etc/fstab these drives are defined as follows:

UUID=0f00000d-50e6-4eec-0500-efd050000404	/media/myBook8_A	ext4	auto,nofail,rw,async,users	0	0
UUID=0e05000f-ee5e-4a00-0c45-fa05d0046060	/media/myBook8_B	ext4	auto,nofail,rw,async,users	0	0
UUID=ac006440-0bfd-4005-aa50-5c4b6b005005	/media/myBook16_A	ext4	auto,nofail,rw,async,users	0	0
UUID=0060de0a-c00c-4e00-04af-c6de0ad0bfc0	/media/myBook16_B	ext4	auto,nofail,rw,async,users	0	0
UUID=4bb0050f-0050-4b0d-000e-0d5a00c56a0e	/media/HDD2go	    ext4	auto,nofail,rw,async,users	0	0

How to fix this? Thank you!

Just off the top, could this be failing to unmount them on shutdown? And the dependency missing is having them mounted? Because if that is the case, there is nothing to fix.

Thank you, but as I said in OP: The drives are not and were not mounted during that session:

$ umount /media/myBook16_A
umount: /media/myBook16_A: is NOT mounted.
$ umount /media/myBook16_B
umount: /media/myBook16_B: is NOT mounted.
$ umount /media/myBook8_A
umount: /media/myBook8_A: is NOT mounted.
$ umount /media/myBook8_B
umount: /media/myBook8_B: is NOT mounted.
$ umount /media/HDD2go
umount: /media/HDD2go: is NOT mounted.
$ 

No need, just ignore the message. This is just informative, actual no error being reported here. It tells you systemd failed in trying to mount them, that’s all. If you want to have the sticks mounted immediately upon plugging in then better use x-systemd.automount if you don’t like this message.

Thank you @Wollie,

Ok, but I don’t like having red lines in the startup- or shutdown-screen; any chance to suppress it?

Seems your system is trying to auto mount these drives. Check that they are not.

In case you boot via grub, make sure the following kernel parameters are in your /etc/default/grub file:

quiet loglevel=3 systemd.show_status=auto rd.udev.log_level=3

This belongs in the line starting with …

GRUB_CMDLINE_LINUX_DEFAULT="

I would put it right at the start after the first "
Make sure not to have it doubled, some of the parameters might be there already. :wink:

Afterwards, save it and run

$ sudo update-grub

and reboot.

Nevertheless, I’m not 100% sure if this removes the messages you see, now.

Thank you @fbt89,

How to check this?

This isn’t something I’ve dealt with in awhile, so you might want to refer to something more official. Here is a wiki article fstab - Wikipedia

Fstab controls the mounting of drives. In my situation I have no entries for USB drives, so when I plug one in I get the Plasma notification to mount & open. Suggest you comment those lines out, reboot and see how that works out. Also System Settings has a section for drives, mine is blank.

One EASY way is to remove them form fstab. (Or comment them out, and only uncomment them when you are going to have them available to the system for mounting. As was suggested, you can use a different tool for mounting them.

PS: And I see I am NOT the only one saying that. Ignore me and attend to the others.

Plasma handles mounting of USB drives via System Settings → Connected Devices → Disks & Cameras → Device Auto-Mount:

Whenever you plug a USB drive in, your system tray should pop-up the Disks & Devices notifier/dialog so that you can manually mount or unmount the connected device:

As others have mentioned in this topic, there is no need for any entries in fstab for removable USB drives. I don’t have any of my attached devices included in my /etc/fstab file:

❯ cat /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>
UUID=D958-561D                            /boot/efi      vfat    umask=0077 0 2
UUID=3b35a910-e6a3-4c9e-ba59-06e4eb08ed6f /              ext4    defaults,noatime 0 1
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0

Note though that using Plasma’s automounting feature will probably mount external devices to /run/media/<user>/, not /media/:

❯ tree -L 2 /run/media/
/run/media/
└── scotty
    ├── 14TB-Elements
    ├── Ventoy
    └── VTOYEFI

5 directories, 0 files

Remove auto from the mount options. They are removable devices, and the auto mount option means that the system will try to mount them automatically at boot time.

Thank yor @Aragorn,

Did this

# UUID=0060de0a-c00c-4e00-04af-c6de0ad0bfc0	/media/myBook16_B	ext4	auto,nofail,rw,async,users	0	0
UUID=0060de0a-c00c-4e00-04af-c6de0ad0bfc0	/media/myBook16_B	ext4	nofail,rw,async,users	0	0

but the result is the same:

Nov 15 14:44:06 xxx-Txxs systemd[1]: Dependency failed for /media/myBook16_B.
Nov 15 14:44:06 xxx-T99s systemd[1]: media-myBook16_B.mount: Job media-myBook16_B.mount/start failed with result 'dependency'.

Instead of removing auto replace it with noauto.

Result: The partition will not be mounted automatically when you turn on or reboot your computer.

You still can mount the drive whenever you want using sudo mount ...

Thank you @Wollie and @Aragorn,

Did this:

# UUID=0060de0a-c00c-4e00-04af-c6de0ad0bfc0	/media/myBook16_B	ext4	auto,nofail,rw,async,users	0	0
UUID=0060de0a-c00c-4e00-04af-c6de0ad0bfc0	/media/myBook16_B	ext4	noauto,nofail,rw,async,users	0	0

connected the drive and

$ sudo mount /media/myBook16_B

But nothing happens …
What’s next?

If there was no feedback from the command, then the mount was successful. If the mount had failed, you would have gotten an error message.