Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysterious path resolution in initrd #72

Open
dorianpb opened this issue Jun 30, 2020 · 9 comments
Open

mysterious path resolution in initrd #72

dorianpb opened this issue Jun 30, 2020 · 9 comments

Comments

@dorianpb
Copy link

dorianpb commented Jun 30, 2020

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.

@Andrei-Pozolotin
Copy link
Collaborator

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

@dorianpb
Copy link
Author

dorianpb commented Jul 3, 2020

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
Copy link
Author

dorianpb commented Jul 6, 2020

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.

@Andrei-Pozolotin
Copy link
Collaborator

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"

@dorianpb
Copy link
Author

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

@Andrei-Pozolotin
Copy link
Collaborator

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

@dorianpb
Copy link
Author

  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

@Andrei-Pozolotin
Copy link
Collaborator

wanted to note that running the command like this

you mean not using absolute path to the executable?

@dorianpb
Copy link
Author

It worked for me without using the absolute path.

@Andrei-Pozolotin Andrei-Pozolotin changed the title Disabling initrd-tinysshd.service causes boot to hang on "Starting Cryptography Setup for <root filesystem>..." mysterious path resolution in initrd Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants