grub.cfg: clean up messages, be less verbose

fsdg20230625
Leah Rowe 2021-12-29 06:23:57 +00:00
parent 86d4ca9b50
commit 9b1499fd1e
1 changed files with 5 additions and 12 deletions

View File

@ -42,18 +42,15 @@ function try_user_config {
done
}
function search_grub {
echo -n "Attempting to load grub.cfg from: "
echo -n "Attempting to load grub.cfg from '${1}' devices"
for i in 0 1 2 3 4 5 6 7 8 9 10 11; do
echo "\nTrying disk ${1}${i}"
for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
echo "\nTrying partiton ${part}"
try_user_config "(${1}${i},${part})"
done
# raw devices e.g. (ahci0) instead of (ahci0,1)
echo "\nTrying to boot to a raw disk ..."
try_user_config "(${1}${i})"
echo # Insert newline
done
echo # Insert newline
}
function try_isolinux_config {
@ -67,18 +64,15 @@ function try_isolinux_config {
done
}
function search_isolinux {
echo "\nAttempting to parse isolinux/syslinux config from '${1}' devices"
for i in 0 1 2 3 4 5 6 7 8 9 10 11; do
echo "\nAttempting to parse isolinux menu from ${1}${i}"
for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
echo "\nTrying partiton ${part}"
try_isolinux_config "(${1}${i},${part})"
done
# raw devices e.g. (usb0) instead of (usb0,1)
echo "\nTrying raw usb device ..."
try_isolinux_config "(${1}${i})"
echo # Insert newline
done
echo # Insert newline
}
menuentry 'Load Operating System (incl. fully encrypted disks) [o]' --hotkey='o' {
search_grub ahci
@ -109,9 +103,8 @@ menuentry 'Load Operating System (incl. fully encrypted disks) [o]' --hotkey='o
done
set pager=0
echo -n "Attempting to cryptomount: "
echo -n "Attempting to unlock encrypted volumes"
for dev in ${ahcidev} ${atadev} ${lvmvol} ${raidvol}; do
echo -n "${dev} "
if cryptomount "${dev}" ; then break ; fi
done
set pager=1