random-archer / mkinitcpio-systemd-tool

Provisioning tool for systemd in initramfs (systemd-tool)
https://www.archlinux.org/packages/community/any/mkinitcpio-systemd-tool/
Other
112 stars 27 forks source link

Systemd Assignment outside of section... #71

Closed hv15 closed 4 years ago

hv15 commented 4 years ago

Hi there,

Problem

I noticed today while going through journalctl that there are these systemd warnings regarding not being able to parse some service/path/target files (most all are related to mkinitcpio-systemd-tool) in the initramfs.

At least that is what I though... I looked through the initramfs image file, but *could not* find these. There is nothing located under `/usr/local/lib/systemd` on the initramfs image. Below are the warnings: ``` Jun 20 15:10:44 sys1 systemd[1]: /usr/local/lib/systemd/system/initrd-dropbear.service:1: Assignment outside of section. Ignoring. Jun 20 15:10:44 sys1 systemd[1]: /usr/local/lib/systemd/system/cryptsetup-pre.target:1: Assignment outside of section. Ignoring. Jun 20 15:10:44 sys1 systemd[1]: /usr/local/lib/systemd/system/initrd-network.service:1: Assignment outside of section. Ignoring. Jun 20 15:10:44 sys1 systemd[1]: /usr/local/lib/systemd/system/systemd-resolved.service:1: Assignment outside of section. Ignoring. Jun 20 15:10:44 sys1 systemd[1]: /usr/local/lib/systemd/system/systemd-networkd.service:1: Assignment outside of section. Ignoring. Jun 20 15:10:44 sys1 systemd[1]: /usr/local/lib/systemd/system/initrd-shell.service:1: Assignment outside of section. Ignoring. Jun 20 15:10:44 sys1 systemd[1]: /usr/local/lib/systemd/system/initrd-debug-progs.service:1: Assignment outside of section. Ignoring. Jun 20 15:10:44 sys1 systemd[1]: /usr/local/lib/systemd/system/initrd-cryptsetup.path:1: Assignment outside of section. Ignoring. Jun 20 15:10:44 sys1 systemd[1]: /usr/local/lib/systemd/system/initrd-cryptsetup.service:1: Assignment outside of section. Ignoring. Jun 20 15:10:44 sys1 systemd[1]: /usr/local/lib/systemd/system/cryptsetup.target:1: Assignment outside of section. Ignoring. Jun 20 15:10:44 sys1 systemd[1]: /usr/local/lib/systemd/system/initrd-sysroot-mount.service:1: Assignment outside of section. Ignoring. ``` ### System Information and mkinitcpio-systemd-tool Configuration I use Arch Linux (linux-lts kernel). My boot drive has two partitions on it, one for `boot` (EFI vFat) and the other is the root partition, setup as LVM on LUKs. I use systemd-boot as my bootloader. #### Versions ``` $ systemctl --version systemd 245 (245.6-7-arch) +PAM +AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid $ uname -a Linux sys1 5.4.47-1-lts #1 SMP Wed, 17 Jun 2020 19:42:02 +0000 x86_64 GNU/Linux ``` #### systemd services I have the following mkinitcpio-systemd-tool services enabled: ``` $ find /etc/systemd/system -type l -iname 'initrd*' /etc/systemd/system/initrd-debug-shell.service.wants/initrd-debug-progs.service /etc/systemd/system/initrd-root-fs.target.wants/initrd-sysroot-mount.service /etc/systemd/system/sysinit.target.wants/initrd-cryptsetup.path /etc/systemd/system/sysinit.target.wants/initrd-debug-progs.service /etc/systemd/system/sysinit.target.wants/initrd-dropbear.service ``` #### lsinitcpio output See [initramfs.img.txt](https://github.com/random-archer/mkinitcpio-systemd-tool/files/4809450/initramfs.img.txt). Are these files being auto-generated on boot within the temporary initramfs? I read somewhere that using utf-16 encoding on the systemd service files can cause this warning to be issued.

Any suggestions on this would be great, thanks!

Andrei-Pozolotin commented 4 years ago
  1. when these log entries happen? during initrd or after switch-root? https://www.freedesktop.org/software/systemd/man/bootup.html

  2. do these these log entries happen during service enable/disable?

  3. is your pacman customized with own PREFIX, etc:

https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/mkinitcpio-systemd-tool

https://github.com/random-archer/mkinitcpio-systemd-tool/blob/master/Makefile

  1. are you actually using utf-8 or utf-16 or ...?

  2. you need to dig this a little deeper

hv15 commented 4 years ago

Hi @Andrei-Pozolotin,

  1. definitely before switch-root
  2. enabling/disable initrd-dropbear.service for example does not cause any message to be printed or logged.
  3. no, pacman standard package from core repo. I'm using the AUR mkinitcpio-systemd-tool package, unchanged.
  4. pretty sure I'm using utf-8 (locale.conf has LANG=en_US.UTF-8)
  5. Agreed, but I'm not sure where this could be coming from...
Andrei-Pozolotin commented 4 years ago

I'm using the AUR mkinitcpio-systemd-tool package, unchanged.

you surely mean not AUR, but community: ? https://www.archlinux.org/packages/community/any/mkinitcpio-systemd-tool/

hv15 commented 4 years ago

you surely mean not AUR, but community: ? https://www.archlinux.org/packages/community/any/mkinitcpio-systemd-tool/

Yes that is what I mean, version 36.

Andrei-Pozolotin commented 4 years ago

assume resolved