Skip to content

Commit

Permalink
Enable GRUB serial console
Browse files Browse the repository at this point in the history
  • Loading branch information
ttg-public committed Jan 1, 1970
1 parent 7d98814 commit 72360ef
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions config/_common/grub-template.conf
@@ -1,24 +1,31 @@
# GRUB 2 config file
terminal_output console
if serial --unit=0 --speed=115200; then
terminal_input --append serial_com0
terminal_output --append serial_com0
fi

set default="0"
set timeout="5"
set timeout_style="menu"

if [ -s $prefix/grubenv ]; then
load_env
load_env --file $prefix/grubenv --skip-sig
set has_env="1"
if [ -n "${saved_entry}" ]; then
set default="${saved_entry}"
fi
else
set has_env="0"
echo "WARN: failed to load env. Default choice will NOT be saved!"
fi
set default="${saved_entry}"


function savedefault {
saved_entry="${chosen}"
save_env saved_entry
save_env --file $prefix/grubenv saved_entry
}

if serial --port=0x3F8 --speed=115200;then
set has_serial=true
terminal_input --append serial
terminal_output --append serial
else
clear
fi

insmod usb_keyboard
insmod part_msdos
Expand All @@ -30,7 +37,5 @@ insmod gzio
set gfxmode=auto
insmod vbe
insmod vga
insmod gfxterm
terminal_output console

@@@MENU_ENTRIES@@@

0 comments on commit 72360ef

Please sign in to comment.