Cannot remove alternative console from /etc/inittab
I am running a diskless installation of Alpine Linux 3.18.3 on a Raspberry Pi 3 (after an upgrade from version 3.12 using the tarball https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/aarch64/alpine-rpi-3.18.3-aarch64.tar.gz). (The issue was not present on Alpine Linux version 3.12.)
The init
script (likely loaded from /media/mmcblk0p1/boot/initramfs-rpi
) seems to automatically append the lines
# enable login on alternative console
ttyS0::respawn:/sbin/getty -L 0 ttyS0 vt100
to my /etc/inittab
file, even though I removed or commented these lines before and saved the modified version of inittab via
lbu include /etc/inittab
lbu commit -d
to alpine.apkovl.tar.gz
.
This launches a console on /dev/ttyS0
on boot. I can verify that the console is running on /dev/ttyS0
and that the port cannot be read or written by the uucp group:
alpine:~$ ps aux | grep ttyS0
2162 root 0:00 /sbin/getty -L 0 ttyS0 vt100
alpine:~$ ls -lah /dev | grep ttyS0
crw--w---- 1 root root 4, 64 Sep 14 14:09 ttyS0
However, I need the /dev/ttyS0
serial port to communicate with a custom device, thus a system console may not run there.
Note that /etc/mdev.conf
configures the serial port correctly:
ttyS[0-9]* root:uucp 0660
How can I disable the system console on /dev/ttyS0
?