Skip to content
Snippets Groups Projects
Commit 3b66298e authored by livio's avatar livio Committed by Libreboot project
Browse files

Reduced non-existent media errors at boot by using "test" function, added...

Reduced non-existent media errors at boot by using "test" function, added crypto medias to scan and cryptomount -a on media list
parent ff5a7425
No related branches found
No related tags found
No related merge requests found
......@@ -102,9 +102,8 @@ function list_lmedia {
# Create menuitems that boot any valid previously detected media
function make_boot_menus {
for i in ${tgt_medias}; do
if [ ! -d ${i}/ ]; then # Root is invalid: maybe unsupported FS or encrypted one
cryptomount ${i}
else
test -e ${i}
if [ $? == 0 ]; then # Media exists so we search there
grub_create_menu ${i} # Look for grub entries in known directories
fi
echo -n "."
......@@ -114,7 +113,7 @@ function make_boot_menus {
# Scan every physical media to make boot menus
function scan_p_media_menus {
for i in ata ahci usb fd; do
for i in ata ahci usb crypto fd; do
echo -n "Scanning ${i}"
list_pmedia ${i}
make_boot_menus
......@@ -132,6 +131,7 @@ function scan_l_media_menus {
menuentry "List all bootable medias" {
mediadetect
cryptomount -a
scan_p_media_menus
scan_l_media_menus
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment