1833875 Members
1795 Online
110063 Solutions
New Discussion

TERM = (hp) at boot

 
SOLVED
Go to solution
TWBSupport
Regular Advisor

TERM = (hp) at boot

Hi All -
When I boot one of my rp2470's, the boot process hangs in the middle & brings up a TERM = (hp) prompt & sits there until I put in what TERM setting I want (vt100). How can I get this to KNOW that I want vt100 as my terminal setting. I've tried modifing .profile of root. I also editted gsp to vt100. I know this has to be an easy fix, but I can't get past this darn thing. Any advice is greatly appreciated.
20 REPLIES 20
Steven E. Protter
Exalted Contributor

Re: TERM = (hp) at boot

1) It should not hang.
2) /etc/profile or .profile
TERM=vt100
export TERM

If you are really slick, you can detect a console login and use TERM=hp only for console logins.


Thats a fun scripting project that I've been too lazy to do.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Rajeev  Shukla
Honored Contributor

Re: TERM = (hp) at boot

First thing.
1. At what stage in boot is it hanging...can you give previous 2-3 lines.
2. Which console are you using? webconsole or terminal console? change the terminal profile in that to vt100. I think its detecting the term using /etc/profile and showing as hp.
3. Or alternatively you can force to export TERM=vt100 in /etc/profile.

I dont think it will read .profile, coz as you said it hangs in the middle of boot.

Cheers
Rajeev
Michael Steele_2
Honored Contributor

Re: TERM = (hp) at boot

If it continues to hang then put a debug line at the top of /etc/profile to discovery the hanging command:

set -xv
Support Fatherhood - Stop Family Law
TWBSupport
Regular Advisor

Re: TERM = (hp) at boot

Here's the output prior to getting this error:
/sbin/auto_parms: DHCP access is disabled
stty:Not a typewriter
TERM = (hp)



Next response is:
export:command not found
TERM=vt100 command not found
stty:Not a typewriter
stty:Not a typewriter
TERM = (hp)



then it will continue with the boot process

Thanks for the fast responses...
TWBSupport
Regular Advisor

Re: TERM = (hp) at boot

I'm sorry, I forgot. This is at the server console
John Dvorchak
Honored Contributor

Re: TERM = (hp) at boot

The problem may be that your terminal is not sending an "Answer back" string to the rp2470. Since you have to set it to vt100 I am guessing that it is not an HP terminal but one that is set to vt100 emulation. Most terminals that I have seen have a setup mode and they have a place to either enable answerback or allow you to enter an answerback string to send when queried. Check to se if your's is either not enabled to send the answerback or it is sending a blank string.

Good luck
If it has wheels or a skirt, you can't afford it.
TWBSupport
Regular Advisor

Re: TERM = (hp) at boot

This terminal is an HP terminal & I have a second rp2470 in the rack that has no problem with the terminal ( I physically change the console ports when I want to view one or the other )
Rajeev  Shukla
Honored Contributor

Re: TERM = (hp) at boot

Ok,
Here is what i feel is going wrong.
1. compare both the systems and see if any changes have been made to /sbin/rc file (be carefull, its a very important fine and if messed up can stop the complete boot)

2. compare the /etc/rc.config.d/list_mode you have values 0,1,2 & 3 for LIST_MODE which tells about the type of console, i am pretty sure something is wrong in that. compare the file on both the systems.

Also check that you have PATH=/sbin in /sbin/rc file, that anyway shouldn't have changed otherwise the system wont boot.

Good Luck
Rajeev
TWBSupport
Regular Advisor

Re: TERM = (hp) at boot

Rajeev -
Thanks for your suggestions. But the /sbin/rc file on both systems are the same, as well as the list_mode files. PATH=/sbin is in both rc files as well...
Olivier Decorse
Respected Contributor

Re: TERM = (hp) at boot

The script that run auto_parms is /sbin/rc.
It also run, using /etc/inittab, all scripts requies for your define runlevel (in /sbin/init.d).
May be you're file is not correctly configured, according to you console configuration (F10 key) and
Can you send your /etc/inittab and the result of the 'stty -a' command ? Also, joint the 10 last lines of your /etc/gettydefs (with "This entry is used for the console").

Please don't forget to assign points if replies helps you, or not.
They say "install windows 2k, xp or better", so i install unix !
TWBSupport
Regular Advisor

Re: TERM = (hp) at boot

