Re: Serial console on /dev/ttyS0
>>>>> "OT" == Olof Tångrot <olof.tangrot@omicron.se> writes:
OT> So I uncommented the following line in inittab (of the compressed
OT> squashfs file system):
OT> #T0=:23:respawn:/sbin/getty -L ttyS0 9600 vt100
OT> After boot that linte in inittab mysteriously becomes:
OT> T0:23:respawn:/bin/login -f user </dev/tty >/dev/tty 2>&1
[...]
OT> What mechanism rebuilds inittab?
It's the autologin mechanism that does. And it seems that it
assumes `tty[[:digit:]]*' as the device name, which is not the
case for a serial console.
The following kernel command line options may be of use:
--cut: /usr/share/doc/live-initramfs/parameters.txt --
live noautologin
live noxautologin
--cut: /usr/share/doc/live-initramfs/parameters.txt --
OTOH, if autologin is desired, then you may wish to look at:
$ cat < /usr/share/initramfs-tools/scripts/live-bottom/25configure_init
...
if [ -f /root/etc/inittab ]; then
sed -i -e "s|^\([^:]*:[^:]*:[^:]*\):.*getty.*\<\(tty[0-9]*\).*$|\1:/bin/login -f $USERNAME </dev/\2 >/dev/\2 2>\&1|" /root/etc/inittab
fi
...
$
There, the regular expression should obviously read
...tty[A-Z]*[0-9]\+..., not ...tty[0-9]*...
(And what's about USB to RS-232 converters, would those be
usb/ttyUSB0 or something like that, BTW?)
OT> How can I make a proper change to the compressed filesystem that
OT> works as intended?
[...]
--
FSF associate member #7257
Reply to: