Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS EC2 RHEL 7.1 console output doesn't show cloud-init's output

It seems that the instances started from RHEL 7.1 AMIs does not write the SSH fingerprint into the system log (exactly nothing from cloud-init's output), therefore I can't use the 'Get System Log' menu on AWS UI or the command line tool to figure out the ssh fingerprint of the launched server. On Centos 7 it works by default. Can it be an issue with the cloud-init config or is it something else? Cloud-init runs successfully, the logs are present in /var/log after SSH-ing.

like image 868
Márton Sereg Avatar asked Sep 05 '25 03:09

Márton Sereg


1 Answers

It turned out that the RHEL7 image has the following line in the grub2 config in /etc/default/grub:

GRUB_CMDLINE_LINUX=crashkernel=auto console=ttyS0,115200n8 console=tty0

changing the order of the 2 console entries will change the serial output to ttyS0 and the cloud init output will show up in the console output on the AWS UI after the grub2 config is created:

GRUB_CMDLINE_LINUX=crashkernel=auto console=tty0 console=ttyS0,115200n8 grub2-mkconfig -o /boot/grub2/grub.cfg

(To make it available on the first boot, a new image has to be created with the changes)

like image 168
Márton Sereg Avatar answered Sep 10 '25 01:09

Márton Sereg