Discussion:
unit symlinks ignored
(too old to reply)
John Lane
2017-09-05 16:23:09 UTC
Permalink
Raw Message
I recently upgraded a box which caused systemd to update from 232 to
234. Now it drops into an emergency shell and won't boot without my help.

Having checked the journal, I see complaints of the form:

systemd[1]: cryptsetup.target: Wants dependency dropin
/etc/systemd/system/cryptsetup.target.wants/***@sda.service is
not a symlink, ignoring.

However it is most definitely a symlink:

# ls -l
/etc/systemd/system/cryptsetup.target.wants/***@sda.service
lrwxrwxrwx 1 root root 39 Jan 29 2016
/etc/systemd/system/cryptsetup.target.wants/***@sda.service ->
/etc/systemd/system/***@.service

# file !$
file /etc/systemd/system/cryptsetup.target.wants/***@sda.service

/etc/systemd/system/cryptsetup.target.wants/***@sda.service:
symbolic link to /etc/systemd/system/***@.service
# stat
/etc/systemd/system/cryptsetup.target.wants/cryptsetup\@sda.service
File:
/etc/systemd/system/cryptsetup.target.wants/***@sda.service ->
/etc/systemd/system/***@.service
Size: 39 Blocks: 0 IO Block: 4096 symbolic
link
Device: fe02h/65026d Inode: 263672 Links: 1

Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)

Access: 2017-09-05 13:00:29.445469702 +0100
Modify: 2016-01-29 09:42:11.000000000 +0000
Change: 2016-01-29 12:35:58.866681978 +0000
Birth: -
#

This changed in version 233, I think the related commit is 1f9e5cf
5/feb/17 to file src/core/load-dropin.c

The intervention I perform to allow the boot to continue is to
"systemctl start" the units that systemd chose to ignore. My current
workaround is to downgrade to systemd 232 which boots without intervention.

FYI the unit in question "***@.service" is a custom unit that
mounts encrypted volumes using external luks headers and keys because
crypttab could not handle that (I don't know if that situation has
changed) but I don't think that's relevant to the issue at hand.

Please let me know if I can provide any more information. If this is a
bug then I can raise it on the Github issue tracker.
John Lane
2017-09-05 16:44:12 UTC
Permalink
Raw Message
Post by John Lane
systemd[1]: cryptsetup.target: Wants dependency dropin
not a symlink, ignoring.
I think I know what the problem is. I bet it isn't a symlink inside my
initramfs. I need to check but just wanted to put this out there :)
John Lane
2017-09-05 18:23:39 UTC
Permalink
Raw Message
Archlinux uses a 'mkinitcpio' script to create the initramfs image file.
This copies files into a working directory which it then archives. The
problem with this is that files which were symlinks are not in the copy.

If the initramfs uses systemd then this is a potential problem.

This isn't a systemd problem but more of an archlinux one, so I've
raised it over there...

Loading...