I’m playing with ROS installed to Qemu VMs. Once ROS is installed to disk I am welcomed with nice ASCII art, but no hint what IP addresses were configured. IPs are assigned from DHCP pool hence it’s hard to figure out on which IP new machine is sitting.
Is there something in cloud-init that would auto-login me after reboot?
I added the following to my cloud-config, which though is a workaround, but does solve my problem:
runcmd:
- "ip addr show | grep inet >> /etc/issue"
Still would be nice to know how to enable auto-login after reboot on bare metal installations.
EDIT:
It caused me more trouble as ros config is incapable to parse this line, therefore the rest of the config was not included:
# ros config export
ERRO[0000] Failed to parse config file /var/lib/rancher/conf/cloud-config.d/user_config.yml: Cannot resolve ip addr show | grep inet >> /etc/issue into <[]string Value> at line 5, column 2
{}
It’s weird because, this line is actually run on boot and /etc/issue is properly updated…
After all there’s undocumented (?) method to auto-login rancher user after installation:
# ros install -d /dev/sda -a rancher.autologin=tty1
Is there a convenient way (without reinstalling) to control what parameters are passed to kernel on boot? Perhaps something in cloud-config? What would you advise if I’ve decided to disable auto-login eventually?
Say i make changes to the /etc/issue filedto display the ip address using ethos: \4{eth0} and i reboot the changes are not persisted. Is there a way to make the changes to /etc/issue file permanent?