Enable Serial Console 27/1027/2
authorC.J. Collier <cjcollier@linuxfoundation.org>
Fri, 6 May 2016 23:02:20 +0000 (16:02 -0700)
committerC.J. Collier <cjcollier@linuxfoundation.org>
Thu, 12 May 2016 20:08:03 +0000 (20:08 +0000)
This patch will allow access to the bootloader and kernel boot
messages for debugging and maintenance

* add function deb_enable_serial_console to bootstrap-functions.sh
* call deb_enable_serial_console from bootstrap.sh

Change-Id: Ia79881a91ab4d10b1f5ed6deb3a43a7a4d037fa5
Signed-off-by: C.J. Collier <cjcollier@linuxfoundation.org>
vagrant/basebuild/bootstrap.sh
vagrant/lib/bootstrap-functions.sh

index 016be61..b3f5426 100644 (file)
@@ -20,6 +20,7 @@ then
     echo "---> Debian type system detected"
     export DEBIAN_FRONTEND=noninteractive
 
+    deb_enable_serial_console
     deb_aptconf_batchconf
     deb_sync_minor
     deb_correct_shell
index 80e2f21..652160e 100644 (file)
@@ -1,5 +1,15 @@
 #!/bin/bash
 
+deb_enable_serial_console() {
+# enable grub and login on serial console
+
+    echo <<EOF>> /etc/default/grub
+GRUB_TERMINAL=serial
+GRUB_SERIAL_COMMAND="serial --speed=38400 --unit=0 --word=8 --parity=no --stop=1"
+EOF
+    update-grub
+}
+
 deb_probe_modules() {
     for mod in "$@"
     do