init:3:initdefault:
ioin::sysinit:/sbin/ioinitrc >/dev/console 2>&1
tape::sysinit:/sbin/mtinit > /dev/console 2>&1
muxi::sysinit:/sbin/dasetup /dev/console 2>&1 # mux init
stty::sysinit:/sbin/stty 9600 clocal icanon echo opost onlcr ixon icrnl ignpar vxen::bootwait:/sbin/fs/vxfs/vxenablef -a
vol1::sysinit:/sbin/init.d/vxvm-sysboot /dev/console 2>&1 ##vxvm
vol2::sysinit:/sbin/init.d/vxvm-startup start /dev/console 2>&1 ##vxvm
brc1::bootwait:/sbin/bcheckrc /dev/console 2>&1 # fsck, etc.
link::wait:/sbin/sh -c "/sbin/rm -f /dev/syscon; \
/sbin/ln /dev/systty /dev/syscon" >/dev/console 2>&1
cprt::bootwait:/sbin/cat /etc/copyright >/dev/syscon # legal req
sqnc::wait:/sbin/rc /dev/console 2>&1 # system init
#powf::powerwait:/sbin/powerfail >/dev/console 2>&1 # powerfail
cons:123456:respawn:/usr/sbin/getty console console # system console
#ttp1:234:respawn:/usr/sbin/getty -h tty0p1 9600
#ttp2:234:respawn:/usr/sbin/getty -h tty0p2 9600
#ttp3:234:respawn:/usr/sbin/getty -h tty0p3 9600
#ttp4:234:respawn:/usr/sbin/getty -h tty0p4 9600
#ttp5:234:respawn:/usr/sbin/getty -h tty0p5 9600
krsd:123456:respawn:/sbin/krsd -i
sfd:123456:respawn:/sbin/sfd
#ups::respawn:rtprio 0 /usr/lbin/ups_mond -f /etc/ups_conf
ems1::bootwait:/sbin/rm -f /etc/opt/resmon/persistence/runlevel4_flag
ems2::bootwait:/sbin/cat /etc/opt/resmon/persistence/reboot_flag
ems3:3456:wait:/sbin/sh -c "/usr/bin/touch /etc/opt/resmon/persistence/runlevel4_flag; /usr/bin/chmod 64
4 /etc/opt/resmon/persistence/runlevel4_flag"
ems4:3456:respawn:/etc/opt/resmon/lbin/p_client

********************

stty -a
speed 9600 baud; line = 0;
rows = 48; columns = 104
min = 1; time = 0;
intr = ^C; quit = ^\; erase = ^H; kill = ^U
eof = ^D; eol = ^@; eol2 ; swtch
stop = ^S; start = ^Q; susp ; dsusp
werase ; lnext
parenb -parodd cs7 -cstopb hupcl -cread -clocal -loblk -crts
-ignbrk brkint ignpar -parmrk -inpck istrip -inlcr -igncr icrnl -iuclc
ixon -ixany ixoff -imaxbel -rtsxoff -ctsxon -ienqak
isig icanon -iexten -xcase echo echoe echok -echonl -noflsh
-echoctl -echoprt -echoke -flusho -pendin
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel -tostop

*******************
#
# This entry is used for the console
#

console # B9600 SANE CLOCAL CS8 ISTRIP IXANY TAB3 HUPCL
# B9600 SANE CLOCAL CS8 ISTRIP IXANY TAB3 HUPCL
#Console Login: #console

#
# This entry may be used for hard-wired terminals
#

H # B9600 SANE CLOCAL CS8 IXANY TAB3
# B9600 SANE CLOCAL CS8 IXANY TAB3
#login: #H
gettydefs: END

These files are exactly the same as the system that boots correctly w/o the TERM prompt.

Thanks again.
Olivier Decorse
Respected Contributor

Re: TERM = (hp) at boot

OK.
Certainely you have a command that need interaction in your /etc/profile or $HOME/.profile. Something like stty, ttytype or tset (certainely stty according your error message). I remember they need some tests before to launch because at this moment (within /etc/rc), they are not associated with a terminal.
Can you display the (only) exact commands that you put in your configuration files (/etc/profile and/or $HOME/.profile).
I assume you use ksh.
Olivier.

Please don't forget to assign points if replies helps you, or not.
They say "install windows 2k, xp or better", so i install unix !
Pete Randall
Outstanding Contributor

Re: TERM = (hp) at boot

Belynda,

I'm still not clear on exactly when this happens during boot-up. Is the console still displaying the /sbin/init.d startup menus? Or does this happen when you try to log in? Depending on the answer to those questions, I would look at the /etc/rc.config.d files looking for extraneous ones on the failing server (like blahblah.bak, for example). Everything in /etc/rc.config.d gets sourced, so stray files can introduce some odd behaviours.


Pete


Pete
TWBSupport
Regular Advisor

Re: TERM = (hp) at boot

This happens right after sanity check on vg's. We have an oracle & listener startup script in rc3.d. I started thinking that might be it, but it's the same files that are in the server that boots correctly, the same server I keep referencing on this post.
Elmar P. Kolkman
Honored Contributor
Solution

Re: TERM = (hp) at boot

