1

I'm trying to enable serial-getty@ttyS0.service to output getty to serial console as well as tty0.

I have tried running systemctl enable serial-getty@ttyS0 but I suspect that systemd might not be running when late_command is running.

Then I tried making the symlink manually with ln -s /lib/systemd/system/serial-getty@.service /etc/systemd/system/getty.target.wants/serial-getty@ttyS0.service and after the install getty.target.wants only contains getty@tty1.service.

I can't use console=tty0 console=ttyS0,115200n8 kernel parameter because then messages from the init system and the system logger will only appear on the first serial port and I want them to appear on tty0.

I'm using in-target with late_command.

example:

d-i preseed/late_command string in-target ln -s /lib/systemd/system/serial-getty@.service /etc/systemd/system/getty.target.wants/serial-getty@ttyS0.se‌​rvice

Does anyone have any experience or any idea on how to enable services in preseed config?

Thanks.

granra
  • 123

0 Answers0