Bug#375928: base-installer: install cryptsetup if necessary
Package: base-installer
Version: 1.60
Severity: normal
Tags: patch
currently partman-crypto does an "apt-install cryptsetup" and the
postinst of cryptsetup later regenerates the initramfs image.
The attached patch allows base-installer to know when cryptsetup is
necessary and to install it before the initramfs image has been
generated so that the crypto-root hook/script can be included.
Index: debian/postinst
===================================================================
--- debian/postinst (revision 38488)
+++ debian/postinst (working copy)
@@ -340,6 +340,13 @@
fi
fi
+ # We need to do this test separately because root could be on an LVM LV
+ # which is in turn on top of an encrypted device so we can't check
+ # the root node directly as is done above
+ if dmsetup table | cut -d' ' -f4 | grep -q "crypt"; then
+ apt-install cryptsetup
+ fi
+
if pvdisplay | grep -iq "physical volume ---"; then
apt-install lvm2
mount -t proc proc /target/proc
Index: debian/changelog
===================================================================
--- debian/changelog (revision 38488)
+++ debian/changelog (working copy)
@@ -1,3 +1,10 @@
+base-installer (1.61) UNRELEASED; urgency=low
+
+ * If we have any dm-crypt devices, install cryptsetup before the
+ initramfs image is generated.
+
+ -- David Härdeman <david@2gen.com> Thu, 29 Jun 2006 01:36:37 +0200
+
base-installer (1.60) unstable; urgency=low
* Support finish-install, both by installing the script there and for
Reply to: