I was curious what might be the problem here and so I undertook my own experiments. As usual I used QEMU to emulate a system that was restricted to only communicate via a serial interface (using the 'Ctrl-Alt-3' key combination to change over that serial terminal).
As a first step I wanted to be sure that only one terminal is used in this exercise. I therefore changed all occurrences of 'tty1' in '/etc/inittab' to 'ttyS0' and ensured that this terminal was enabled in '/etc/securetty'. So all remastering steps together were:
# extract the initrd
sudo rm -rf extr
mkdir extr
( cd extr ; zcat ../microcore.gz | sudo cpio -idm )
# enable 'ttyS0' in '/etc/securetty'
sudo sed -i '/^# ttyS0$/s#^..##' extr/etc/securetty
# change '/etc/inittab' to use 'ttyS0'
sudo sed -i '/^tty1:/s#tty1#ttyS0#g' extr/etc/inittab
# create a new initrd
( cd extr ; find | sudo cpio -odm -H newc ) | gzip -c > mc_ttyS0.gz
This assuming of course that 'minicore.gz' had already been downloaded to the current directory, as well as the kernel file that would be needed to test the result via:
qemu -m 32 -kernel bzImage -initrd mc_ttyS0.gz -append "console=ttyS0"
where the required boot code to redirect all "action" to the serial interface gets specified through the 'append' option.
This test already showed much of the hoped for outcome: The kernel boot messages appeared in the serial terminal (i.e. "phase 1"), the MC boot process got under way and produced more output (i.e. "phase 2") and finally a login prompt showed up in the serial terminal and allowed the user 'tc' to run an interactive shell (i.e. "phase 3").
So far so good, but what was not working was the automated login (as expected due to the 'rungetty ttyS0 --autologin root' part of the changed '/etc/inittab'.
To understand this issue better the source code of
rungetty had to be checked. As it turns out by default it is hard coded to limit the 'autologin' to '/dev/tty1'. But it is pretty simple to overcome this, as the following comment explains:
/* AUTO_TTY is the tty on which autologins will be accepted. If set
to an empty string, autologins will be accepted on any tty. */
So after downloading the sources (and installation of 'compiletc.tcz') a new version of '/sbin/rungetty' was created by:
# create a slightly different version of '/sbin/rungetty'
rm -rf rungetty-1.2
tar xf rungetty-1.2.tar.gz
sed -i '/AUTO_TTY/s#tty1##' rungetty-1.2/rungetty.c
( cd rungetty-1.2 ; make )
sudo cp rungetty-1.2/rungetty extr/sbin
sudo chmod 755 extr/sbin/rungetty
followed by another creation of the initrd.
The next test with QEMU lead to a successful autologin of 'root', which itself created the login shell for user 'tc'.
Obviously my test did not involve "real hardware", but I'm pretty optimistic that it should work there as well.
EDIT: As alternative to recompiling '/sbin/rungetty' I've just posted a
different option. This might be seen as an "easier" way to achieve the goal.