Lists (12024-07-14): > When I researched the problem I encountered some posts stating that systemd > had its own implementation for cryptsetup
This is not true. systemd-cryptsetup uses libcryptsetup, it is mostly only glue. > <rant-mode on> > Why the *&^%#@! it is necessary to have this borg-like behaviour of systemd > is beyond me. This is not the first time it is causing problems. TBH, this > is more an ommission of d-i than of systemd. But then again, it would not > have happened if there was just one implementation of cryptsetup. > </rant-mode off> It is not necessary to use systemd: you are free to use a bunch of unreliable shell scripts to boot your system, as used to be the case, or to use any of the other replacements for the bunch of unreliable shell scripts that are better than systemd. But the bunch of unreliable shell scripts had reached its limits with hot-pluggable devices, and the other replacements are more obscure, and usually less mature due to lack of hackerpower. That is why when Debian decided to ditch the bunch of unreliable shell scripts, it chose systemd: Debian developers are here to package things, not develop them. So if you want to either go back or go forward in a different direction, you have to do it on your own efforts. Now, why does systemd have this “borg-like” behavior of having its own package to handle crypptab? Unlike the bunch of unreliable shell scripts, where there is a long list of commands and if that list is executed in sequence it should result in a booted system, if you are lucky, systemd has concepts of running or failed units with dependencies, so that it knows that it must start the database before running the web app, but mount the database storage before starting the database, and it can notify that an unit has suddenly failed, and so on. systemd knows to read /etc/fstab, so when it sees: /dev/mapper/aimlin-tempswap none swap defaults 0 0 it defines an unit “swap” that depends on an unit “device”. But then it finds the device does not exist: is it slow to initialize? is it failing? is there a bug in the configuration? systemd cannot guess. Installing systemd-cryptsetup teaches systemd to parse /etc/crypttab. Now, systemd sees: aimlin-tempswap /dev/disk/by-partlabel/aimlin_swap /dev/urandom swap,cipher=aes-cbc-essiv:sha256,size=256 and it knows that in order to get /dev/mapper/aimlin-tempswap it needs /dev/disk/by-partlabel/aimlin_swap and invoke a few commands, and lo!, /dev/disk/by-partlabel/aimlin_swap does exist, because lvm2 is an early dependency. <rant> If somebody is not capable of writing whatever necessary to turn a kernel just executing init into a fully usable system, even if it is fragile and completely specific for a particular setup, the relevance of their criticism about systemd will be fatally limited. </rant> Regards, -- Nicolas George