Got some responses from the systemd ML. The result may be seen here:
https://wiki.archlinux.org/index.php/Tr … md_service
I don't know how much this will help, but this is a list of initscripts / systemd daemon equivalents:
https://wiki.archlinux.org/index.php/Da … of_Daemons
Not sure whether that's of any help, knew the list before…
But I just pushed the truecrypt service files to our wiki! Hooray
]]>What happens if you run
/bin/mount /dev/sdxx /home/xxxx -t truecrypt -o fs=ext3,defaults
by hand?
I also just tried the fstab setup and although I like it very much (it just makes so much more sense to have this in fstab) it only works with initscripts!
But the problem with systemd is that one doesn't get the prompt to enter the password. So far, I only was able to get this prompt by using the service mentioned here. Mine looks like this in order to have mpd to start properly as well.
]]>I'm not on a systemd-only system yet, but the suggested service file by bpont works so far. In my case, tty access is absolutely necessary. The only thing I have to get working now is to tell mpd to wait until crypt is started, which I haven't got it to do yet.
Then see if the script from here works and everything should be fine…
]]>What happens if you run
/bin/mount /dev/sdxx /home/xxxx -t truecrypt -o fs=ext3,defaults
by hand?
It works perfectly with no errors.
]]>/bin/mount /dev/sdxx /home/xxxx -t truecrypt -o fs=ext3,defaults
by hand?
]]>Well? Did you see systemctl status home-xxxx.mount for details?
LOADED: Loaded (/etc/fstab)
Active: failed (result:exit-code)
Where: /home/xxxx
What: /dev/sdxx
Process: 211 ExecMount=/bin/mount /dev/sdxx /home/xxxx -t truecrypt -o fs=ext3,defaults (code=exited, status=1/FAILURE)
CGroup: name=systemd/system/home-xxxx.mount
bpont wrote:cfr wrote:Anything here useful?
I haven't tried the fstab route yet. I'd rather see if I can get my .service file to work because that's sort of the point of this much touted systemd.
/etc/fstab is the canonical place to configure filesystems, just like /etc/crypttab still is the place to configure encryption mappings. Unless you have a specific reason not to, I suggest using fstab rather than writing .mount files. Systemd should then DTRT and also anything else that integrates with fstab will "just work".
That method did not work. I followed the instructions:
Mount volumes via fstab
First of all, we need to write a script which will handle the way mounting via fstab is done. Place the following in /sbin/mount.truecrypt:
#!/usr/bin/env sh
DEV="$1"
MNTPT="$2"
OPTIONS=""
TCOPTIONS=""
shift 3
IFS=','
for arg in $*; do
if [ "${arg}" == "system" ]; then
TCOPTIONS="${TCOPTIONS}-m=system "
elif [[ "${arg}" == fs=* ]]; then
FS=${arg#*=}
TCOPTIONS="${TCOPTIONS}--filesystem=${FS} "
else
OPTIONS="${OPTIONS}${arg},"
fi
done
truecrypt ${DEV} ${MNTPT} ${TCOPTIONS% *} --fs-options="${OPTIONS%,*}"
Also do not forget to make the file executable:
chmod +x /sbin/mount.truecrypt
Finally, add the device to fstab somewhat like this:
/dev/sdb3 /mnt truecrypt fs=vfat,defaults 0 0
My /etc/fstab line:
/dev/sdxx /home/user truecrypt fs=ext3,defaults 0 0
Error messages on boot:
[Failed] Failed to mount /home/xxxxx See systemctl status home-xxxxx.mount for details
[DEPEND] Dependency failed for local file systems
[DEPEND] Dependency failed for basic system
[DEPEND] Dependency failed for permit user sessions
[DEPEND] Dependency failed for multi-user
[DEPEND] Dependency failed for graphical interface
I should reiterate that my original .service file worked when I had a mixed system. It was only after the full conversion that it stopped working.
]]>cfr wrote:Anything here useful?
I haven't tried the fstab route yet. I'd rather see if I can get my .service file to work because that's sort of the point of this much touted systemd.
/etc/fstab is the canonical place to configure filesystems, just like /etc/crypttab still is the place to configure encryption mappings. Unless you have a specific reason not to, I suggest using fstab rather than writing .mount files. Systemd should then DTRT and also anything else that integrates with fstab will "just work".
]]>Anything here useful?
I haven't tried the fstab route yet. I'd rather see if I can get my .service file to work because that's sort of the point of this much touted systemd.
]]>By the way, you can leave removing the init from the command line until last - it won't interfere with anything, it just isn't necessary once the compatibility symlink is in place.
Anything here useful?
]]>DAEMONS=(syslog-ng @crond dbus avahi-daemon alsa network @ntpd netfs)
as you can see, some of my daemons are backgrounded at boot and I'm not sure how to accomplish that with systemd or whether it's even necessary.
systemd takes care of dependencies, you don't need to specify order/backgrounding any longer.
My netfs daemon is no longer needed under systemd?
Correct.
]]>bpont wrote:Scimmia wrote:AFAIK, that should do it.
Actually, this is what worked:
[Unit] Description=Mount truecrypt volume to /home/user during boot ConditionFileIsExecutable=/usr/bin/truecrypt [Service] Type=oneshot ExecStart=/usr/bin/truecrypt /dev/sdxx /home/user StandardInput=tty RemainAfterExit=yes [Install] WantedBy=multi-user.target
You might want to change the ExecStart line to the correct partition.
What partition is your /home/user dir?
Also is your username user?
Um. My partition and username are correct. I just printed a generic description of them on a public forum.
I should also mention that my original configuration worked when I had a mixed system, but since removing initscripts, etc. and moving over to a pure systemd environment, now I can't get this service file to work.
]]>