[pkg-cryptsetup-devel] Bug#629236: cryptsetup: initramfs cryptroot mdadm support
Alexander Kurtz
kurtz.alex at googlemail.com
Sun Feb 5 20:12:30 UTC 2012
tags 629236 patch
thanks
Hi Steven,
On Thu, 2011-08-18 at 12:04 +0200, Steven Malin wrote:
> thank you for your effort.
> I'll try it.
I hope the script worked for you. If you're still interested you might
want to have a look at the attached new version:
The main difference is that you can now skip a drive if you want to, and
that there is a 60 second timeout so an unattended boot won't block
forever. What do you think?
Best regards
Alexander Kurtz
==> /etc/initramfs-tools/hooks/cryptgroup <==
#!/bin/sh -e
if [ "${1}" = "prereqs" ]; then
exit 0
fi
. /usr/share/initramfs-tools/hook-functions
copy_exec /sbin/blkid
copy_exec /sbin/cryptsetup
force_load dm_crypt
==> /etc/initramfs-tools/scripts/init-premount/cryptgroup <==
#!/bin/sh -e
if [ "${1}" = "prereqs" ]; then
exit 0
fi
for uuid in `blkid -o value -s UUID -t TYPE=crypto_LUKS`; do
while true; do
for passphrase in "${@}"; do
echo "${passphrase}" | cryptsetup luksOpen "/dev/disk/by-uuid/${uuid}" "${uuid}-plain" && break 2
done
read -p "Passphrase for UUID=${uuid} (enter to skip): " -s -t 60 passphrase || passphrase="error"; echo
[ "${passphrase}" = "error" ] && break 2
[ "${passphrase}" = "" ] && break 1
set -- "${passphrase}" "${@}"
done
done
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-cryptsetup-devel/attachments/20120205/7cdccf72/attachment.pgp>
More information about the pkg-cryptsetup-devel
mailing list