LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Booting to VGA or text mode without editing config file (https://www.linuxquestions.org/questions/linux-newbie-8/booting-to-vga-or-text-mode-without-editing-config-file-144211/)

mattman1081 02-09-2004 05:50 PM

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.

jailbait 02-09-2004 06:20 PM

"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

mattman1081 02-09-2004 11:00 PM

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?

mattman1081 02-09-2004 11:01 PM

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.

jailbait 02-10-2004 10:24 AM

"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

mattman1081 02-10-2004 05:02 PM

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!

redhatman 02-10-2004 08:36 PM

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


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