This is needed for the initrd to include the cryptsetup binaries and modules
with cryptsetup >= 2:1.6.6-1 after the patch in https://bugs.debian.org/714104
Thanks: Charles A. Hewson <cahewson@eskimo.com>
echo "Rebuilding initramfs"
for initrd in "$(basename $target/boot/vmlinuz-*)" ; do
- if ! $ROOTCMD update-initramfs -k "${initrd##vmlinuz-}" -c ; then
+ if ! CRYPTSETUP=y $ROOTCMD update-initramfs -k "${initrd##vmlinuz-}" -c ; then
echo "Creating fresh initrd did not work, trying update instead:"
- $ROOTCMD update-initramfs -k "${initrd##vmlinuz-}" -u
+ CRYPTSETUP=y $ROOTCMD update-initramfs -k "${initrd##vmlinuz-}" -u
fi
done