I’m a big fan of having a remote console on all the boxes I administer. Uncountable times, it has saved me a lot of grief, and a lot of trips to far-off computer rooms. In the old days, before iLO and DRAC and things of that nature, we had serial port terminal servers (such as the Annex servers we used to run for this tiny ISP some of my friends and I worked at.)
Once in awhile, I get to a new group of Sun boxes where the terminal type isn’t set appropriately for the serial terminal servers. I tend to have some simple techniques I use, and I thought I would write them down here, to never forget them.
On SunOS 5.8 and 5.9, the script looked like:
#!/bin/ksh/usr/sbin/sttydefs -r console /usr/sbin/sttydefs -r console1 /usr/sbin/sttydefs -r console2 /usr/sbin/sttydefs -r console3 /usr/sbin/sttydefs -r console4 /usr/sbin/sttydefs -r console5/usr/sbin/sttydefs -a console -n console -i "9600 hupcl opost onlcr erase ^h" -f 9600 /usr/sbin/sttydefs -a console1 -n console2 -i "1200 hupcl opost onlcr erase ^h" -f 1200 /usr/sbin/sttydefs -a console2 -n console3 -i "300 hupcl opost onlcr erase ^h" -f 300 /usr/sbin/sttydefs -a console3 -n console4 -i "2400 hupcl opost onlcr erase ^h" -f 2400 /usr/sbin/sttydefs -a console4 -n console5 -i "4800 hupcl opost onlcr erase ^h" -f 4800 /usr/sbin/sttydefs -a console5 -n console -i "19200 hupcl opost onlcr erase ^h" -f 19200if [ ! -f /etc/inittab.REL ]; then cp /etc/inittab /etc/inittab.REL fised -e 's/-T sun/-T vt100/' < /etc/inittab.REL > /etc/inittab.new mv /etc/inittab.new /etc/inittabexit 0
Nowadays, on Solaris 10, I’m using a single command during setup:
svccfg -s system/console-login setprop ttymon/terminal_type = vt100
I’m not even sure if the sttydefs commands are necessary anymore. I will have to check that out next time I’m at work and need the console. However, with that simple command it appears to work correctly.