LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 11-30-2006, 01:21 PM   #1
scrupul0us
Member
 
Registered: Jan 2006
Location: Albany, NY
Distribution: CentOS 6.3
Posts: 159

Rep: Reputation: 30
Question since we have no /etc/inittab


since ubuntu 6.10 doesnt have an /etc/inittab what file do i edit to chagne my default run level at boot?
 
Old 11-30-2006, 01:42 PM   #2
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
I believe /etc/event.d/ replaced /etc/inittab. Ubuntu refers to it as upstart.
 
Old 11-30-2006, 02:01 PM   #3
scrupul0us
Member
 
Registered: Jan 2006
Location: Albany, NY
Distribution: CentOS 6.3
Posts: 159

Original Poster
Rep: Reputation: 30
i really see nothing there that will let me set my initdefault for boot... i guess i really dont understand the break out of each file...

id like to go back to console login mode

Last edited by scrupul0us; 11-30-2006 at 02:10 PM.
 
Old 11-30-2006, 02:33 PM   #4
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
I believe /etc/event.d/rc-default is what your looking for.
 
Old 12-01-2006, 06:55 AM   #5
scrupul0us
Member
 
Registered: Jan 2006
Location: Albany, NY
Distribution: CentOS 6.3
Posts: 159

Original Poster
Rep: Reputation: 30
so after looking at that i see that it will still check for inittab and the default runlevel... so i recreated inittab and put the default to runlevel 3... and im still greeted with a gnome login
 
Old 12-01-2006, 02:10 PM   #6
scrupul0us
Member
 
Registered: Jan 2006
Location: Albany, NY
Distribution: CentOS 6.3
Posts: 159

Original Poster
Rep: Reputation: 30
bump bump bump
 
Old 12-01-2006, 04:12 PM   #7
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
Excerpt from http://en.wikipedia.org/wiki/Runlevel.

Quote:
Debian Linux

Debian, as well as most of the distributions based on it, like Ubuntu, does not make any distinction between runlevels 2 to 5. See also the Debian FAQ on booting.

* 0 - Halt
* 1 - Single
* 2 - Full multi-user with display manager (GUI)
* 3 - Full multi-user with display manager (GUI)
* 4 - Full multi-user with display manager (GUI)
* 5 - Full multi-user with display manager (GUI)
* 6 - Reboot
One way to see what runlevel you are on is to issue the following command as root:

Code:
# runlevel
N 5
If when you run the above command it says that you are indeed on runlevel 3, then you know that your entry into inittab is being honored. You can change to a different runlevel by using the following command as root:

Code:
# telinit 5
This will change your runlevel to 5 by shutting down unnecesary process's and starting up all runlevel 5 process's.

In my example it says that I'm on runlevel 5. According to http://en.wikipedia.org/wiki/Runlevel 2-5 on ubuntu all use a gui. Each defined run level should have an rcX.d directory where X is the run level number. The contents of the /etc/rc2-5.d directories are all the same, so you could customize lets say rc3.d. The contents of the rcX.d directory determines what happens at that runlevel. Because runlevel 3 is not used by default on ubuntu you could go into /etc/rc3.d and change what is loaded. For example the file /etc/rc3.d/S13gdm is used to start your gui. You could test this by temporarily moving the /etc/rc3.d/s13gdm file to another location and rebooting or if you are not already on runlevel 3 by issuing :

Code:
# telinit 3
Might be worth a try. Anyway let me know if you have any more questions.

Regards,
Fordeck
 
Old 10-03-2007, 08:21 PM   #8
wyzgreg
LQ Newbie
 
Registered: Aug 2007
Posts: 27

Rep: Reputation: 15
stopping gdm

I used System->Administration->services to disable gdm.
 
Old 10-03-2007, 08:28 PM   #9
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,228
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
That's odd considering Ubuntu is a derivative of Debian and Debian has an /etc/inittab file

Debian however starts by default in runlevel 2, and runlevels 2-5 are all configured the same..
You can however edit the runlevels and change the inittab to your liking.

are you SURE theres no /etc/inittab file in Ubuntu ?

Imagine that, they DID remove it..

