LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 04-28-2010, 05:03 AM   #1
ethereal1m
Member
 
Registered: Jan 2010
Distribution: Ubuntu
Posts: 312

Rep: Reputation: 31
Question When change default runlevel to 4, tty1 got stuck and tty2-5 don't work


Dear all,
when I change runlevel to 4, I got the login manager works but tty1 stuck meaning I can see the last stdout but the prompt is not there and also tty2-5 don't work.

Here is my inittab:
Code:
#
# inittab	This file describes how the INIT process should set up
#		the system in a certain run-level.
#
# Version:	@(#)inittab		2.04	17/05/93	MvS
#                                       2.10    02/10/95        PV
#                                       3.00    02/06/1999      PV
#                                       4.00    04/10/2002      PV
#
# Author:	Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
# Modified by:	Patrick J. Volkerding, <volkerdi@slackware.com>
#

# These are the default runlevels in Slackware:
#   0 = halt
#   1 = single user mode
#   2 = unused (but configured the same as runlevel 3)
#   3 = multiuser mode (default Slackware runlevel)
#   4 = X11 with KDM/GDM/XDM (session managers)
#   5 = unused (but configured the same as runlevel 3)
#   6 = reboot

# Default runlevel. (Do not set to 0 or 6)
id:3:initdefault:

# System initialization (runs when system boots).
si:S:sysinit:/etc/rc.d/rc.S

# Script to run when going single user (runlevel 1).
su:1S:wait:/etc/rc.d/rc.K

# Script to run when going multi user.
rc:2345:wait:/etc/rc.d/rc.M

# What to do at the "Three Finger Salute".
ca::ctrlaltdel:/sbin/shutdown -t5 -r now

# Runlevel 0 halts the system.
l0:0:wait:/etc/rc.d/rc.0

# Runlevel 6 reboots the system.
l6:6:wait:/etc/rc.d/rc.6

# What to do when power fails.
pf::powerfail:/sbin/genpowerfail start

# If power is back, cancel the running shutdown.
pg::powerokwait:/sbin/genpowerfail stop

# These are the standard console login getties in multiuser mode:
c1:1235:respawn:/sbin/agetty 38400 tty1 linux
c2:1235:respawn:/sbin/agetty 38400 tty2 linux
c3:1235:respawn:/sbin/agetty 38400 tty3 linux
c4:1235:respawn:/sbin/agetty 38400 tty4 linux
c5:1235:respawn:/sbin/agetty 38400 tty5 linux
c6:12345:respawn:/sbin/agetty 38400 tty6 linux

# Local serial lines:
#s1:12345:respawn:/sbin/agetty -L ttyS0 9600 vt100
#s2:12345:respawn:/sbin/agetty -L ttyS1 9600 vt100

# Dialup lines:
#d1:12345:respawn:/sbin/agetty -mt60 38400,19200,9600,2400,1200 ttyS0 vt100
#d2:12345:respawn:/sbin/agetty -mt60 38400,19200,9600,2400,1200 ttyS1 vt100

# Runlevel 4 used to be for an X window only system, until we discovered
# that it throws init into a loop that keeps your load avg at least 1 all 
# the time. Thus, there is now one getty opened on tty6. Hopefully no one
# will notice. ;^)
# It might not be bad to have one text console anyway, in case something 
# happens to X.
x1:4:respawn:/etc/rc.d/rc.4

# End of /etc/inittab
I only modify the following line:
Code:
id:3:initdefault:
into:
Code:
id:4:initdefault:
Is there anything that I miss that causing the problem?
regards,
ethereal1m

Last edited by ethereal1m; 04-28-2010 at 05:05 AM.
 
Old 04-28-2010, 05:12 AM   #2
zordrak
Member
 
Registered: Feb 2008
Distribution: Slackware
Posts: 595

Rep: Reputation: 116Reputation: 116
Change:
Quote:
c1:1235:respawn:/sbin/agetty 38400 tty1 linux
c2:1235:respawn:/sbin/agetty 38400 tty2 linux
c3:1235:respawn:/sbin/agetty 38400 tty3 linux
c4:1235:respawn:/sbin/agetty 38400 tty4 linux
c5:1235:respawn:/sbin/agetty 38400 tty5 linux
c6:12345:respawn:/sbin/agetty 38400 tty6 linux
To:
Quote:
c1:1235:respawn:/sbin/agetty 38400 tty1 linux
c2:12345:respawn:/sbin/agetty 38400 tty2 linux
c3:12345:respawn:/sbin/agetty 38400 tty3 linux
c4:12345:respawn:/sbin/agetty 38400 tty4 linux
c5:12345:respawn:/sbin/agetty 38400 tty5 linux
c6:12345:respawn:/sbin/agetty 38400 tty6 linux
This will enable tty2-tty5 when in runlevel 4.

I recommend NOT adding the 4 to c1, you just don't need tty1 and leaving it as is leaves it for Xorg output to be displayed.

Last edited by zordrak; 04-28-2010 at 05:13 AM.
 
Old 04-28-2010, 05:28 AM   #3
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,882

Rep: Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988
Quote:
Originally Posted by ethereal1m View Post
Dear all,
when I change runlevel to 4, I got the login manager works but tty1 stuck meaning I can see the last stdout but the prompt is not there and also tty2-5 don't work.
Yep. That's the way it's meant to work on Slackware.
In run-level 4, Slackware puts a login prompt on tty6 and kdm/xdm display manager greeter on tty7.
 
Old 04-28-2010, 05:29 AM   #4
zordrak
Member
 
Registered: Feb 2008
Distribution: Slackware
Posts: 595

Rep: Reputation: 116Reputation: 116
Wish I understood why Pat killed tty{2..5} by default..
 
1 members found this post helpful.
Old 04-28-2010, 07:29 PM   #5
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,882

Rep: Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988
Quote:
Originally Posted by zordrak View Post
Wish I understood why Pat killed tty{2..5} by default..
Well, default run-level on Slackware is 3, so technically he doesn't.


I guess he's thinking that if you're going to use runlevel 4, you're doing it because you want to use the X window system and there's no point starting those extra getty processes. tty6 is there as a fail-safe just in case you screw up your Xserver.

The runlevel4 tty config is well understood in Slackware circles, but it is something that does catch newbie slackers out from time to time.
 
1 members found this post helpful.
Old 04-29-2010, 01:34 AM   #6
ethereal1m
Member
 
Registered: Jan 2010
Distribution: Ubuntu
Posts: 312

Original Poster
Rep: Reputation: 31
Thumbs up

thank you!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Cannot switch between tty1,tty2,etc voyciz Slackware 11 01-01-2010 03:36 AM
change default runlevel mobinskariya Ubuntu 5 08-02-2009 12:13 PM
How do i switch from tty1 to tty2? alex1986 Linux - Newbie 4 07-27-2006 06:01 AM
changed default runlevel from 3 to 4 in inittab- now I'm stuck in a loop Earl Parker II Linux - Newbie 15 07-12-2004 08:37 AM
shortcut way to logout from tty1 or tty2....... hitesh_linux Linux - General 2 03-25-2003 01:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration