--- /dev/null
+#!/bin/sh -eu
+tool=$(readlink -e "${0%/*}/..")
+. "$tool"/host/lib.sh
+
+# NOTE: la clef de chiffrement est dérivée de celle de /,
+# / doit être déchiffrée pour que cela fonctionne.
+part="$1"
+eval "dev=\"\$vm_dev_disk_$part\""
+test ! -e /dev/mapper/${vm_lvm_lv}_root_deciphered ||
+sudo /bin/sh -c "/lib/cryptsetup/scripts/decrypt_derived ${vm_lvm_lv}_root_deciphered |
+cryptsetup luksFormat --hash=sha512 --key-size=512 \
+ --cipher=aes-xts-essiv:sha256 --key-file=- --align-payload=8 $dev"