blob: fcf57736960f775ea1ae38b1d2f14ab7971923b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
{{if debug}}set debug="all"{{endif}}
set default="0"
set timeout=0
menuentry 'Local' {
echo 'Booting local disk...'
# The bootloader paths list for secure boot is shortened because of LP:2022084
for bootloader in \
boot/bootx64.efi \
ubuntu/shimx64.efi \
ubuntu/grubx64.efi \
Microsoft/Boot/bootmgfw.efi; do
search --set=root --file /efi/$bootloader
if [ $? -eq 0 ]; then
chainloader /efi/$bootloader
boot
fi
done
if [ "${shim_lock}" != "y" ]; then
echo 'Secure boot is disabled, trying chainloader...'
for bootloader in \
centos/shimx64.efi \
centos/grubx64.efi \
redhat/shimx64.efi \
redhat/grubx64.efi \
rhel/shimx64.efi \
rhel/grubx64.efi \
suse/shim.efi \
suse/grubx64.efi \
ol/shim.efi \
ol/grubx64.efi \
red/grubx64.efi; do
search --set=root --file /efi/$bootloader
if [ $? -eq 0 ]; then
chainloader /efi/$bootloader
boot
fi
done
fi
# If no bootloader is found exit and allow the next device to boot.
exit 1
}
|