Manually created image console never appears

asked 2017-02-17 16:58:18 -0500

kvasko gravatar image

I used this example: ( I downloaded the minimal install, left everything default. I followed the guide and left all items default (to validate). Image was created successfully, uploaded it to my openstack cluster. The image booted, bootstrapped all the settings correctly. However, the console login never worked. Information was being displayed such as the success of cloud-init, but the login prompt never launched.

I was able to successfully assign a floating IP to the image and login over ssh with my ssh key. Everything else seemed to work with the machine except for the console login.

Any suggestions on getting it to work?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2017-02-17 21:41:15 -0500

updated 2017-02-17 21:41:47 -0500

Hey kvasko,

By default the console is not visible; at least in my experience and I resolve by doing the following:

cat << EOF > /etc/init/ttyS0.conf
# ttyS0 - getty
# This service maintains a getty on ttyS0 from the point the system is
# started until it is shut down again.

start on stopped rc RUNLEVEL=[12345]
stop on runlevel [!12345]

exec /sbin/getty -L 115200 ttyS0 vt102

Then update your grub configuration - /etc/default/grub

GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8"

# Uncomment to disable graphical terminal (grub-pc only)
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"

Update your grub configuration by running the following:


Then reboot your server. Hope this helps.

edit flag offensive delete link more


Thanks for the input but I did the following but it just sits at "Booting from Hard Disk....". I can restart the machine before I make the modifications and it works fine. As soon as I update grub it has a fit and won't boot.

kvasko gravatar imagekvasko ( 2017-02-20 12:43:10 -0500 )edit

So something was messed with your script that causes it to not boot or something (not sure what). I booted up an original Ubuntu Cloud Image grabbed the configuration settings from there and put it in my image and it worked. I gave you answer because it is the correct answer. Thanks!

kvasko gravatar imagekvasko ( 2017-02-20 13:08:19 -0500 )edit

answered 2017-02-20 13:11:22 -0500

kvasko gravatar image

This was my configuration of my image that worked.

vi /etc/init/ttyS0.conf

# ttyS0 - getty
# This service maintains a getty on ttyS0 from the point the system is
# started until it is shut down again.

start on stopped rc RUNLEVEL=[2345] and (
            not-container or
            container CONTAINER=lxc or
            container CONTAINER=lxc-libvirt)

stop on runlevel [!2345]

pre-start script
    # getty will not be started if the serial console is not present
    stty -F /dev/ttyS0 -a 2> /dev/null > /dev/null || { stop ; exit 0; }
end script

    exec /sbin/getty -L ttyS0 115200 vt102
end script
# CLOUD_IMG: This file was created/modified by the Cloud Image build process

vi /etc/default/grub

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=ttyS0"


edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2017-02-17 16:58:18 -0500

Seen: 253 times

Last updated: Feb 20 '17