I was about to file a similar wishlist and found that
there was already a well-evolved set of scripts in this one.
Rather than rely on partition types (luks is a partition type?), I had
my init-premount script use cryptsetup and an encrypted= cmdline, as
follows:<br>
<br>
export ENCRYPTED=<br>
for x in $(cat /proc/cmdline); do<br>
case $x in<br>
encrypted=*)<br>
ENCRYPTED=${x#encrypted=}<br>
if cryptsetup isLuks ${ENCRYPTED}<br>
then<br>
cryptsetup luksOpen ${ENCRYPTED} ${ROOT#/dev/mapper/}<br>
fi<br>
;;<br>
esac<br>
done<br>
<br>
<br>
<br>