aboutsummaryrefslogtreecommitdiff
path: root/resources/grub/config
diff options
context:
space:
mode:
authorKlemens Nanni <contact@autoboot.org>2015-11-05 17:39:47 +0100
committerFrancis Rowe <info@gluglug.org.uk>2015-11-05 17:24:07 +0000
commit03196594ba97c9b3a29e3ebf4f0ce1af218b80ee (patch)
tree9d36adb6b3b9917c3ab334451b7604c7a649c1c1 /resources/grub/config
parent965b63da30cc3d73209e178dc4697abc7c7365a9 (diff)
downloadlibrebootfr-03196594ba97c9b3a29e3ebf4f0ce1af218b80ee.tar.gz
librebootfr-03196594ba97c9b3a29e3ebf4f0ce1af218b80ee.zip
grub.cfg: Search for keyfile only once
Diffstat (limited to 'resources/grub/config')
-rw-r--r--resources/grub/config/menuentries/common.cfg10
1 files changed, 5 insertions, 5 deletions
diff --git a/resources/grub/config/menuentries/common.cfg b/resources/grub/config/menuentries/common.cfg
index c7a1bf77..4cebb390 100644
--- a/resources/grub/config/menuentries/common.cfg
+++ b/resources/grub/config/menuentries/common.cfg
@@ -34,14 +34,14 @@ menuentry 'Load Operating System (incl. fully encrypted disks) [O]' --hotkey='o
fi
done
done
+ # prompt user for passphrase if LUKS header is found but try using external keyfiles first
+ search -n -f /keyfile --set=kf --hint usb0, --hint usb1,
+ if [ $? = 0 ]; then
+ kf="-k (${kf})/keyfile ${d}"
+ fi
# (This way, we only need to scan for encrypted data once while covering every possible disk setup,
# be it LVM/BTRFS/ZFS/ext4/etc. (on LUKS) (on RAID) on/across raw devices/MBR/GPT
for d in ${devs}; do
- # prompt user for passphrase if LUKS header is found but try using external keyfiles first
- search -n -f /keyfile --set=kf --hint usb0, --hint usb1,
- if [ $? = 0 ]; then
- kf="-k (${kf})/keyfile ${d}"
- fi
cryptomount ${kf} ${d}
done
# 3. Do the same routine again, but for possibly decrypted data this time. There might be an LVM