How to do autologin on systemd (yocto)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to do autologin on systemd (yocto)

5,642 次查看
xinyu_chen
NXP Employee
NXP Employee

Hi,

I try to modify the systemd getty service: /etc/systemd/system/getty.target.wants/getty@tty1.service, by changing the:

ExecStart=-/sbin/agetty --noclear %I $TERM

to

ExecStart=-/sbin/agetty -a root --noclear %I $TERM

But it does not work correctly. Anybody has the experience?

Thanks.

1 回复

3,977 次查看
xinyu_chen
NXP Employee
NXP Employee

Ok, done by myself.

cp /lib/systemd/system/serial-getty@.service /etc/systemd/system/getty.target.wants/serial-getty@<console>.service

<console> aligned with the kernel commandline.

And append the "-a root" for auto login:

ExecStart=-/sbin/agetty -8 -a root -L %I 115200 $TERM