LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   /etc/inittab problem (https://www.linuxquestions.org/questions/linux-newbie-8/etc-inittab-problem-751882/)

dbacore 09-01-2009 02:55 PM

/etc/inittab problem
 
Hi,

I would like to start system at default in text mode. I changed the default init to 3 (was 5) but the system is starting in graphical mode.

Should I change something more ?

bbeers 09-01-2009 03:03 PM

Which distro?

Can you show the lines in /etc/inittab that resemble:

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

Do you have anything like kdm/gdm/xdm/startx in rc.local?

-Bob

catkin 09-01-2009 05:44 PM

Tell us which version of Linux (which distro, short for distribution) you are using and post or attach the output from
Code:

/bin/ls -l /etc/rc[S0-6].d

dbacore 09-02-2009 08:00 AM

Sorry I should provide this output first:

/etc/inittab/
------------------------------------------------------------------------

id:3:initdefault:


# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit

l0:0:wait:/etc/rc.d/rc 0

l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6

# Trap CTRL-ALT-DELETE
ca::ctrlaltdel:/sbin/shutdown -t3 -r now

pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"


1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6

# Run xdm in runlevel 5
x:3:respawn:/etc/X11/prefdm -nodaemon
---------------------------------------------------------------------------------


[root@oelinux ~]# ls -l /etc/rc[S0-6].d

lrwxrwxrwx 1 root root 10 Aug 31 17:26 /etc/rc0.d -> rc.d/rc0.d
lrwxrwxrwx 1 root root 10 Aug 31 17:26 /etc/rc1.d -> rc.d/rc1.d
lrwxrwxrwx 1 root root 10 Aug 31 17:26 /etc/rc2.d -> rc.d/rc2.d
lrwxrwxrwx 1 root root 10 Aug 31 17:26 /etc/rc3.d -> rc.d/rc3.d
lrwxrwxrwx 1 root root 10 Aug 31 17:26 /etc/rc4.d -> rc.d/rc4.d
lrwxrwxrwx 1 root root 10 Aug 31 17:26 /etc/rc5.d -> rc.d/rc5.d
lrwxrwxrwx 1 root root 10 Aug 31 17:26 /etc/rc6.d -> rc.d/rc6.d

[root@oelinux ~]# uname -a
Linux oelinux 2.6.18-92.el5 #1 SMP Fri May 23 22:17:30 EDT 2008 i686 i686 i386 GNU/Linux

cat /etc/redhat-release
Enterprise Linux Enterprise Linux Server release 5 (Carthage)

catkin 09-02-2009 01:00 PM

Quote:

Originally Posted by dbacore (Post 3666766)
[root@oelinux ~]# ls -l /etc/rc[S0-6].d

lrwxrwxrwx 1 root root 10 Aug 31 17:26 /etc/rc0.d -> rc.d/rc0.d
lrwxrwxrwx 1 root root 10 Aug 31 17:26 /etc/rc1.d -> rc.d/rc1.d
lrwxrwxrwx 1 root root 10 Aug 31 17:26 /etc/rc2.d -> rc.d/rc2.d
lrwxrwxrwx 1 root root 10 Aug 31 17:26 /etc/rc3.d -> rc.d/rc3.d
lrwxrwxrwx 1 root root 10 Aug 31 17:26 /etc/rc4.d -> rc.d/rc4.d
lrwxrwxrwx 1 root root 10 Aug 31 17:26 /etc/rc5.d -> rc.d/rc5.d
lrwxrwxrwx 1 root root 10 Aug 31 17:26 /etc/rc6.d -> rc.d/rc6.d

Ah, RHEL! Then please post the output of
Code:

/bin/ls -l /etc/rc.d/rc[0-6].d

chrism01 09-02-2009 06:41 PM

It's this line
Code:

# Run xdm in runlevel 5
x:3:respawn:/etc/X11/prefdm -nodaemon

the hint is in the comment. Someone has put a 3 where it should be a 5. This is actually the line that determines what level X starts up. The initdef line defines default startup init level.

dbacore 09-03-2009 05:19 AM

Quote:

Originally Posted by chrism01 (Post 3667473)
It's this line
Code:

# Run xdm in runlevel 5
x:3:respawn:/etc/X11/prefdm -nodaemon

the hint is in the comment. Someone has put a 3 where it should be a 5. This is actually the line that determines what level X starts up. The initdef line defines default startup init level.

You were right it should be 5. This hs solved the problem.


All times are GMT -5. The time now is 02:19 PM.