GIDForums  

Go Back   GIDForums > Computer Forums > Computer Software Forum - Linux
User Name
Password
Register FAQ Members List Calendar Today's Posts
 
 
Thread Tools Search this Thread Rating: Thread Rating: 3 votes, 4.67 average.
  #1  
Old 28-Nov-2003, 23:47
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,370
JdS will become famous soon enough

How to boot Linux in text mode with GRUB Loader


If like me, you use GRUB, the multiboot boot loader installed with your Linux Red Hat 9 and you would like to boot into Linux in TEXT mode, here's what I recently found out...

When GRUB loads up and offers it's usual menu of Operating Systems to boot into, select the one for Linux Red Hat 9; e.g.
Red Hat Linux(2.4.nn-n)

Once highlighted, hit e on your keyboard to 'edit' this option.

You will see 3 lines (well, on my own setup at least):
root (hd1,5)
kernel /vmlinuz-2.4.nn-n ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.nn-n.img

Select the 2nd line in the example above, i.e. the one with the kernel /vmlinuz... and hit the e key once again (to edit)...

Now you should be able to edit this line and this is exactly what you want to do; add the word single to the end of this line e.g.
kernel /vmlinuz-2.4.nn-n ro root=LABEL=/ hdc=ide-scsi single
and hit Enter.

Finally hit the b key on your keyboard to boot into Linux...

Just as soon as the boot process completes, the cursor stops at a prompt that looks like this on my machine:
sh-2.05b#

That's IT, you're now in text mode... or single mode!

Once you're done with what you've planned to do, just type exit to resume the boot into Linux in Graphical / Multi User mode.
__________________
J de Silva

GIDApp | GIDBlog | GIDForums | GIDNetwork | Learning Journal
  #2  
Old 20-Apr-2006, 09:13
fred slater fred slater is offline
New Member
 
Join Date: Apr 2006
Posts: 2
fred slater is on a distinguished road

Re: How to boot Linux in text mode with GRUB Loader


My problem is that I've installed all the graphical interfaces but it boots (grub) to text mode. How do you get to GUI from text on a new installation? Background; in the previous installation I had selected to boot in text mode; reformatting left / intact, and it looks like it kept the text mode boot setting even though I specified otherwise (GUI - gnome) in the new install. Old version of red hat linux (7.2)

Is there a way to edit the kernel string on boot to do the multi user boot?
  #3  
Old 20-Apr-2006, 09:23
admin's Avatar
admin admin is offline
Administrator
 
Join Date: Sep 2002
Posts: 1,052
admin will become famous soon enough

Re: How to boot Linux in text mode with GRUB Loader


What good timing! I am just struggling with my Linux server, compiling my first kernel from source and messing about with the grub loader.

Paste what you have inside /boot/grub/grub.conf?
__________________
Custom BB codes you can use here:
[HTML] | [C++] | [CSS] | [JAVA] | [PY] | [VB]
  #4  
Old 20-Apr-2006, 10:34
fred slater fred slater is offline
New Member
 
Join Date: Apr 2006
Posts: 2
fred slater is on a distinguished road

Re: How to boot Linux in text mode with GRUB Loader


#boot= /dev/hda
default=0
timeout=10
splashimage=(Hd0,0)
kernel /vmlinuz-2.4.7-10 ro root=dev/hdb3 hdd=ide-scsi
initid /initid-2.4.7 -10.img
  #5  
Old 20-Apr-2006, 11:06
crystalattice's Avatar
crystalattice crystalattice is offline
Aspiring author
 
Join Date: Apr 2004
Location: Japan (again)
Posts: 1,671
crystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nice

Re: How to boot Linux in text mode with GRUB Loader


I'm probably wrong in this, since I haven't had to mess with GRUB for several years. But to normally start a GUI, for example KDE, you would type in startkde on the command line. Would you be able to add this to the GRUB info, maybe on a separate line or on the "vmlinuz" line?
__________________
Start Programming with Python-A beginner's guide to programming and the Python language.

Interested in pen & paper role playing games from the "golden age" of gaming? Visit Old School Role-Playing Games
  #6  
Old 20-Apr-2006, 12:00
dsmith's Avatar
dsmith dsmith is offline
Senior Member
 
Join Date: Jan 2004
Location: Utah, USA
Posts: 1,351
dsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of light

Re: How to boot Linux in text mode with GRUB Loader


This isn't really anything to do with grub.

This is a boot level setting. In my install (slackware) there is a file called /etc/inittab that has a default runlevel setting.

3 is multiuser (text mode)
4 is to boot into graphical mode.

I always use 3 until I am sure that I have my system running properly and the type in startx to start my X-Windows.

