no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


Last revision
en:general_information:autologin_systemd [2018/09/14 12:01] – created liedmann
Line 1: Line 1:
 +===== Autologin with systemd =====
 +
 +<WRAP round info>
 +Tested with:
 +  * TQMa6x BSP REV.0109
 +  * TQMa7x BSP REV.0101
 +</WRAP>
 + 
 +==== Copy serial getty service ====
 +
 +Copy **/lib/systemd/system/serial-getty@.service** to **/etc/systemd/system**
 +
 +<code>
 +cp /lib/systemd/system/serial-getty@.service /etc/systemd/system
 +</code>
 +
 +
 +==== Rename systemd service ====
 +
 +
 +Navigate to **/etc/systemd/system/**
 +
 +<code>
 +cd /etc/systemd/system/
 +</code>
 +
 +Rename **serial-getty@.service** 
 +
 +<code>
 +mv serial-getty@.service serial-getty@<console_device>.service
 +</code>
 +++++ example |
 +<code>
 +mv serial-getty@.service serial-getty@ttymxc1.service
 +</code>
 +++++
 +
 +==== Edit systemd service ====
 +
 +
 +Edit **serial-getty@ttymxc1.service** with e.g. nano editor
 +
 +<code>
 +nano serial-getty@ttymxc1.service
 +</code>
 +
 +Modify the line that begins with **ExecStart** as follows 
 +
 +<code>
 +ExecStart=-/sbin/agetty -a <username> <console_device> <buadrate> %I $TERM
 +</code>
 +
 +
 +++++ example |
 +<code>
 +ExecStart=-/sbin/agetty -a root ttymxc1 115200 %I $TERM
 +</code>
 +++++
 +
 +==== Enable the systemd service ====
 +
 +<code>
 +systemctl enable serial-getty@<console_device>.service
 +</code>
 +
 +++++ example |
 +<code>
 +systemctl enable serial-getty@ttymxc1.service
 +</code>
 +++++
  
  • Last modified: 2022/08/04 15:02