You are not logged in.
Pages: 1
I have created a truecrypt unit according to the wiki, in order to mount an encrypted volume upon system boot. With initscripts i just used an entry at /etc/rc.local and /etc/rc.local.shutdown.
The problem is that the service starts as it should and prompts me for a password during boot, but it seems that it doesn't accept stdin from keyboard although i use the "StandardInput=tty-force" option. Any suggestions?
[Unit]
Description=Mount Truecrypt-encrypted filesystem
ConditionFileIsExecutable=/usr/bin/truecrypt
[Service]
Type=oneshot
ExecStart=/usr/bin/truecrypt -k "" --protect-hidden=no /path/to/file.tc /mount/point
StandardInput=tty-force
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
Offline
I don't know whether this helps, but systemd provides a program named systemd-ask-password. Maybe you should write a script using this.
Offline
Offline
I don't know why, but this script work son one of my Arch installs, and *not* on the other. The only real difference at that point would be the bootloader. You don't happen to be using grub-legacy?
Offline
Has anyone figured this out? I've tried the truecrypt service and truecrypt mount variations of systemd services from the Arch wiki with no success. I've been trying to test them from a terminal with no success. With the service variant, I named it truecrypt@.service and tried enabling via truecrypt@dev-sda4.service and it doesn't think there's such a file.
I also tried using ExecStartPre=systemd-ask-password "Please enter truecrypt password" as well as the same option for ExecStartPost and had no success.
Really would like this to work...
Re. the bootloader, I'm on grub legacy. I can try on my other computer, which is using syslinux.
Offline
I don't know why, but this script work son one of my Arch installs, and *not* on the other. The only real difference at that point would be the bootloader. You don't happen to be using grub-legacy?
I am indeed using grub-lagacy, but afaik it has nothing to do with stdin upon boot. Boot loader is responsible only for loading kernel into memory...
Offline
All I can say is that it works on my laptop which has grub2 installed. But perhaps the difference is not grub2, but the simple fact of the laptop's keyboard being connected via PS/2 and not USB like with my desktop (which has grub-legacy and where the input does NOT work).
Offline
Did anyone actually follow up the link falcondy provided? I noticed that the wiki still suggests a method which that thread recommends against (e.g. tty-force).
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
I don't really know how to go without tty-force, since I have no clue how to use "systemd-ask-password" instead... some help would be greatly appreciated.
Offline
It works !
The important part is to modify fstab because it stops the boot process to let you type your password.
Offline
Pages: 1