If you are in 4 (gui) and need to get to a text window, it is generally left under term 6 (ctrl-alt-F6).

If you tell us what flavor you are running I may be able to help more specifically.

Good luck!
  #7  
Old 06-May-2006, 21:41
blank blank is offline
Junior Member
 
Join Date: May 2005
Posts: 39
blank is on a distinguished road

Re: How to boot Linux in text mode with GRUB Loader


It's possible to add an entry for this all on its own in /boot/grub/menu.lst right?
  #8  
Old 10-Jul-2006, 16:31
fhj52 fhj52 is offline
New Member
 
Join Date: Jul 2006
Posts: 13
fhj52 is on a distinguished road

Re: How to boot Linux in text mode with GRUB Loader


@blank
Yes, one can add an entry into menu.lst so the 'single' is always available.
Problem there is that init 1(single) is root only access and last time I checked, GRUB does not care if the user has proper authorization to access init 1 = there is no login = you are automatically in as system's god. ::Not a good thing if there is any chance at all that someone else can access your system. (little hands can make BIG mistakes...)

@crystalattice
Your correct that it is a boot parameter but it is not done in grub or lilo. One could also use startxfce, startgnome, starticewm, etc... rather than startkde. If interested look at xinitrc and follow it around the system ... like dubugging code. (usually found @ /etc/X11/xinit/xinitrc )

@General
I'm not sure what the goal is but for System V there are 7 runlevels. Runlevel 0 and 6 are used for halt and reboot, respectively. Runlevel(RL) 3 is text mode and RL 5 is graphical mode. Nobody uses the 2 & 4 except as bridges, AFAIK.
The "single" is RL 1 also known as init 1. Generally, it is worthless unless there are big problems because virtually nothing is loaded. The "text mode" is runlevel 3, i.e., init 3, and that is what you genrally need to run in text mode because other than X and related X-only programs, everything gets loaded; e.g., networking and even GPM for mouse support...
If you boot to single, at the prompt type
Code:
telinit 3
(using ' init 3 ' might work on your system too...).
Trust me - runlevel 3( init 3 ) is much better than init 1 for normal usage; not only that but many programs require Runlevel 3 in order to function properly. E.g., one cannot run the nVidia installer from either RL 1 or RL 5.

What gets loaded into what runlevel is determined by how the services are config'd but runlevel services are pretty standardized across distros. Servers typically run in text mode(init 3) because X is a known security risk due to the number of different ways someone can access it. All GUI programs("clients") need runlevel 5 with some kind of graphical server(XFree/Xorg, etc...).

IIRC, appending " 3 " to the kernel image line will stop at RL 3.
E.g.,
Code:
kernel /vmlinuz-2.4.nn-n ro root=LABEL=/ hdc=ide-scsi 3
...

Tip:
If you are already in X, use the CTRL-ALT-F1 key combo to get to a console, login and type su, enter root password, then telinit 3 (as shown above).
So long X, hello text: Voila!
(be sure to logout as root so nasty little mistakes won't kill the system)

c-ya

PS: JdS, Shame, shame, shame on you for running as root.
__________________
There's a new GPL proposed. Read & comment: http://gplv3.fsf.org/
  #9  
Old 11-Jul-2006, 04:41
fhj52 fhj52 is offline
New Member
 
Join Date: Jul 2006
Posts: 13
fhj52 is on a distinguished road

Re: How to boot Linux in text mode with GRUB Loader


BTW, telinit 5 will take you back to RL 5(login) if you switched to do something in RL 3. Don't forget to go back and logout on the console(you are still logged-in even after login to KDE/Gnome/XFCE/whatever...)...

And, the " 3" at the end of the kernel line still works to boot to text mode. Just checked ...
 



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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing monitors on a Linux machine JdS Computer Software Forum - Linux 10 23-Dec-2004 10:49

Network Sites: GIDNetwork · GIDApp · GIDBlog · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 05:19.


vBulletin, Copyright © 2000 - 2018, Jelsoft Enterprises Ltd.

Warning: mysql_real_escape_string(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /gidstuff/other/BadBot.inc.php on line 403

Warning: mysql_real_escape_string(): A link to the server could not be established in /gidstuff/other/BadBot.inc.php on line 403

Warning: mysql_real_escape_string(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /gidstuff/other/BadBot.inc.php on line 416

Warning: mysql_real_escape_string(): A link to the server could not be established in /gidstuff/other/BadBot.inc.php on line 416

Warning: mysql_real_escape_string(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /gidstuff/other/BadBot.inc.php on line 421

Warning: mysql_real_escape_string(): A link to the server could not be established in /gidstuff/other/BadBot.inc.php on line 421