FS#55535 - [mkinitcpio] Systemd units dependencies in the initramfs must be symbolic links.
Attached to Project:
Arch Linux
Opened by John Lane (starfry) - Wednesday, 06 September 2017, 13:05 GMT
Last edited by Jelle van der Waa (jelly) - Wednesday, 23 November 2022, 11:09 GMT
Opened by John Lane (starfry) - Wednesday, 06 September 2017, 13:05 GMT
Last edited by Jelle van der Waa (jelly) - Wednesday, 23 November 2022, 11:09 GMT
|
Details
Systemd since 233 ignores unit files it expects to be
symlinks but aren't. This means that any unit dependencies
(e.g. some_unit.wants/something.service) must be symlinks.
Before 233 it did not matter.
When this happens, it is reported in the systemd journal like this: Sep 05 15:46:50 archlinux systemd[1]: foo.target: Wants dependency dropin /etc/systemd/system/foo.target.wants/bar@baz.service is not a symlink, ignoring. When mkinitcpio creates the initramfs it COPIES (it uses 'install -D') the files given in the FILES block. Any of those which are symlinks in the filesystem will become regular files in the initramfs due to this copy. I have manually created a "cpio" (by extracting and repacking) that does contain symlinks and that does work fine. What is needed is for mkinitcpio to copy symlinks as-is (without dereferencing), or a way to specify symlinks that should not be dereferenced separately from files. Additional info: * mkinitcpio 23-1 * systemd 234.11-8 * This changed in version 233 of systemd, I think the related commit is 1f9e5cf 5/feb/17 to file src/core/load-dropin.c Steps to reproduce: * Add a custom systemd unit SYMLINK to /etc/systemd/system/<something>.wants * Add that symlink to the FILES section of mkinitcpio.conf * Do a mkinitcpio * Boot * The aforementioned unit will be ignored (as reported in the journal) |
This task depends upon
Closed by Jelle van der Waa (jelly)
Wednesday, 23 November 2022, 11:09 GMT
Reason for closing: Fixed
Additional comments about closing: mkinitcpio 33-1
Wednesday, 23 November 2022, 11:09 GMT
Reason for closing: Fixed
Additional comments about closing: mkinitcpio 33-1
Patch should fix your issue.