How to disable serial console during bootup

4.3k views Asked by At

I have stopped ttyS0 (initctl stop serial DEV=ttyS0). The ttyS0 process stops for the session but reappears post to reboot, I want to disable ttyS0 at boot as it throws errors like:

Feb 19 20:19:42 sdm2 init: serial (ttyS0) main process (608881) terminated with status 1
Feb 19 20:19:42 sdm2 init: serial (ttyS0) main process ended, respawning
Feb 19 20:19:42 sdm2 init: initLogger main process (608986) terminated with status 1

I couldnt find any /etc/init/ttyS0.conf but serial.conf exists.

I searched for 'respawn' in an attempt to turn it OFF, but I found 'respawn' in serial.conf.

instance $DEV
respawn
pre-start exec /sbin/securetty $DEV 
./init/serial.conf-33-exec /sbin/agetty /dev/$DEV $SPEED vt100-nav

Though /etc/ttyS0.conf doesnt exists,but I used 'echo manual | sudo tee /etc/init/ttyS0.override' to stop the ttyS0 at boot time.

-Also I removed ttyS0 from securetty.

-There is no mention of ttyS0 in inittab file.

-In grub.conf I have two console entries tty0 and console=ttyS0,115200 as well.

-/dev/ttyS0 exists but /etc/init/ttyS0.conf does nt.

Could anyone assist in stopping ttyS0 after reboot.

0

There are 0 answers