From 2fb1b91dec8aca876f07b7b8ed540fc3772d4682 Mon Sep 17 00:00:00 2001 From: Om Kumar Date: Thu, 3 Apr 2014 12:25:14 +0530 Subject: [PATCH] Disable splashimage for legacy grub. There is a known issue in legacy grub. When using splashimage with serial console, Legacy grub wont start properly. This commit is to ensure that when serial console is used, legacy grub should not contain splashimage. It also adds serial support to legacy grub configuration file. Change-Id: I2007916998dfe7c66ef51bf8c57c1698dc0fcb75 --- elements/serial-console/cleanup.d/99-fix-grub | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 elements/serial-console/cleanup.d/99-fix-grub diff --git a/elements/serial-console/cleanup.d/99-fix-grub b/elements/serial-console/cleanup.d/99-fix-grub new file mode 100644 index 00000000..478febb9 --- /dev/null +++ b/elements/serial-console/cleanup.d/99-fix-grub @@ -0,0 +1,10 @@ +set -euxo + +BOOTDIR=$TARGET_ROOT/boot + +# Splashimage in grub has a known issue with serial console +# So grub config file needs to be fixed. +if [ -f $BOOTDIR/grub/grub.conf ] ; then + sed -i -e "/^splashimage/d;s/ rhgb\( \|$\)/\1/g;s/ quiet\( \|$\)/\1/g;/^serial/d;/^terminal/d;/^hiddenmenu/d" $BOOTDIR/grub/grub.conf + sed -i "/^default/aserial --unit=0 --speed=9600 --word=8 --parity=no --stop=1\nterminal --timeout=5 serial console" $BOOTDIR/grub/grub.conf +fi