Enable serial-getty with root autologin on every given device
authorDarshaka Pathirana <dpat@syn-net.org>
Fri, 14 Dec 2018 12:34:29 +0000 (13:34 +0100)
committerDarshaka Pathirana <dpat@syn-net.org>
Fri, 14 Dec 2018 12:34:29 +0000 (13:34 +0100)
With the kernel command line paramter / bootoption
`console=device,options`[1](https://www.kernel.org/doc/html/latest/admin-guide/serial-console.html)
it is possible to use a serial port as console.

So far we only enabled root autologin for the serial port ttyS0, but it
should be enabled on every given device as we do not have any password
set for any user, which meant that no login was possible at all (on a
serial port other than ttyS0).

The serial port ttyS1 can be tested with QEMU/KVM like this::

  kvm -m 512 -serial pty -serial pty -cdrom grml.iso

This adds two serial ports (ttyS0 and ttyS1) to the VM and redirect its
output to /dev/pts/*. On the Grml boot prompt then add "console=ttyS1"
to redirect the output to second serial console.

Thanks: @MichaelEischer for the bug report
Closes: grml/grml#104

etc/grml/fai/config/files/etc/systemd/system/serial-getty@.service.d/override.conf/GRMLBASE [moved from etc/grml/fai/config/files/etc/systemd/system/serial-getty@ttyS0.service.d/override.conf/GRMLBASE with 100% similarity]