LinuxQuestions.org
Visit the LQ Articles and Editorials section
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
 
LinkBack Search this Thread
Old 06-05-2002, 06:39 PM   #1
IceNineJon
Member
 
Registered: Jun 2002
Location: Los Angeles, Ca, USA
Distribution: Mandrake 9.1
Posts: 82

Rep: Reputation: 15
Changing run levels in the bootloader


I'm using GRUB as my bootloader and I want to add a new item to the menu to allow me to boot into the console and not load X. My grub.conf file shows:
Quote:
title Red Hat Linux (2.4.9-31)
root (hd2,0)
kernel /boot/vmlinuz-2.4.9-31 ro root=/dev/hdd1 hdc=ide-scsi
initrd /boot/initrd-2.4.9-31.img
As the entry for my current boot. However, this defaults to runlevel 5 (X11). How can I add an additional entry to the menu to boot into runlevel 3 (ie. so I can choose between X11 or just the consule)?

Additionally, is there a way when I'm in KDE or X11 to shut it down and change to runlevel 3 without rebooting?

Thanks!,
Jon
 
Old 06-05-2002, 07:56 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 194Reputation: 194
not sure of anyway to specify different runlevels from a list like that but you can usually specify what runlevel you want to startup in at the lilo/grub prompt.

and you can use the command init 3 to get to runlevel 3.

Last edited by trickykid; 06-05-2002 at 09:00 PM.
 
Old 06-05-2002, 08:28 PM   #3
dangel
Member
 
Registered: Nov 2001
Location: atl
Distribution: redhat
Posts: 52

Rep: Reputation: 15
First off. To boot into a specific runlevel, edit the /etc/inittab file. You'll see a line similar to this:
---------------------------------
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
id:5:initdefault:
-----------------------------------
Just change 5 to whatever you want to boot into. In your case 3.
--------
Now for the second question. IF you have booted into runlevel 5 Log out of KDE, switch to a consolde by using cntl - alt - f1,
log in as root
and then type init 3. This will change your runlevels to just console mode.
 
Old 06-05-2002, 09:05 PM   #4
IceNineJon
Member
 
Registered: Jun 2002
Location: Los Angeles, Ca, USA
Distribution: Mandrake 9.1
Posts: 82

Original Poster
Rep: Reputation: 15
When I log out of KDE and switch run levels, what happens to the xserver? Does it shut down or does it stay running?
 
Old 06-05-2002, 11:33 PM   #5
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 194Reputation: 194
when you enter runlevel 3 it shouldn't start X, so it should end the process.
 
Old 06-06-2002, 12:11 AM   #6
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
You would add init=3 to the kernel line. Like this:

title Red Hat Linux (2.4.9-31) Runlevel3
root (hd2,0)
kernel /boot/vmlinuz-2.4.9-31 ro root=/dev/hdd1 hdc=ide-scsi init=3
initrd /boot/initrd-2.4.9-31.img

These four lines would be added to your grub.conf file.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
what are run levels in chkconfig tej Linux - Newbie 1 09-20-2004 01:15 AM
Noob Qns: Run Levels? (VMWare + Mandrake) nistelrooy Linux - Newbie 1 08-07-2004 07:35 AM
How to Change Run Levels walsht3108 Linux - Newbie 4 08-27-2003 02:43 PM
run control (rc) levels...a definition? nuzzy Linux - General 4 06-28-2002 02:28 PM
Changing Run Levels unclebyron Linux - General 1 01-28-2002 04:43 PM


All times are GMT -5. The time now is 04:16 AM.

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