LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 08-13-2011, 02:34 AM   #1
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,203
Blog Entries: 23

Rep: Reputation: 279Reputation: 279Reputation: 279
Smile Boot in CLI - inittab-wise


Hi,

I need to start the system without X11, graphical stuff and such...since this is something I dont really do on a regular base, I'm kinda stuck...
I understand init 3 is the text-only mode (CLI) but...mine starts in 3 already, so, is commenting out the red line enough?

Quote:
#
# /etc/inittab
#

# Runlevels:
# 0 Halt
# 1(S) Single-user
# 2 Not used
# 3 Multi-user
# 4 Not used
# 5 X11
# 6 Reboot

## Only one of the following two lines can be uncommented!
# Boot to console
id:3:initdefault:
# Boot to X11
#id:5:initdefault:

rc::sysinit:/etc/rc.sysinit
rs:S1:wait:/etc/rc.single
rm:2345:wait:/etc/rc.multi
rh:06:wait:/etc/rc.shutdown
su:S:wait:/sbin/sulogin -p

# -8 options fixes umlauts problem on login
c1:2345:respawn:/sbin/agetty -8 -s 38400 tty1 linux
c2:2345:respawn:/sbin/agetty -8 -s 38400 tty2 linux
c3:2345:respawn:/sbin/agetty -8 -s 38400 tty3 linux
c4:2345:respawn:/sbin/agetty -8 -s 38400 tty4 linux
c5:2345:respawn:/sbin/agetty -8 -s 38400 tty5 linux
c6:2345:respawn:/sbin/agetty -8 -s 38400 tty6 linux

# Serial Virtual Console for KVM and others VMs
#s0:2345:respawn:/sbin/agetty -8 -s 9600 ttyS0 linux

# Hypervisor Virtual Console for Xen and KVM
#h0:2345:respawn:/sbin/agetty -8 -s 38400 hvc0 linux

ca::ctrlaltdel:/sbin/shutdown -t3 -r now

# Example lines for starting a login manager
x:5:respawn:/usr/bin/xdm -nodaemon
#x:5:respawn:/usr/sbin/gdm -nodaemon
#x:5:respawn:/usr/bin/kdm -nodaemon
#x:5:respawn:/usr/bin/slim >/dev/null 2>&1
Thanks for some insight!

Thor
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 08-13-2011, 03:25 AM   #2
tommylovell
Member
 
Registered: Nov 2005
Distribution: Fedora, Redhat
Posts: 372

Rep: Reputation: 101Reputation: 101
id:3:initdefault: should be sufficient.

'runlevel' would confirm what runlevel you are running as, but I can't conceive of a situation where you wouldn't be in runlevel 3, unless there is something in your runlevel 3 initialization that issues a init 5 or telinit 5 command.

If you are at runlevel 3, then x:5:respawn:/usr/bin/xdm -nodaemon should not have any effect. It would only be used if you went into runlevel 5.

Is it possible that xdm is being started somewhere in your runlevel 3 initialization? Do other people maintain this system other than you? Do you have any packages installed that might have done something funky like that?

I think Arch is Fedora/RHEL derived (clearly you have System V initialization), so 'chkconfig --list' would show you what is being started at runlevel 3 for services implemented the "recommended way". But no matter how implemented, everything not started by inittab has to be started by /etc/rc.sysinit or a subsequently executed rc shell script. That would mean that (if you are in runlevel 3) all of the "Snnxxxxx" scripts in /etc/rc.d/rc3.d (or /etc/rc3.d). (All of the "Knnxxxxx" scripts get executed first. By convention, they are supposed to be stopping daemons as you are entering that runlevel.) Also check what you have in /etc/rc.d/rc.local (/etc/rc.local).

Try this command, grep -Ri "xdm\|x11" /etc/rc*, to see if there is any funny business going on on your system. I don't expect it to find anything, but you never know.

ps. This is all assuming your system is using the traditional inittab startup. My Fedora15 system is now using 'systemd' for initialization. 'systemd' completely ignores inittab. Look for this softlink to see if you have 'systemd': /etc/systemd/system/default.target

Last edited by tommylovell; 08-13-2011 at 03:32 AM.
 
Old 08-13-2011, 03:36 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,206

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Not worth phaffing around with inittab.
Interrupt grub and add the single character "1" to the end of the kernel line. Gets you into single-user mode for just that boot. Do your business, and either re-boot or use init to switch to the desired new runlevel.
 
Old 08-13-2011, 03:38 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,522
Blog Entries: 2

Rep: Reputation: 4020Reputation: 4020Reputation: 4020Reputation: 4020Reputation: 4020Reputation: 4020Reputation: 4020Reputation: 4020Reputation: 4020Reputation: 4020Reputation: 4020
Arch starts its graphical environment with starting a display manager (like GDM, ...) as daemon in your rc.conf, if I remember correctly.
 
2 members found this post helpful.
Old 08-13-2011, 11:48 AM   #5
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 718

Rep: Reputation: 102Reputation: 102
TobiSGD is dead on. Just open /etc/rc.conf page down to the daemon section and delete gdm. Reboot and you are all set.
 
Old 08-13-2011, 12:29 PM   #6
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,203
Blog Entries: 23

Original Poster
Rep: Reputation: 279Reputation: 279Reputation: 279
@ jv2112

Indeed he is...in fact, putting an exclamation in front of it works just as well, that way I still know where I left my stuff , by the way, i needed that for something else: installing a video card...

Thanks for the heads-up though!

Thor
 
Old 08-13-2011, 01:13 PM   #7
MrCode
Member
 
Registered: Aug 2009
Location: Oregon, USA
Distribution: Arch
Posts: 864
Blog Entries: 31

Rep: Reputation: 148Reputation: 148
Quote:
Originally Posted by jv2112
Just open /etc/rc.conf page down to the daemon section and delete gdm. Reboot and you are all set.
…and this is why Arch's BSD-style init is so awesome (because it's simple).

Okay, so that wasn't very constructive, but I need a little more levity in my day…
 
Old 08-13-2011, 01:21 PM   #8
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,203
Blog Entries: 23

Original Poster
Rep: Reputation: 279Reputation: 279Reputation: 279
@ MrCode, hey, we all need this kinda moment...be welcome to this one!

@ tommylovell

Quote:
This is all assuming your system is using the traditional inittab startup. My Fedora15 system is now using 'systemd' for initialization
Well, it seems it does not...that was the confusion all along...Fedora did (does?) use this convention, I remember. Thanks though for the info.

Last edited by Thor_2.0; 08-13-2011 at 01:23 PM.
 
  


Reply

Tags
inittab, runlevels


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
Split a file, byte-wise, not character-wise. stf92 Linux - Newbie 4 11-17-2010 06:43 AM
Is it possible or wise to boot off a network drive? Ulysses_ Linux - Networking 5 10-13-2010 05:48 PM
how to Block a site in a Firewall or Router by Protocol wise & host wise. shahid khan Linux - Security 2 06-26-2009 04:13 PM
bandwidth allocation by user wise and ip wise basbosco Linux - Networking 1 11-12-2003 02:54 AM
oops - screwed up inittab, can't boot kaise Linux - General 3 03-13-2003 09:15 PM


All times are GMT -5. The time now is 01:21 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