grub.cfg: scan luks *inside lvm*
the user might have boot their kernel inside luks inside lvm for some dumb reason it's theoretically possible that the user would be so silly indeed Signed-off-by: Leah Rowe <leah@libreboot.org>master
parent
5a3b0dab96
commit
66d084e7f7
|
@ -178,15 +178,29 @@ menuentry 'Load Operating System (incl. fully encrypted disks) [o]' --hotkey='o
|
|||
|
||||
search_bootcfg crypto
|
||||
|
||||
lvmvol=""
|
||||
|
||||
# after cryptomount, lvm volumes might be available
|
||||
# using * is slow on some machines, but we use it here,
|
||||
# just once. in so doing, we find every lvm volume
|
||||
for vol in (*); do
|
||||
if regexp ^lvm/ $vol; then
|
||||
lvmvol="${lvmvol} ${vol}"
|
||||
try_bootcfg "${vol}"
|
||||
fi
|
||||
done
|
||||
|
||||
# user might have put luks inside lvm
|
||||
set pager=0
|
||||
echo "Attempting to unlock encrypted LVMs"
|
||||
for vol in ${lvmvol}; do
|
||||
cryptomount "$vol"
|
||||
done
|
||||
set pager=1
|
||||
echo
|
||||
|
||||
search_bootcfg crypto
|
||||
|
||||
true # Prevent pager requiring to accept each line instead of whole screen
|
||||
}
|
||||
|
||||
|
|
|
@ -190,15 +190,29 @@ menuentry 'Load Operating System (incl. fully encrypted disks) [o]' --hotkey='o
|
|||
|
||||
search_bootcfg crypto
|
||||
|
||||
lvmvol=""
|
||||
|
||||
# after cryptomount, lvm volumes might be available
|
||||
# using * is slow on some machines, but we use it here,
|
||||
# just once. in so doing, we find every lvm volume
|
||||
for vol in (*); do
|
||||
if regexp ^lvm/ $vol; then
|
||||
lvmvol="${lvmvol} ${vol}"
|
||||
try_bootcfg "${vol}"
|
||||
fi
|
||||
done
|
||||
|
||||
# user might have put luks inside lvm
|
||||
set pager=0
|
||||
echo "Attempting to unlock encrypted LVMs"
|
||||
for vol in ${lvmvol}; do
|
||||
cryptomount "$vol"
|
||||
done
|
||||
set pager=1
|
||||
echo
|
||||
|
||||
search_bootcfg crypto
|
||||
|
||||
true # Prevent pager requiring to accept each line instead of whole screen
|
||||
}
|
||||
|
||||
|
|
|
@ -191,15 +191,29 @@ menuentry 'Load Operating System (incl. fully encrypted disks) [o]' --hotkey='o
|
|||
|
||||
search_bootcfg crypto
|
||||
|
||||
lvmvol=""
|
||||
|
||||
# after cryptomount, lvm volumes might be available
|
||||
# using * is slow on some machines, but we use it here,
|
||||
# just once. in so doing, we find every lvm volume
|
||||
for vol in (*); do
|
||||
if regexp ^lvm/ $vol; then
|
||||
lvmvol="${lvmvol} ${vol}"
|
||||
try_bootcfg "${vol}"
|
||||
fi
|
||||
done
|
||||
|
||||
# user might have put luks inside lvm
|
||||
set pager=0
|
||||
echo "Attempting to unlock encrypted LVMs"
|
||||
for vol in ${lvmvol}; do
|
||||
cryptomount "$vol"
|
||||
done
|
||||
set pager=1
|
||||
echo
|
||||
|
||||
search_bootcfg crypto
|
||||
|
||||
true # Prevent pager requiring to accept each line instead of whole screen
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue