How do you configure the kernal, overwriting the old version of the same kernal?
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.
How do you configure the kernal, overwriting the old version of the same kernal?
Hey all.
I like the whole linux thing but I am not very happy right now. I have spent the last 2 weeks trying to reconfigure the kernal over and over. After about 9 failed attempts, I almost gave up (and maybe soon will).
I need help!
To have internet access through my WLAN USB card, I need to install the www.wlan-linux.org driver. To install this driver I need to "configure my kernal".
I have tried every guide and thread relating to this, as well as posting previous "help me" threads, but no one replies to me.
----QUESTION----
How can I make a new kernal of the same version as before. Currently, my RedHat uses 2.4.20-6. The only source code I have is for 2.4.20-6 (same). I have no more will to patch, I need to configure a new version of the same currently running kernal.
----FAILED ATTEMPT ONE----
If I try to configure and call my NEW KERNAL '2.4.20-6' I get horrible errors and problems, because I kill the current kernal while making the new one, preventing me from finished the damn process.
----FAILED ATTEMPT TWO----
If I try to call my NEW KERNAL something like '2.4.20-6custom' and follow all the damn instructions, I end up with this following error after rebooting and GRUB trying to start my RedHat with my new kernal:
------------------------
Boot 'RedHat Linux (2.4.20-6)'
root (hd0, 0)
Filesystem type is ext2fs, partition type 0x83
kernal /vmlinuz-2.4.20-6 ro root=LABEL=/ hdc=idc-scsi
[Linux-bzImage, setup=0x1400, size=0x10f581]
initrd /initrd-2.4.20-6.img
Error 24: Attempt to access block outside partition
Press any evil key to continue
------------------------
Funny, I called my new kernal '2.4.20-6custom' but GRUB refers to it as '2.4.20-6' (in vmlinux, initrd, etc.)
Please please please try to help me. This should be simple to do. I need to CONFIGURE A NEW VERSION OF THE SAME KERNAL.
OK, first off it would be helpful if you didn't keep starting new threads on the same problem. The people who have been trying to help you have probably lost you because you've been doing this. Second, the "no one replies" isn't true. As far as I can tell, only one of your threads on this has gone unanswered.
OK, now onto your problem. From trudging through your old threads, it looks like you are tripping on the make config step. There is going to be one of two solutions to this. First, boot your computer from a working kernel. Then, go into your kernel source directory and type make mrproper to clean out the old stuff you've done, and then type make oldconfig. This should take the configuration from the currently working kernel and apply it to the source code.
Now here is the kicker. If you read the instructions on the linux-wlan site, you'll see you don't actually have to compile the new kernel. You just have to have the current configuration file in with the source code. make oldconfig will have hopefully taken care of that. So now all you have to do is follow the instructions for compiling the wlan drivers, namely get into the directory with the wlan drivers and type make config. Once you've answered the questions you type make all and then su to root and type make install.
The second approach to solving this is more problematic. The issue is that with all of the failed kernel compiles you've had, the kernel config file may be goofed up. If the first approach doesn't work, you're going to have to slog through configuring your kernel. Instead of typing make oldconfig you would type either make xconfig (if you are in a GUI) or make menuconfig (if you are not in a gui). Forget about make config. Once you have typed one of those two commands, you should see a window that has a bunch of buttons on it. You're going to have to go through each button and configure each one so that it matches your hardware. Once you've done that, you would save the configuration and go on to compile the wlan drivers. If you need to follow this approach, it might actually be easier to re-install RH and try the make oldconfig approach from a clean slate.
Thank you very much. I am sorry for exaggerating the reply thing, I was simply getting really frustrated by all this stuff. I will try your advice. Thanks much, and sorry again.
Ok. I tried this. And NO success . I tried both 'make oldconfig' and 'make xconfig', but it failed both times in the same way.
After configuring the kernal (first mrproper then either oldconfig or xconfig), I ran 'make config' for the WLAN-LINUX drivers. Everything went fine until I reached the "Enter Linux Source Driectory [/usr/src/linux]" (the step, which before, was the last one I could do, it used to fail on 'make install'). After pressing enter (yes to this question) I recieved this error message:
--------------------
Linux source tree /usr/src/linux is incomplete or missing!
The kernal header files are present, but not the full source code.
See the HOWTO for a list of FTP sites for current kernel sources.
I recieved the same error with 'make oldconfig' and 'make xconfig'. Both old configuration and new configuration produce the same error. I even reinstalled my source several times (from add/remove software).
Whats wrong???? Why doesn't the linux-wlab driver like my current kernal configuration or a brand new configuration. I followed the wlan-linux README very closely.
PS. Thanks for the help but I am still confused as to WHY configuring the source code (of the same version as the current running kernal) and installing my new kernal failed before. Don't answer this, it is too much extra info that I will try to figure out AFTER I get the internet on my linux computer.
Linux source tree /usr/src/linux is incomplete or missing!
The kernal header files are present, but not the full source code.
OK, this looks like you haven't installed the full source code for the kernel.
<edit>
Actually, on further reading, it is possible that you just aren't giving make config the proper directory. If you look in your /usr/src directory, you probably have something like linux-2.4.20. THAT is what you want to type into the make config question, not just /usr/src/linux. The other way to do this would be to make a link as I describe below
</edit>
So, you either have to get the RPM containing the kernel source code from RH or you need to go to kernel.org and download the .tar.bz2 for 2.4.20 (probably the better solution). If you do get the tar.bz2, copy it to /usr/src and unzip it with tar xjvf filename.tar.bz2
That should give you a directory in /usr/src called linux-2.4.20. Drop down into that directory and do the make oldconfig and then try to compile your drivers.
If you are getting the same error message, do this: ln -s /usr/src/linux2.4.20 /usr/src/linux
<edit>
Actually, on further reading, it is possible that you just aren't giving make config the proper directory. If you look in your /usr/src directory, you probably have something like linux-2.4.20. THAT is what you want to type into the make config question, not just /usr/src/linux. The other way to do this would be to make a link as I describe below
</edit>
No. Before doing anything I did this command ln -s /usr/src/linux2.4.20 /usr/src/linux.
Quote:
So, you either have to get the RPM containing the kernel source code from RH or you need to go to kernel.org and download the .tar.bz2 for 2.4.20 (probably the better solution).
I will try this. But it seems sort of funny for me. I bought RedHat 9.0 for $50 US at my local store. The source code I am using is DIRECTLY (unpatched and untampered with) from the Linux CD #2 (installed through Add/Remove program AND directly from CD duing initial install [many reformats] ). I will download the source code as soon as possible and try to redo all this. But I still don't understand why the source code form the CD work wouldn't work. Oh well.
I agree that the full source code should, and probably is, on the RH CD, and it should work perfectly fine. But for some reason, the driver make config isn't finding it, or isn't able to recognize it for what it is. I suppose it could be a permissions issue, but usually that results in a different error message than you are seeing.
Do me a favor will you? Next time you post, post the results of a ls -l /usr/src and ls -l /usr/src/linux.
Do me a favor will you? Next time you post, post the results of a ls -l /usr/src and ls -l /usr/src/linux.
I will do this. And thank you for all the help and replies. I am very busy tonight. I will try to configure with newly downloaded source code and post the results of a ls -l /usr/src and ls -l /usr/src/linux tomorow (9-28-03). I will try very hard to reply tomorow. Thanks for the help so far.
NOTE: mistake, replace ALL drwxr-rx-x with xr
I had to write this output by hand
How does this look? This is of my brand new /usr/src AND /usr/src/linux. I erased the old modified version and added, via Add/Removed Software, this current stuff.
It looks like you've got everything and your sym link looks like it is correct as well. So does this change anything or are you still getting errors from your driver make config?
Hmmm. I will try the WLAN driver make config one more time ASAP (probably tomorow 9-30-03). Sorry, but I really have no time recently. Tomorow is my only free time.
IF THIS make config fails I will most definitely reformat the HD and reinstall everything cleanly and try to install the driver ONE LAST TIME.
If it fails that time, I will probably be very sad .
But anyway, thanks for all the time and help Hangdog42.
IT WORKED!! WOOOHOOOO !!!! The driver compiled, and I am configuring it as I type. Thanks so much Hangdog42. Sorry I was so stupid for so long. Thanks much for all the help.
Glad it worked! And don't feel stupid. Like any other OS, Linux takes a little time to learn. Heck, I've been using it for about a year now and I still feel like a newbie most of the time!
And I'd like to ask one final favor....Could you post a brief summary of what you did that worked? Somewhere out there is someone else having the same problem that you did and if they stumble onto this thread it would be nice to have the answer.
Before I say what or how I did anything, I would like to explain why.
Why
My main reason for having to do ANYTHING with the kernal was the fact that the www.linux-wlan.org driver for my Linksys WLAN WUSB 2.5 (to get internet access) required me to have a "configured kernal".
How
At first, I thought that configured meant configured and installed (a brand new custom kernal). After many failed attempts of trying to make a new kernal and boot it up, I turned to these forums for help. With the help of Hangdog42 I realized that to install the WLAN drivers I wanted I DID NOT NEED TO REINSTALL A KERNAL, just configure it (so I have a .conf file in my /usr/src/linux folder, which is configured for my CURRENT kernal). In the /usr/src/linux foldier I entered the command (via the Terminal) make oldconfig (instead of my earlier attempts at 'make xconfig'). After watching some beautifully confusing text scroll down my Terminal screen it was finished. I then CHANGED DIRECTORY to the foldier that has the SOURCE CODE FOR MY WLAN DRIVER. In there I did make config and followed the instructions (of the driver and readme). What you do here is different for everyone, depending on your card and network settings. Sorry I can't help anymore (I am actually still a little confused at this step). Good luck.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.