Booting to VGA or text mode without editing config file
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
"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
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.
"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:
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!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.