[pkg-cryptsetup-devel] Bug#1072058: Bug#1072058: Bug#1017542: systemd-cryptsetup at vda5_crypt.service: Control process exited, code=exited, status=1/FAILURE

Luca Boccassi bluca at debian.org
Mon Jun 3 00:14:39 BST 2024


On Mon, 3 Jun 2024 at 00:09, Guilhem Moulin <guilhem at debian.org> wrote:
>
> On Sun, 02 Jun 2024 at 23:35:57 +0100, Luca Boccassi wrote:
> > Yes, the purpose of the option is to leave that device alone, as it
> > cannot be closed from the host os, as programs will be running from
> > it.
>
> It doesn't leave the device alone though as it still tries to detach it.

Yes it will do some attempts in the shutdown binary, the purpose of
the option is to leave it alone in the transition before (when the
service is stopped)

> > I gather the initramfs scripts are not calling a deferred close after
> > mounting the rootfs in the initrd. If you add that, the device should
> > be automatically cleaned up when the root filesystem is umounted.
>
> initramfs-tools doesn't take the system back on shutdown, so there is
> nothing src:cryptsetup can do here.

The deferred close is given on the initrd though, immediately after
mounting, which I think is done by the cryptsetup initramfs hook?
Deferred close means that it will be closed by the kernel once the
last mount is gone. So if you call that from the initramfs hook,
things should work out automatically on shutdown.



More information about the pkg-cryptsetup-devel mailing list