LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Boot problem..... (https://www.linuxquestions.org/questions/linux-general-1/boot-problem-759283/)

ahmad2080 10-02-2009 04:34 PM

Boot problem.....
 
Hello..

I have fedora 11 installed on my pavilion HP notebook....

The problem is that I've messed with the modules of my VGA card (nvidia) trying to solve a problem related to "Desktop Effects"

Now, fedora is not booting.....it loads everything except some stuff related to "nvidia"

The system can boot if I changed the run level to 3 "No graphics"

So how can I run fedora back in runlevel 5???

How can I install the nvidia drivers??

Or the only solution is to reinstall linux??

Thanks in advance..

epilitimus 10-02-2009 05:32 PM

I know it's a little late now but whenever I make changes to my kernel I always make a backup of my kernel, set it as the default kernel, and then set up the "new" kernel as a boot option. I leave it that way until I am sure that the "new" kernel is working properly. Actually I have 3 kernels on my current machine, a builletproof kernel, the "known good" kernel, and the version I am currently playing with. I only mention all this because I have been where you are and learned to do this the hard way. So take my advice and before playing with the kernel learn to set up and manipulate your boot menu, it'll save you a lot of headaches. Though messing up the boot menu can cause a lot of them too so be careful.

Okay, enough patting myself on the back...

I'm assuming you are referring to the kernel level modules. You need to get to a text only console which the runlevel 3 should be doing. Log in as root and go to the source directory for the kernel (/usr/src/linux on my machine). From there you should be able to reconfigure, build, and deploy a new kernel with the correct modules.

You can also edit your xorg.conf file (in /etc/X11 here) and set it up to use a basic VGA display instead of the nvidia specific drivers. That way you can at least get back to a GUI interface. It'll look really nasty until you get your video system back up and running but it'll work. You can also use one of the text based X configuration utilities. I don't remember the command because I just edit the configuration by hand when I need to.

In regard to just reinstalling linux, that is always an option, but it's a lot like removing a splinter with a sledge hammer, and so should only be done as a last resort IMHO. In my experience if you can get a working keyboard and text console you can fix just about anything in linux as long as it isn't caused by bad hardware, and sometimes even then. You will learn a lot more by fixing it. And you can always do a full reinstall if you mess it up too bad.

sploot 10-02-2009 05:41 PM

Did you make kernel modifications? Or just option changes under Fedora?

ahmad2080 10-02-2009 05:54 PM

Thanks epilitimus for your reply....

I want to note that I do a lot of experiments on Linux kernel....and I have 6 kernels on my system. All of these kernels were installed by the Fedora's automatic update... and I was searching for a way to delete some of the OLD kernels.

However, before messing with the nvidia drivers, three kernels were working and three were down...
Now none of them works.....

You are telling me too: reconfigure, build, deploy kernels or to edit /etc/X11 to use basic VGA display....
The ideas are great, but the question is how?

I'm against installing a new copy of Linux and just forget about my problems....Yes, I'd like to get my hands dirty in this :)

and as you said " You will learn a lot more by fixing it" that's what I'm seeking here....

I have two questions here:
1) Out of the topic: How can I remove a kernel?? JJust navigate to /boot and delete the unwanted kernels??
2) How can I edit /etc/X11 to run a basic VGA driver?
3) How can I play with kernels? or deploy a new kernel with correct modules?

Thanks....

ahmad2080 10-02-2009 06:01 PM

@sploot

No I didn't modify the kernel (myself)..... I was just playing around with the VGA card....

I remember that on the web I've found some method to fix my Desktop Effects problem....

I believe that it installed another kernel on my system....Since then.....all kernels do not boot into the system.!

John VV 10-02-2009 06:53 PM

6 kernels ????
fedora , by default will save 3 . Unless you changed that setting

it is fixable BUT it might be quicker and way easier to reinstall fedora 11

ahmad2080 10-02-2009 07:04 PM

No.. I didn't change its settings..

I'd like to fix it.....if I couldn't, I'll reinstall it.

SharpyWarpy 10-02-2009 08:51 PM

You should reinstall. Then do a search in the hardware forum for installing nvidia drivers. I don't think your desktop effects problems had to do with nvidia drivers, but maybe it did. This can be a complex problem for a newbie, though. Reinstall and tackle something simpler first. And I don't mean replacing the kernel -- that can be a daunting task for a newbie, too.

ahmad2080 10-03-2009 08:45 AM

