grub.cfg patch from shmalebx9: reverse search order for encrypted partitions
Also, when a cryptomount is successful, break from the loop and boot from that. In most cases, this will work just fine, and this change improves the boot speed in the vast majority of cases. From <https://notabug.org/libreboot/lbmk/issues/53> This is based on commit 5767489cadc4a9a1f2e7bffe03457e29e1c9a101 from https://github.com/shmalebx9/Bleeding-Libreboot/
This commit is contained in:
parent
777316eb4f
commit
f195282d90
|
@ -113,17 +113,22 @@ menuentry 'Load Operating System (incl. fully encrypted disks) [o]' --hotkey='o
|
||||||
# Encrypted disks and partitions
|
# Encrypted disks and partitions
|
||||||
#TODO: This needs to be adjusted on each device to exclude ODD
|
#TODO: This needs to be adjusted on each device to exclude ODD
|
||||||
#TODO: Usually ATA is for odd if both exist!
|
#TODO: Usually ATA is for odd if both exist!
|
||||||
#TODO: Shouldn't it stop at first successful cryptomount?
|
|
||||||
#TODO: Unset variables before use!
|
#TODO: Unset variables before use!
|
||||||
#TODO: Pick better variable name scheme than ${ddev}, or find way to make it local
|
#TODO: Pick better variable name scheme than ${ddev}, or find way to make it local
|
||||||
unset ahcidev
|
unset ahcidev
|
||||||
unset atadev
|
unset atadev
|
||||||
unset usbdev
|
unset usbdev
|
||||||
if [ (ahci?) != "(ahci?)" ]; then
|
if [ (ahci?) != "(ahci?)" ]; then
|
||||||
ahcidev=(ahci*)
|
ahcilist=(ahci*)
|
||||||
|
for part in ${ahcilist}; do
|
||||||
|
ahcidev="$part $ahcidev"
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
if [ (ata?) != "(ata?)" ]; then
|
if [ (ata?) != "(ata?)" ]; then
|
||||||
atadev=(ata*)
|
atalist=(ata*)
|
||||||
|
for part in ${atalist}; do
|
||||||
|
atadev="$part $atadev"
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
if [ (usb?) != "(usb?)" ]; then
|
if [ (usb?) != "(usb?)" ]; then
|
||||||
usbdev=(usb*)
|
usbdev=(usb*)
|
||||||
|
@ -132,7 +137,7 @@ menuentry 'Load Operating System (incl. fully encrypted disks) [o]' --hotkey='o
|
||||||
echo -n "Attempting to cryptomount: "
|
echo -n "Attempting to cryptomount: "
|
||||||
for dev in ${usbdev} ${ahcidev} ${atadev} ${lvmvol}; do # what about raid?
|
for dev in ${usbdev} ${ahcidev} ${atadev} ${lvmvol}; do # what about raid?
|
||||||
echo -n "${dev} "
|
echo -n "${dev} "
|
||||||
cryptomount "${dev}"
|
if cryptomount "${dev}" ; then break ; fi
|
||||||
done
|
done
|
||||||
set pager=1
|
set pager=1
|
||||||
echo # Insert newline
|
echo # Insert newline
|
||||||
|
@ -179,6 +184,7 @@ menuentry 'Load Operating System (incl. fully encrypted disks) [o]' --hotkey='o
|
||||||
|
|
||||||
true # Prevent pager requiring to accept each line instead of whole screen
|
true # Prevent pager requiring to accept each line instead of whole screen
|
||||||
}
|
}
|
||||||
|
|
||||||
menuentry 'Search ISOLINUX menu (AHCI) [a]' --hotkey='a' {
|
menuentry 'Search ISOLINUX menu (AHCI) [a]' --hotkey='a' {
|
||||||
search_isolinux ahci
|
search_isolinux ahci
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue