From 572b8b2b13fe136b3562b4a4a539d57ea9c39f20 Mon Sep 17 00:00:00 2001 From: Kiall Mac Innes Date: Wed, 28 May 2014 15:38:36 +0100 Subject: [PATCH] VM element: Enable serial console on Debian Debian based distros do not enable the serial console by default in grub.cfg, instead sending all boot messages to the display Change-Id: I0e80859198e77862ab0301ab27ebe11702fba09d --- elements/vm/finalise.d/51-bootloader | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/elements/vm/finalise.d/51-bootloader b/elements/vm/finalise.d/51-bootloader index 46b40171..c1a40d4a 100755 --- a/elements/vm/finalise.d/51-bootloader +++ b/elements/vm/finalise.d/51-bootloader @@ -136,9 +136,11 @@ function install_grub2 { sed -i "s%$PART_DEV%LABEL=cloudimg-rootfs%" $GRUB_CFG sed -i "s%search --no-floppy --fs-uuid --set=root .*$%search --no-floppy --set=root --label cloudimg-rootfs%" $GRUB_CFG sed -i "s%root=UUID=[A-Za-z0-9\-]*%root=LABEL=cloudimg-rootfs%" $GRUB_CFG - if [ "$DIST" = 'Fedora' ] ; then + if [ "$DIST" = 'Debian' ] || [ "$DIST" = 'Fedora' ]; then # enable serial console sed -i "s%LABEL=cloudimg-rootfs%LABEL=cloudimg-rootfs console=tty0 console=ttyS0,115200%" $GRUB_CFG + fi + if [ "$DIST" = 'Fedora' ] ; then if [ $(lsb_release -rs) = '19' ]; then sed -i "s%UUID=[A-Za-z0-9\-]*%LABEL=cloudimg-rootfs%" /etc/fstab fi