decrypt-root-with-usb: Updated to Debian.
This commit is contained in:
parent
fe1018842b
commit
5f1f46623e
|
@ -33,6 +33,7 @@ your initramfs, you need to add them by adding to
|
||||||
usb_storage
|
usb_storage
|
||||||
nls_utf8
|
nls_utf8
|
||||||
nls_cp437
|
nls_cp437
|
||||||
|
nls_ascii
|
||||||
vfat
|
vfat
|
||||||
fat
|
fat
|
||||||
sd_mod
|
sd_mod
|
||||||
|
|
|
@ -193,15 +193,18 @@ setup_mapping()
|
||||||
|
|
||||||
if [ -z "$cryptkeyscript" ]; then
|
if [ -z "$cryptkeyscript" ]; then
|
||||||
# Test all devices
|
# Test all devices
|
||||||
mkdir /mnt
|
mkdir -p /tmp/mnt
|
||||||
echo -n "Searching for cryptkey.txt on available disks... "
|
echo "Searching for cryptkey.txt on available disks... "
|
||||||
for partition in `cat /proc/partitions |awk '{print $4}'|tail -n +3`; do
|
for partition in `cat /proc/partitions |awk '{print $4}'|tail -n +3`; do
|
||||||
if mount /dev/$partition /mnt 2>/dev/null; then
|
echo Trying /dev/$partition
|
||||||
cat /mnt/cryptkey.txt >> /tmp/cryptkeys.txt 2>/dev/null
|
if mount /dev/$partition /tmp/mnt 2>/dev/null; then
|
||||||
|
if cat /tmp/mnt/cryptkey.txt >> /tmp/cryptkeys.txt 2>/dev/null; then
|
||||||
|
echo "Found keys on /dev/$partition"
|
||||||
|
fi
|
||||||
umount /dev/$partition
|
umount /dev/$partition
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo "done."
|
echo "Done searching."
|
||||||
|
|
||||||
if [ ${cryptsource#/dev/disk/by-uuid/} != $cryptsource ]; then
|
if [ ${cryptsource#/dev/disk/by-uuid/} != $cryptsource ]; then
|
||||||
# UUIDs are not very helpful
|
# UUIDs are not very helpful
|
||||||
|
@ -335,6 +338,7 @@ setup_mapping()
|
||||||
rm /tmp/cryptkeys.txt
|
rm /tmp/cryptkeys.txt
|
||||||
unset key
|
unset key
|
||||||
fi
|
fi
|
||||||
|
echo Keyfound = "$keyfound"
|
||||||
if [ "$keyfound" = "0" ]; then
|
if [ "$keyfound" = "0" ]; then
|
||||||
# Fall back to manual entry
|
# Fall back to manual entry
|
||||||
if ! crypttarget="$crypttarget" cryptsource="$cryptsource" \
|
if ! crypttarget="$crypttarget" cryptsource="$cryptsource" \
|
||||||
|
|
Loading…
Reference in a new issue