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

Moved file system check out of GRUB menu function as it's necessary for any bootloader0

parent da44f929
No related branches found
No related tags found
No related merge requests found
......@@ -91,7 +91,11 @@ function list_lmedia {
# Create menuitems that boot any valid previously detected media
function make_boot_menus {
for i in ${tgt_medias}; do
grub_create_menu ${i}
if [ ! -d ${i}/ ]; then # Root is invalid: maybe unsupported FS or encrypted one
cryptomount ${i}
else
grub_create_menu ${i} # Look for grub entries in known directories
fi
echo -n "."
done
echo
......@@ -139,10 +143,6 @@ function grub_menuentry {
function grub_create_menu {
set root="${1}"
if [ ! -d / ]; then # Root is invalid: maybe unknown FS or encrypted one
cryptomount ${1}
return;
fi
for dir in ${grub_dirs}; do
# In order to save time, we do not attempt anything on non existing directory.
if [ -d /"${dir}"/ ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment