LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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
 
Search this Thread
Old 02-09-2004, 05:50 PM   #1
mattman1081
LQ Newbie
 
Registered: Feb 2004
Location: Berkeley, CA - USA
Distribution: Fedora Core
Posts: 7

Rep: Reputation: 0
Booting to VGA or text mode without editing config file


I've been a Windows user for many years and decided to take a stab at Linux/Open Source. I downloaded and installed Red Hat 9.0, and am now in a dual boot configuration with Windows XP Pro and RH9.0. The problem is, it turns out I have a hardware incompatability that results in the RH boot being successful, but all I can see is a blank screen. I have an Nvidia Geforce FX5200 video card, which is not supported by RH 9.0 (I guess I should have checked that out beforehand!).
Nvidia has a driver update that I've downloaded from their website, but I cannot install it, because I can't see what I'm doing (I haven't even seen the GUI interface yet!). I think I can install the driver if I can just boot into VGA or text mode, but I'm not sure how to do this. Apparently, if I could boot into Runlevel 3, rather than 5, this will put me into text mode, but I have to edit a config file that I can't see!

Is there a keystroke or keystroke combination or something that I can press to specify the runlevel during the boot sequence, without manually editing the config file? Or is there some other option?

Thanks for any help you can provide.
 
Old 02-09-2004, 06:20 PM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,472

Rep: Reputation: 154Reputation: 154
"Is there a keystroke or keystroke combination or something that I can press to specify the runlevel during the boot sequence, without manually editing the config file? Or is there some other option?"

One way to do this is to use a rescue CD to edit the runlevel. Boot your Red Hat install CD and go into rescue mode. Then mount your Linux / parttion with something like the following:

mkdir /canary
mount -t ext3 /dev/hda3 /canary

Then edit /canary/etc.inittab
In inittab change:
id:5:initdefault:
to:
id:3:initdefault:

Then remove the rescue CD and:
umount /canary
shutdown -r now

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites
 
Old 02-09-2004, 11:00 PM   #3
mattman1081
LQ Newbie
 
Registered: Feb 2004
Location: Berkeley, CA - USA
Distribution: Fedora Core
Posts: 7

Original Poster
Rep: Reputation: 0
The rescue mode from the installation CD has allowed me to access a shell prompt and access to the file system. However, the "edit" command gives the response, "not a valid command." I can view "/etc/inittab," but I can't do anything with it.

Any suggestions?
 
Old 02-09-2004, 11:01 PM   #4
mattman1081
LQ Newbie
 
Registered: Feb 2004
Location: Berkeley, CA - USA
Distribution: Fedora Core
Posts: 7

Original Poster
Rep: Reputation: 0
Clarification:

I can see "/etc/inittab" in the file system (when I use the "dir" command in the /etc directory), but I can't do anything with it.
 
Old 02-10-2004, 10:24 AM   #5
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,472

Rep: Reputation: 154Reputation: 154
"I can see "/etc/inittab" in the file system (when I use the "dir" command in the /etc directory), but I can't do anything with it."

You are looking at /etc/inittab on the rescue system. Since it is on a CD it is read only. You want to edit the /etc/inittab which is installed on your hard drive. So you need to know which partition is your / partition (I will assume /dev/hda3) and what type of file system / is (I will assume ext3). Then you can list your /etc/inittab like this.

mkdir /canary
mount -t ext3 /dev/hda3 /canary
less /canary/etc/inittab
You exit less by typing in q

Then you can edit /etc/inittab with vi or some other editor:

vi /canary/etc/inittab

or

ed /canary/etc/inittab

Neither vi nor ed is very user friendly. Here is a vi tutorial:

http://www.eng.hawaii.edu/Tutor/vi.html

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites

Last edited by jailbait; 02-10-2004 at 10:29 AM.
 
Old 02-10-2004, 05:02 PM   #6
mattman1081
LQ Newbie
 
Registered: Feb 2004
Location: Berkeley, CA - USA
Distribution: Fedora Core
Posts: 7

Original Poster
Rep: Reputation: 0
The rescue mode I use mounts my system to /mnt/sysimage. I was able to edit "inittab" using the VI editor (thanks to Steve) in the /mnt/sysimage/etc/ directory and then used the command "chroot" to change root to /mnt/sysimage. Upon reboot, the system booted into runlevel 3.

Thanks for the help.

Just for anyone having the same difficulty, here was my process:

Boot linux into rescue mode using the installation CD and typing "linux rescue" at the "boot:" prompt.
When you get the shell prompt, navigate to "/etc/inittab" (or wherever your system has been mounted. In my case, it was mounted to "/mnt/sysimage". The rescue mode startup should tell you where it is).
Edit inittab using "vi /etc/inittab"
Change default runlevel to 3.
Reboot.
Login as root.
Do what you need to do.

You are reading this post written under my slick new Mozilla Web Browser!
 
Old 02-10-2004, 08:36 PM   #7
redhatman
Member
 
Registered: Feb 2004
Location: Canada
Distribution: FC2
Posts: 63

Rep: Reputation: 15
If you are using grub, you can boot to text mode by clicking 'e' to edit at the grub splash screen while selecting the kernel you want to boot to.

Then with the line similar to the following highlighted, click 'e' to edit it:

kernel /vmlinuz-2.4.20-8smp ro root=LABEL=/

Change the line so it reads something like

kernel /vmlinuz-2.4.20-8smp ro root=LABEL=/ single

Then click 'b' to boot.

There is no need to change this back afterwards. Next time you boot it will go back to normal. Note that this only works for grub.

Chris DeGroot
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Booting in text mode versus graphics mode LChalupa Linux - Newbie 3 01-15-2005 07:53 PM
Editing text file in Shell - Konsole (SuSE 9.1) Ree Linux - Newbie 5 10-03-2004 11:48 AM
Editing text file for import to a spread/database Franklin Programming 7 03-31-2004 06:31 AM
Some techniques for text file editing ganninu Programming 17 10-09-2003 05:34 PM
Editing a text file in shell Lotmr Linux - Software 5 06-24-2003 12:12 PM


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