I am trying to use a keyscript to unlock some filesystem. The initramfs "cryptroot" script allows keyscripts to be used. However, systemd doesn't.
What can I do to gracefully revert to SysV init script for cryptdisks?
I actually added cryptsetup.target to sysinit.target.wants and cryptdisks.service to cryptsetup.target.wants.
Then I removed the symlink and created a file with contents:
Code:
[Unit] Description=CryptDisks Requires=boot.mount After=boot.mount [Service] ExecStart=/etc/init.d/cryptdisks start
It now appears as though my system always boots as intended, but I'm sure that if the cryptdisks target fails, mayhem will ensue. The goal was for it to fail gracefully, but even though the mount for this filesystem is specified as "nofail" in fstab, it still fails regardless.
The reason I killed the systemd-cryptsetup system is because it will ask for a password. It will prompt the user for a password, and that is not my intent.
Now it will still think it is failing, but because all of the sub-targets are getting reached anyway (I mean the mounting of the various filesystems and swaps and so on) it still triggers everything that needs to be triggered, and booting continues. But if that one filesystem fails to get mounted, it waits indefinitely and never completes.
The mounting of the filesystem is not required for booting. It just gets mounted on top of an unencrypted folder of the same name. Although, I don't know where system logs end up
.
برچسب:
نویسنده: استخدام کار