Page 1 of 1

How to stop systemd automounting a removable device [SOLVED]

PostPosted: Mar 11th, '24, 00:07
by flavianoep
Hi!
I have a password protected thumbdrive and systemd asks for a password for it in every boot. If I don't have it plugged in at boot time, systemd waits for one and a half minute before completing boot.
Investigating, I found a service called systemd-cryptsetup@luks\\x2dcf6c1ade\\x2d443a\\x2d4d90\\x2db8d0\\x2d373238f75eed.service that I can't disable.
Trying
Code: Select all
systemctl disable systemd-cryptsetup@luks\\x2dcf6c1ade\\x2d443a\\x2d4d90\\x2db8d0\\x2d373238f75eed.service
results in
Code: Select all
The unit files have no installation config (WantedBy=, RequiredBy=, Also=,
Alias= settings in the [Install] section, and DefaultInstance= for template
units). This means they are not meant to be enabled or disabled using systemctl.
 
Possible reasons for having this kind of units are:
• A unit may be statically enabled by being symlinked from another unit's
  .wants/ or .requires/ directory.
• A unit's purpose may be to act as a helper for some other unit which has
  a requirement dependency on it.
• A unit may be started when needed via activation (socket, path, timer,
  D-Bus, udev, scripted systemctl call, ...).
• In case of template units, the unit is meant to be enabled with some
  instance name specified.

Is there any way to disable that?

moved to appropriate forum. ~Germ

Re: How to stop systemd automounting a removable device

PostPosted: Mar 11th, '24, 17:45
by sturmvogel
Remove the drive from /etc/fstab

Re: How to stop systemd automounting a removable device

PostPosted: Mar 11th, '24, 18:03
by doktor5000
It might help if you could show your /etc/fstab and if it does not have an entry there then maybe also /etc/crypttab

If it has an entry in fstab, after removing that entry you need to regenerate the initrd as it will also contain a copy of the fstab.

Re: How to stop systemd automounting a removable device

PostPosted: Mar 12th, '24, 01:08
by flavianoep
Thank you very much doktor5000! Removing /etc/crypttab did it!

Re: How to stop systemd automounting a removable device [SOL

PostPosted: Mar 12th, '24, 12:55
by isadora
Provided with the correct information, would you be so kind, to mark the topic solved.
You can do so, by writing [SOLVED] leftwards of the topic-title in your first message.
Thanks ahead. ;)