But most oracle startups work by doing a 'su - oracle -c dbstart' or something like that, meaning it will run the .profile of oracle. Which could result in this problem (I've seen this happening before).
Every problem has at least one solution. Only some solutions are harder to find.
TWBSupport
Regular Advisor

Re: TERM = (hp) at boot

Here is oracles .profile. This is the same exact .profile that resides on the server that boots correctly. Any suggestions?

# Default .cshrc copied into every user's home directory by SAM.
# 1) source terminal settings first
# 2) source aliases next
# keep entries in this file to an absolute minimum


#set path=(. /bin /usr/bin /usr/local/rhythm /usr/bin/X11 /usr/vue/bin /usr/vue/config)

#if ( $?prompt ) then
set history=50
set savehist=50
set system=`hostname`
set noclobber ignoreeof
set prompt = "`hostname`{${cwd}}\! % "
export ORACLE_HOME=/u100/app/oracle/product/9.2.0
export SHLIB_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/dt/lib
export ORACLE_SID=PTWB
export PATH=$ORACLE_HOME/bin:$PATH

#source /usr/local/admin/csh.aliases

#source /usr/local/admin/printer.aliases

# Override (if necessary) default printer destination (remove '#' from
# next line, change ???????? to a valid printer).
# LPDEST is for non-Rhythm print requests, PRINTER is used by Rhythm.

# export LPDEST=????????
export PRINTER=tw053p04
export ORACLE_BASE=/u100/app/oracle
export ora_csm_mode=line
export CLASSPATH=$ORACLE_HOME/jdbc/lib
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/jdbc/lib:/usr/lib
export ORA_NLS=$ORACLE_HOME/ocommom/nls/admin/data
export ORACLE_DOC=$ORACLE_BASE/odoc
export NLS_DATE_FORMAT='DD-MON-RR'
# export PATH $ORACLE_HOME/bin:/opt/perf/bin:/$PATH
export TMPDIR=/tmp
stty erase "^?" kill "^U" intr "^C" eof "^D" susp "^Z" hupcl ixon ixoff tostop
umask 022
export ORACLE_TERM=hpterm
Mark Grant
Honored Contributor

Re: TERM = (hp) at boot

seems to me that something is definately logging in as oracle at boot. Maybe you have a cron job that runs very regularly and logs into oracle before the rest of the system has come up. Seem a bit unlikely though.

How about "grep oracle /sbin/init.d/*"
Never preceed any demonstration with anything more predictive than "watch this"
Olivier Decorse
Respected Contributor

Re: TERM = (hp) at boot

Belynda,

if error appears just after /sbin/auto_parms and file systems check (fsclean), it must be a problem with /etc/profile or root's .profile. Is there any difference between the two server with there files ?
I read you add some lines in .profile : what are they ? We can't find without those lines.

Modification like :
if [ -t 0 ]; then
stty ...
fi
may help stty because no terminal is attached while booting.
Olivier.

Please don't forget to assign points if replies helps you, or not.
They say "install windows 2k, xp or better", so i install unix !
Bill Hassell
Honored Contributor

Re: TERM = (hp) at boot

The TERM=(hp) hang is due to an automatic identification program, either tset or ttytype. Of the two programs, ttytype is the most useful. Although you are using an HP terminal, it sounds as if it has been badly misconfigured There are several dozen settings in an HP terminal, manyof which can be changed with special codes sent to the terminal. This often happens when someone uses cat on a binary file and megabytes of random binary data flows to the terminal.

You can verify that it is a terminal problem by moving the terminal on the other HP-UX box over to the problem box, or you can see the problem in realtime by using the command:

ttytype -s

ttytype sends out queries in 3 basic terminal languages and if nothing comes back, you know that the terminal is misconfigured. For HP terminals such as the 700/9x series, you can power off the terminal, then hold down the D key (for DEFAULT SETTINGS) and turn the power back on. Release the D key once you see the hard reset message on the screen.

As far as the other messages during bootup that mention "not a typewriter", these are easily understood when you consider that startup (as well as cron and other batch jobs) have no terminal attached and therefore commands like tabs, ttytype, stty, tput and tset will fail. These commands must be protected in scripts, ESPECIALLY /etc/profile and .profile (and other shell profiles). You must determine if the shell code is running in an interactive session, something like this:

case $- in
*i* ) export INTERACTIVESHELL=/sbin/true
;;
* ) export INTERACTIVESHELL=/sbin/false
;;
esac

Now 'protect' all terminal-only commands in shell scripts and profiles like this:

if $INTERACTIVESHELL
then
tabs
tput reset
... etc ...
fi

Look in /etc/rc.log and /var/adm/syslog/syslog.log for the 'typewriter' messages.

Note that using the HP terminal in HP mode makes tools like SAM and swinstall and Glance much, much easier to use and easier to read. For the console terminal, you MUST match the GSP with the terminal type. If you set the HP terminal to non-HP (ie, EM100), then the GSP must also be changed. ttytype and tset were changed a long time ago to treat GSP-based systems differently than any previous HP 9000. Rather than asking the console terminal what the model number is, this code blocks the query and simply reads the GSP setting, a dubious feature at best. So regardless of the terminal mode, the GSP overrides.

I recomend setting the GSP to hpterm, and setting the HP terminal to HP. If you use the D key reset on the terminal, it will revert to HP mode. Additionally, you may want to turn off ENQ/ACK and change the cursor to block rather than underline.


Bill Hassell, sysadmin
TWBSupport
Regular Advisor

Re: TERM = (hp) at boot

Thanks all for your great suggestions... I put a fine tooth comb to oracle's home directory & it looks like my dba threw a .login in there & that was botching everything up. It was a late night & I guess I just kept missing seeing that file. Thank you all again.