A newbie can't always be a newbie..... :)

I think this is a chance to increase my experience with linux....

I really would like to fix this problem....I know that it'll take time & effort, and I'm ready to do learn whatever I can...

I can boot into the system as I said by changing the runlevel to runlevel 3....

So what should I do??

epilitimus 10-03-2009 05:24 PM

First off I'm not familiar with fedora so other's comments may be more applicable. First a safety tip, you should get your hands on a live boot cd if you don't already have one. That way if you really muck things up you can boot from the CD, mount the HD and undo whatever you did. Also don't delete anything until you are sure you don't need it anymore, either rename it in place or move it to another directory.

I'm not sure how you could have changed the kernel without realizing it...what may have happened though is that you replaced the video card's kernel module, possibly with one that wasn't compatible with the kernel. Do a "dmesg | less" and read the listing carefully looking for anything having to do with your video card. That will be your best source of information regarding what the problem is. If it doesn't show up during a boot that gets you to a text console you should be able to find something in one of /var/log/{syslog|messages|debug}. These three may be really long files so starting at the end and reading backwards might help.

Quote:

Now, fedora is not booting.....it loads everything except some stuff related to "nvidia"
Specifics matter, until you know what the problem is you can't figure out how to fix it.

Since you asked...to remove kernels (be careful!!)...

1. You need to figure out what boot manager you are using. I've always used Lilo, but others should be similar. During the boot process right after the POST you should see a message giving the name of the boot manager. It may flash really quick so watch carefully. Most likely it's either Lilo or Grub.

2. Once you know the boot manager you need to find it's configuration file, probably in /etc. You should be able to edit it to remove the references to the kernels you want to remove. Man pages are your friend here so read the ones for your boot manager carefully so you know what the changes you make are doing. Make sure to leave at least one kernel.

3. Here's where my lack of knowledge of grub shows up. With lilo you then run lilo and it reinstalls itself per the configuration you specified in the configuration file.

4. Another change I would make is to set the default runlevel to 3, in /etc/inittab here. That way you can boot to a usable console while fixing things, and test the other runlevel as you go.

5. Once all that is done you should be able to reboot and end up in a text console. Now the fun begins...

6. Go to /boot and remove the kernels you don't want. Reboot under all remaining kernels to make sure you didn't get rid of the wrong ones. If you delete the kernels before reconfiguring your boot manager you may wind up with an expensive doorstop until you reinstall.

One thing you may find in the /boot directory are copies of the kernel configurations for each of the kernels. If so stash one for a kernel you know used to work. You can refer back to it when reconfiguring your kernel.

To edit the configuration for X...
1. Use your preferred console based text editor (purists will say vi, I prefer joe), there are probably several different ones on your system, to edit the file /etc/X11/xorg.conf or..

2. Run xorgconfig to generate the configuration file. The reason I don't use this one is that you have to go through all the configuration steps to change a single thing (very tedious).

To reconfigure the kernel...
1. Find the kernel source directory, at /usr/src/linux here (actually that is a symlink to the actual directory), if you don't have the kernel source then you didn't rebuild the kernel before. If you don't have a copy on your hard drive there should be one on the installation disks. If all else fails you can download it from kernel.org. Make sure the kernel source you get matches the kernel you are currently using (you can play with upgrading the kernel when you are more familiar with what you are doing). The reason the one form the installation CD is preferable is that if there are any third party drivers used y your system these will probably be available on the CD.

2. Once you have the source you have to configure it. I use "make menuconfig", but there are several. Whichever one you use work your way through the configuration and save the result. If you have the option (available in 2.6 kernels, not sure how far back it goes since I jumped from 2.2) set LOCALVERSION to something that won't conflict with any existing kernels, e.g. test, so your new kernel and modules won't overwrite anything already on your system.

3. do "make clean", can usually be skipped when tweaking but you may end up having to go back and do it anyway.

4. "make"..go get a drink of water, make a sandwich, etc. while your new kernel compiles.

5. now you have to install the kernel, this will depend on the boot manager you use..."make bzlilo" if you use Lilo. The makefile will install your kernel as /boot/vmlinuz so you should have your boot manager setup not to use this kernel as the default, which it probably does.

6. "make modules_install" to install the modules for the new kernel.

7. Cross applicable fingers and/or toes and reboot. If all goes well you should be able to boot your new kernel. If not reboot with your default kernel and figure out what you did wrong.


All times are GMT -5. The time now is 12:44 PM.