Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: evilbob on October 19, 2010, 12:17:49 PM
-
Hello I have tried searching but it has not helped me so now I have to ask.
I installed Tiny Core to a hard drive and am using the "Quiet, text, and multivt" boot codes.
I then set up my opt/.filetool.lst to include /etc/inittab
I added kill -1 1 to my opt/bootlocal.sh
In inettab I uncommented the lines for TTY2 - TTY6 and added --autologin root so it looks like this
tty2::respawn:/sbin/getty 38400 tty2 --autologin root
Also tried
tty2::respawn:/sbin/getty 38400 tty2 -u root
Also tried to change it to use rungetty
tty2::respawn:/sbin/rungetty tty2 --autologin root
no matter what I try It will not autologin it will prompt for a user and password or not work at all.
I am fairly new to linux and not experienced with Getty or Virtual terminals so please over explain if you can.
The goal is to have a TN5250 Terminal emulator load automatically and have each tty represent a different session. allowing a user to switch between sessions without having to type anything.
Thanks for reading this.
-
I've been down this road. Autologin only works for tty1 and only for the first login. I'd suggest simply running tn5250 from /etc/inittab. I use this:
tty2::respawn:/sbin/rungetty -u tc -g staff tty2 -- /usr/bin/tail -f /var/log/messages
to put syslog on virtual terminal 2.
I put this in my /opt/bootlocal.sh:
# Wait for init to finish then reload it
wait $PPID
sleep 1
kill -SIGHUP 1
-
I'm not in a position to comment on the finer points of your changes to '/etc/inittab'. The way I read it you attempted to modify '/etc/inittab' and ensure persistence via backup (i.e. include 'etc/inittab' in '/opt/.filetool.lst'). I'm pretty certain that will never achieve what you hope for:
AFAIK the restoration from backup happens too late in the boot process to replace the '/etc/inittab' file from the initrd (i.e. 'tinycore.gz') with your modified version. IIRC the restoration is done via '/etc/init.d/tc-restore.sh' which gets called almost at the very end of the execution of '/etc/init.d/tc-config'. Unfortunately the restoration takes place before you get access to the system, and when you (after the boot process is complete) look at the file content you'll probably see the modified content. That is when you start scratching your head ...
Therefore the only way I imagine that you achieve a different outcome would be via remastering of the initrd (http://wiki.tinycorelinux.com/Remastering) (and if you boot using a CD-ROM also remastering of the ISO image (http://wiki.tinycorelinux.com/Remastering#Creating_an_iso)).
If you take a look at '/init' you'll find that the 'multivt' boot code actually does a change of the '/etc/inittab' content by overwriting it with '/etc/inittab-save'. All this has to happen befor '/sbin/init' is called. Therefore I'd suggest you modify '/etc/inittab' and NOT use boot code 'multivt' (or change '/etc/inittab-save' if you want to continue to use boot code 'multivt').
-
Although this is correct, adding 'kill -1 1' to bootlocal.sh ( as the OP did ) will cause inittab to be reread and all changes will take effect.
-
Thanks to everyone for the replys.
Here is what I finally got to work.
I am loading TN5250 in the/etc/inittab
The magic lines look like this.
tty2::respawn:/usr/local/bin/th5250 env.DEVNAME= (session name) host.localdomain
Just repeat that line for as many sessions as you need. Change the tty and the session name.
The other file to modify is the /opt/bootlocal.sh
I copied from danielibarnes
# Wait for init to finish then reload it
wait $PPID
sleep 1
kill -SIGHUP 1