http://blog.mypapit.net/2007/03/wher...isty-fawn.html

Last edited by farslayer; 10-03-2007 at 08:30 PM.
 
Old 10-03-2007, 10:30 PM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,354

Rep: Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042
As suggested, runlevel 2 is what you want. And yes, the inittab will be found and used.
It's a PITA for a few of us I suspect. IMHO the Ubuntu devs need their collective arses kicked for this and a few other decisions.
Unilateral use of UUID for example ... causes me no end of grief.
 
Old 10-04-2007, 10:35 PM   #11
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,228
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
If you read that blog post I linked, upstart is being looked at in Debian Experimental as well....

I'm not sure if thats good or bad. Do I fear change ?
 
Old 10-04-2007, 10:47 PM   #12
SilentSam
Member
 
Registered: Aug 2007
Location: Ottawa
Distribution: Arch Linux/Kubuntu/OpenSUSE
Posts: 287

Rep: Reputation: 31
I think you can set grub to the proper runlevel, but I've read that Ubuntu has runlevel 2-5 set with the exact same startup scripts. So you'd need to modify for instance the scripts in rc3.d to only load what you want on boot (for instance, there should be a S99gdm script in rc3.d that loads gdm on runlevel 3).

rc#.d = directory of startup scripts for runlevel #.

Someone please correct me if there's an easier way.
 
Old 01-28-2008, 04:24 PM   #13
suprpenguin04
LQ Newbie
 
Registered: Oct 2003
Location: Phoenix, Arizona & Hartford, CT
Distribution: Rh / Fedora, SuSe, YDL PPC, Mandrake PPC
Posts: 13

Rep: Reputation: 0
so heres the big question....

ok so now that we know that run lvls 2-5 are treated the same in ubnuntu...



what would have to be removed from say the /etc/rc3.d directory to make that a full user non graphic mode, like it is in every other version of linux????



cuz well, i hate having my machine default to the X11 login...
 
Old 01-28-2008, 05:37 PM   #14
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,228
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
just run sysv-rc-conf and un-select gdm from the options that start automatically in runlevel 2

in Debian runlevel 2 is the default (Ubuntu may vary... dunno)

Code:
# The default runlevel.
id:2:initdefault:
from that point after you log in you can just do startx to launch X

Last edited by farslayer; 01-28-2008 at 05:40 PM.
 
Old 01-29-2008, 03:45 PM   #15
hex1a4
Member
 
Registered: Dec 2007
Location: ON CA
Distribution: Xubuntu 8.04; Xubuntu 6.06.2
Posts: 64

Rep: Reputation: 15
Hi,

If you create your own /etc/inittab file, Ubuntu will honour it.

To change your runlevels the Ubuntu way look in /etc/init.d/ which contains startup scripts. Then look in /etc/rc#.d/ which contains symlinks to scripts in /etc/init.d/. The name of the symlinks determines what will be started/stopped and in what order. Look in the README file in any of the /etc/rc#.d/ directories for details.

The # in the /etc/rc#.d/ is the runlevel number.

To stop GDM from loading in runlevel 2 (Ubuntu default runlevel) rename /etc/rc2.d/S30gdm to /etc/rc2.d/K70gdm

The S tells Ubuntu to start the process, and the K tells Ubuntu to kill it. The number is the order in which it should be started/stopped.

Have a look at the man page for update-rc.d which can be used to create/update/remove the init script symlinks for you.

EDIT: You can also install the Boot-Up Manager (BUM) which is a graphical tool to configure runlevels. It's in the repositories.

Last edited by hex1a4; 01-30-2008 at 09:02 AM.
 
  


Reply

Tags
inittab, level


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
rc[0-6] and inittab kpachopoulos Linux - General 1 08-12-2005 04:27 PM
inittab mikedeatworld Linux - Software 3 08-13-2004 10:01 AM
Cant get out of inittab InEeDhElPlInUx Linux - Newbie 3 10-09-2003 02:13 PM
/etc/inittab sakeeb Linux - General 9 05-29-2002 09:04 AM
no inittab file? Atroxic Linux - Software 2 05-14-2002 05:26 PM


All times are GMT -5. The time now is 07:05 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration