|
1 | 1 | set default=0 |
2 | 2 | set timeout=20 |
3 | 3 |
|
| 4 | +function load_video { |
| 5 | + insmod efi_gop |
| 6 | + insmod efi_uga |
| 7 | + insmod vbe |
| 8 | + insmod vga |
| 9 | + insmod video_bochs |
| 10 | + insmod video_cirrus |
| 11 | +} |
| 12 | + |
| 13 | +# Try graphics on both EFI and BIOS, but with simpler settings for BIOS |
4 | 14 | if loadfont /boot/grub/unicode.pf2 ; then |
5 | 15 | insmod png |
6 | | - set gfxmode=auto |
| 16 | + load_video |
7 | 17 | insmod gfxterm |
| 18 | + |
| 19 | + if [ "${grub_platform}" = "efi" ] ; then |
| 20 | + # EFI: use auto mode for best resolution |
| 21 | + set gfxmode=auto |
| 22 | + else |
| 23 | + # BIOS: use specific lower resolution for better VBE compatibility |
| 24 | + # Try 640x480, fallback to 800x600, then text mode |
| 25 | + set gfxmode=640x480,800x600,1024x768,auto |
| 26 | + set gfxpayload=keep |
| 27 | + fi |
| 28 | + |
8 | 29 | terminal_output gfxterm |
9 | 30 | fi |
10 | 31 |
|
11 | | -if [ "${grml_secureboot}" = "true" ] ; then |
12 | | - if [ -f /boot/grub/grml-theme/sb-theme.txt ] ; then |
13 | | - set theme=/boot/grub/grml-theme/sb-theme.txt |
| 32 | +if [ "${grub_platform}" == "efi" ] ; then |
| 33 | + if [ "${grml_secureboot}" = "true" ] ; then |
| 34 | + if [ -f /boot/grub/grml-theme/sb-theme.txt ] ; then |
| 35 | + set theme=/boot/grub/grml-theme/sb-theme.txt |
| 36 | + export theme |
| 37 | + else |
| 38 | + set menu_color_normal=white/black |
| 39 | + set menu_color_highlight=black/orange |
| 40 | + export menu_color_normal |
| 41 | + export menu_color_highlight |
| 42 | + fi |
| 43 | + elif [ -f /boot/grub/grml-theme/theme.txt ] ; then |
| 44 | + set theme=/boot/grub/grml-theme/theme.txt |
14 | 45 | export theme |
15 | 46 | else |
16 | 47 | set menu_color_normal=white/black |
17 | | - set menu_color_highlight=black/orange |
| 48 | + set menu_color_highlight=black/yellow |
18 | 49 | export menu_color_normal |
19 | 50 | export menu_color_highlight |
20 | 51 | fi |
21 | | -elif [ -f /boot/grub/grml-theme/theme.txt ] ; then |
22 | | - set theme=/boot/grub/grml-theme/theme.txt |
23 | | - export theme |
24 | 52 | else |
25 | | - set menu_color_normal=white/black |
26 | | - set menu_color_highlight=black/yellow |
27 | | - export menu_color_normal |
28 | | - export menu_color_highlight |
| 53 | + set default=2 |
| 54 | + menuentry "LEGACY BOOT" { |
| 55 | + true |
| 56 | + } |
| 57 | + menuentry "" { |
| 58 | + true |
| 59 | + } |
| 60 | + |
| 61 | + if [ -f /boot/grub/grml-theme/bios-theme.txt ] ; then |
| 62 | + set theme=/boot/grub/grml-theme/bios-theme.txt |
| 63 | + export theme |
| 64 | + else |
| 65 | + set menu_color_normal=white/black |
| 66 | + set menu_color_highlight=black/yellow |
| 67 | + export menu_color_normal |
| 68 | + export menu_color_highlight |
| 69 | + fi |
29 | 70 | fi |
30 | 71 |
|
31 | 72 | if [ ${iso_path} ] ; then |
|
0 commit comments