|
| 1 | +# |
| 2 | +# A generic config based on the automatically generated version by |
| 3 | +# grub-mkconfig using its templates which was then customised to |
| 4 | +# replace the use of UUIDs with a static "set root" statement, |
| 5 | +# removing the submenu and renaming the menu items. There is no magic |
| 6 | +# here and it is safe to regen with grub-mkconfig again if desired. |
| 7 | +# |
| 8 | + |
| 9 | +### BEGIN /etc/grub.d/00_header ### |
| 10 | +if [ -s $prefix/grubenv ]; then |
| 11 | + load_env |
| 12 | +fi |
| 13 | +if [ "${next_entry}" ] ; then |
| 14 | + set default="${next_entry}" |
| 15 | + set next_entry= |
| 16 | + save_env next_entry |
| 17 | + set boot_once=true |
| 18 | +else |
| 19 | + set default="0" |
| 20 | +fi |
| 21 | + |
| 22 | +if [ x"${feature_menuentry_id}" = xy ]; then |
| 23 | + menuentry_id_option="--id" |
| 24 | +else |
| 25 | + menuentry_id_option="" |
| 26 | +fi |
| 27 | + |
| 28 | +export menuentry_id_option |
| 29 | + |
| 30 | +if [ "${prev_saved_entry}" ]; then |
| 31 | + set saved_entry="${prev_saved_entry}" |
| 32 | + save_env saved_entry |
| 33 | + set prev_saved_entry= |
| 34 | + save_env prev_saved_entry |
| 35 | + set boot_once=true |
| 36 | +fi |
| 37 | + |
| 38 | +function savedefault { |
| 39 | + if [ -z "${boot_once}" ]; then |
| 40 | + saved_entry="${chosen}" |
| 41 | + save_env saved_entry |
| 42 | + fi |
| 43 | +} |
| 44 | + |
| 45 | +function load_video { |
| 46 | + if [ x$feature_all_video_module = xy ]; then |
| 47 | + insmod all_video |
| 48 | + else |
| 49 | + insmod efi_gop |
| 50 | + insmod efi_uga |
| 51 | + insmod ieee1275_fb |
| 52 | + insmod vbe |
| 53 | + insmod vga |
| 54 | + insmod video_bochs |
| 55 | + insmod video_cirrus |
| 56 | + fi |
| 57 | +} |
| 58 | + |
| 59 | +if loadfont unicode ; then |
| 60 | + set gfxmode=auto |
| 61 | + load_video |
| 62 | + insmod gfxterm |
| 63 | +fi |
| 64 | +terminal_output gfxterm |
| 65 | +if [ x$feature_timeout_style = xy ] ; then |
| 66 | + set timeout_style=menu |
| 67 | + set timeout=5 |
| 68 | +# Fallback normal timeout code in case the timeout_style feature is |
| 69 | +# unavailable. |
| 70 | +else |
| 71 | + set timeout=5 |
| 72 | +fi |
| 73 | +### END /etc/grub.d/00_header ### |
| 74 | + |
| 75 | +menuentry 'Viewpoint Linux' --class gnu-linux --class gnu --class os $menuentry_id_option 'viewpoint' { |
| 76 | + load_video |
| 77 | + set gfxpayload=keep |
| 78 | + insmod gzio |
| 79 | + insmod part_msdos |
| 80 | + insmod ext2 |
| 81 | + set root='hd0,msdos1' |
| 82 | + echo 'Loading Linux 5.10.36 ...' |
| 83 | + linux /boot/vmlinuz-5.10.36 root=/dev/sda1 ro |
| 84 | +} |
| 85 | +menuentry 'Viewpoint Linux (single user mode)' --class gnu-linux --class gnu --class os $menuentry_id_option 'viewpoint-single' { |
| 86 | + load_video |
| 87 | + set gfxpayload=keep |
| 88 | + insmod gzio |
| 89 | + insmod part_msdos |
| 90 | + insmod ext2 |
| 91 | + set root='hd0,msdos1' |
| 92 | + echo 'Loading Linux 5.10.36 ...' |
| 93 | + linux /boot/vmlinuz-5.10.36 root=/dev/sda1 ro single |
| 94 | +} |
| 95 | + |
| 96 | +### BEGIN /etc/grub.d/41_custom ### |
| 97 | +if [ -f ${config_directory}/custom.cfg ]; then |
| 98 | + source ${config_directory}/custom.cfg |
| 99 | +elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then |
| 100 | + source $prefix/custom.cfg; |
| 101 | +fi |
| 102 | +### END /etc/grub.d/41_custom ### |
0 commit comments