mkinitcpio-systemd-tool icon indicating copy to clipboard operation
mkinitcpio-systemd-tool copied to clipboard

mysterious path resolution in initrd

Open dorianpb opened this issue 5 years ago • 9 comments

If i do enable initrd-tinysshd.service, it boots up fine but complains "Error: No such file or directory" about 13-15 times in a row, then complains two more times later.The logs in journalctl don't seem to show any of this, though. I'm also booting with plymouth. I have these initrd-* units enabled: (I didn't edit any of them) initrd-plymouth.path initrd-shell.service initrd-sysroot-mount.service initrd-tinysshd.service

I can post more info than this but I don't really know what you guys would need to see.

dorianpb avatar Jun 30 '20 17:06 dorianpb

please read through wiki pages and related issues first, see if that brings up any ideas: https://github.com/random-archer/mkinitcpio-systemd-tool/wiki

Andrei-Pozolotin avatar Jul 02 '20 15:07 Andrei-Pozolotin

Okay, I spend a while looking through all of the issues I could find and none of them really helped me or addressed my problem. This is mostly because I have no idea what's causing it.

dorianpb avatar Jul 03 '20 14:07 dorianpb

After spending a lot of time and inserting a lot of "echo" commands into your initrd-shell.sh script, I found that all of the "Failed to execute process: No such file or directory" complaints were coming from line 65 in initrd-shell.sh. echo "$text" | $systemd_cat --priority="$mode" --identifier="$script_identifier" Commenting this line out stops all of the errors from being printed and the system still boots normally.

dorianpb avatar Jul 06 '20 18:07 dorianpb

please confirm:

  1. /usr/bin/systemd-cat is present both on root system and as part of initrramfs

  2. command below produces expected log entry visible with journalctl -e:

echo "hello-there" | systemd-cat --priority="info" --identifier="hello-kitty"

Andrei-Pozolotin avatar Jul 11 '20 13:07 Andrei-Pozolotin

Sorry for my delayed response, my internet was kinda crapping out a lot recently.

  1. /usr/bin/systemd-cat is present in both the root filesystem and on the initramfs (I used lsinitcpio to check)
  2. On the root filesystem, this works. On the debug shell within the initramfs, it doesn't. It produces the Failed to execute process: No such file or directoryerror

dorianpb avatar Jul 16 '20 13:07 dorianpb

On the debug shell within the initramfs, it doesn't.

  1. you mean /usr/bin/systemd-cat actually runs but produces that specific error?

  2. try to add strace to the initramfs image and then run this test under strace, to see specifically what/where is it complaining about https://linux.die.net/man/1/strace

Andrei-Pozolotin avatar Jul 16 '20 21:07 Andrei-Pozolotin

  1. Yes
  2. It's complaining about the file /etc/of.so.preload Also, I wanted to note that running the command like this systemd-cat --priority="info" --identifier="hello-kitty" echo "hello-there" gives the expected output in journalctl

dorianpb avatar Jul 23 '20 15:07 dorianpb

wanted to note that running the command like this

you mean not using absolute path to the executable?

Andrei-Pozolotin avatar Jul 27 '20 17:07 Andrei-Pozolotin

It worked for me without using the absolute path.

dorianpb avatar Jul 27 '20 17:07 dorianpb