Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
02-22-2005, 08:39 AM
|
#1
|
LQ Newbie
Registered: Aug 2004
Distribution: FC2, RH9, Suse, knoppix
Posts: 12
Rep:
|
logout from console hangs
Hi, I have a server running RH9 (2.4.20-8smp). When I logout from console, I dont get the login prompt back.. I have used up all the alt login consoles
I can ssh to the machine, but I need to work from the console often. ps doesnt show any extra shell processes running, so its not the shell thats hanging.. Is there a way to get the login prompts back without rebooting?
Thanks in advance,
slice
|
|
|
02-22-2005, 08:46 AM
|
#2
|
LQ Veteran
Registered: Sep 2003
Posts: 10,532
|
Hi,
Do you have a .bash_logout in your homedir(s) which contains 'strange' things that could hang the logout process?
|
|
|
02-22-2005, 08:58 AM
|
#3
|
LQ Newbie
Registered: Aug 2004
Distribution: FC2, RH9, Suse, knoppix
Posts: 12
Original Poster
Rep:
|
Nope, all pretty standard stuff.. sourcing any of the *shrc files doesnt hang.. Plus I think if .bashrc was incorrect, exiting from ssh would have hung too, no? but ssh works fine.
slice
|
|
|
02-22-2005, 09:08 AM
|
#4
|
LQ Veteran
Registered: Sep 2003
Posts: 10,532
|
Hi again,
What do the inittab entries (the Xgetty lines) look like. Depending on which getty you use they should look something like this (using agetty):
1:2345:respawn:/sbin/agetty tty1 9600
.
.
6:2345:respawn:/sbin/agetty tty6 9600
|
|
|
02-22-2005, 09:16 AM
|
#5
|
LQ Newbie
Registered: Aug 2004
Distribution: FC2, RH9, Suse, knoppix
Posts: 12
Original Poster
Rep:
|
Hi druuna,
They look like
1:2345:respawn:/sbin/mingetty tty1
...
6:2345:respawn:/sbin/mingetty tty6
but there are no mingetty processes running.. Is it ok to manually respawn them??
slice
|
|
|
02-22-2005, 09:30 AM
|
#6
|
LQ Veteran
Registered: Sep 2003
Posts: 10,532
|
Hi,
You only see these settings if nobody is logged in on the console (remote connections do not influence this). Here's an example with nobody on the console:
$ ps -ef | grep getty
root 217 1 0 11:53 tty1 00:00:00 /sbin/agetty tty1 9600
root 218 1 0 11:53 tty2 00:00:00 /sbin/agetty tty2 9600
root 219 1 0 11:53 tty3 00:00:00 /sbin/agetty tty3 9600
root 220 1 0 11:53 tty4 00:00:00 /sbin/agetty tty4 9600
root 221 1 0 11:53 tty5 00:00:00 /sbin/agetty tty5 9600
root 222 1 0 11:53 tty6 00:00:00 /sbin/agetty tty6 9600
Here's the same query with somebody at the console:
$ ps -ef | grep getty
root 218 1 0 11:53 tty2 00:00:00 /sbin/agetty tty2 9600
root 219 1 0 11:53 tty3 00:00:00 /sbin/agetty tty3 9600
root 220 1 0 11:53 tty4 00:00:00 /sbin/agetty tty4 9600
root 221 1 0 11:53 tty5 00:00:00 /sbin/agetty tty5 9600
root 222 1 0 11:53 tty6 00:00:00 /sbin/agetty tty6 9600
As you probably noticed, tty1 is 'missing'.
$ ps -ef | grep tty1
root 217 1 0 11:53 tty1 00:00:00 -bash
This is that entry, a bash shell is running on that tty.
If all of your tty's are active (although you tried to log off) you will not see any of the above mentioned 00:00:00 /sbin/agetty tty entries.
Maybe the following will give a clue about what is happening on your box:
$ ps -ef | grep tty[1-6]
You could end up with a (very) long list depending on what was started and how much was 'killed' during the log-off process. It should show you the proces(ses) that are hanging the respawn.
Also, try a init q, this will 'restart' init after it reads its 'config' (/etc/inittab).
Hope this gets you closer to a solution.
|
|
|
02-22-2005, 10:09 AM
|
#7
|
LQ Newbie
Registered: Aug 2004
Distribution: FC2, RH9, Suse, knoppix
Posts: 12
Original Poster
Rep:
|
Hi, Thanks for the explanation.. That clarifies things a lot.. But heres the deal.. I dont see any mingetty OR bash/tcsh processes running.. It probably means bash didnt exit correctly.. I tried "init q" too, doesnt seem to work..
[root@neumann ~]# ps -ef|grep tty
root 30865 30692 0 10:36 pts/4 00:00:00 grep tty
[root@neumann ~]# ps -ef | grep bash
root 32485 1 0 2004 ? 00:00:00 /bin/bash /etc/rc.d/rc 3
Any other ideas what I could try??
slice
|
|
|
02-22-2005, 11:29 AM
|
#8
|
LQ Veteran
Registered: Sep 2003
Posts: 10,532
|
Hi,
Still thinking about this one...... Interresting problem, although I wouldn't be surprised if the sollution will be found in some small thing.
Ok, I've got a few questions:
1) Do the logfiles show any related messages (mingetty and/or tty related and/or respawning to fast).
2) Can you start a tty by hand ($ /sbin/mingetty tty8) and log on to that tty? You should be able to log on once on that tty and get no prompt after logging out.
|
|
|
02-22-2005, 01:07 PM
|
#9
|
LQ Newbie
Registered: Aug 2004
Distribution: FC2, RH9, Suse, knoppix
Posts: 12
Original Poster
Rep:
|
Hi, theres nothing strange in the logfiles either.. Cant start /sbin/mingetty tty8.. says operation not permitted in /var/log/messages.. I am at my wits end.. mebbe I shud just wait till the next scheduled reboot next month.. but its damn annoying not to have a shell on the console..
slice
|
|
|
All times are GMT -5. The time now is 02:33 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|