LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 09-27-2003, 09:48 PM   #1
sabaka
LQ Newbie
 
Registered: Sep 2003
Location: Baltimore, MD, USA
Distribution: RedHat 9.0
Posts: 29

Rep: Reputation: 15
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.

I have RedHat 9.0 and kernal 2.4.20-6

PS. For better explanation of my problem go here http://www.linuxquestions.org/questi...threadid=94844
 
Old 09-28-2003, 09:00 AM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
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.
 
Old 09-28-2003, 09:47 AM   #3
sabaka
LQ Newbie
 
Registered: Sep 2003
Location: Baltimore, MD, USA
Distribution: RedHat 9.0
Posts: 29

Original Poster
Rep: Reputation: 15
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.
 
Old 09-28-2003, 10:37 AM   #4
sabaka
LQ Newbie
 
Registered: Sep 2003
Location: Baltimore, MD, USA
Distribution: RedHat 9.0
Posts: 29

Original Poster
Rep: Reputation: 15
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.

Configuration failed

make: *** [config] Error 1
------------------------

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.
 
Old 09-28-2003, 10:49 AM   #5
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
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

and see if that link solves the problem.

Last edited by Hangdog42; 09-28-2003 at 10:52 AM.
 
Old 09-28-2003, 12:54 PM   #6
sabaka
LQ Newbie
 
Registered: Sep 2003
Location: Baltimore, MD, USA
Distribution: RedHat 9.0
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
<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.

Last edited by sabaka; 09-28-2003 at 12:55 PM.
 
Old 09-28-2003, 01:06 PM   #7
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
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.
 
Old 09-28-2003, 06:11 PM   #8
sabaka
LQ Newbie
 
Registered: Sep 2003
Location: Baltimore, MD, USA
Distribution: RedHat 9.0
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
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.

Last edited by sabaka; 09-28-2003 at 06:13 PM.
 
Old 09-29-2003, 03:28 PM   #9
sabaka
LQ Newbie
 
Registered: Sep 2003
Location: Baltimore, MD, USA
Distribution: RedHat 9.0
Posts: 29

Original Poster
Rep: Reputation: 15
Results of ls -s /usr/src and ls -l /usr/src/linux
[root@localhost src]# ls -l
total 12
drwxr-rx-x 2 root root 4096 Jan 24 2003 debug
lrwxrwxrwx 1 root root 14 Sep 29 15:54 linux -> linux-2.4.20-6
drwxr-xr-x 16 root root 4096 Sep 29 15:53 linux-2.4.20-6
drwxr-xr-x 7 root root 4096 Sep 21 22:13 redhat

[root@localhost linux]# ls -l
total 948
drwxr-rx-x 19 root root 4096 Sep 29 15:53 arch
drwxr-rx-x 2 root root 4096 Sep 29 15:53 configs
-rw-r--r-- 1 root root 18691 Aug 2 2002 COPYING
-rw-r--r-- 1 root root 16237 Feb 27 2003 COPYING.modules
-rw-r--r-- 1 root root 79913 Feb 27 2003 CREDITS
drwxr-rx-x 4 root root 4096 Sep 29 15:53 crypto
drwxr-rx-x 31 root root 4096 Sep 29 15:53 Documentation
drwxr-rx-x 45 root root 4096 Sep 29 15:53 drivers
drwxr-rx-x 47 root root 4096 Sep 29 15:53 fs
drwxr-rx-x 27 root root 4096 Sep 29 15:53 include
drwxr-rx-x 2 root root 4096 Sep 29 15:53 init
drwxr-rx-x 2 root root 4096 Sep 29 15:53 ipc
drwxr-rx-x 2 root root 4096 Sep 29 15:53 kernal
drwxr-rx-x 4 root root 4096 Sep 29 15:53 lib
-rw-r--r-- 1 root root 43544 Feb 27 2003 MAINTAINERS
-rw-r--r-- 1 root root 20471 Feb 27 2003 makefile
drwxr-rx-x 2 root root 4096 Sep 29 15:53 nm
drwxr-rx-x 30 root root 4096 Sep 29 15:53 net
-rw-r--r-- 1 root root 14239 Aug 2 2002 README
-rw-r--r-- 1 root root 2815 Aug 6 2001 REPORTING-BUGS
-rw-r--r-- 1 root root 9217 Feb 27 2003 Rules.make
drwxr-rx-x 4 root root 4096 Sep 29 15:53 scripts
-rw-r--r-- 1 root root 686244 Feb 27 2003 tmp_include_depends

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.

Last edited by sabaka; 09-29-2003 at 03:34 PM.
 
Old 09-29-2003, 05:05 PM   #10
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
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?
 
Old 09-29-2003, 08:29 PM   #11
sabaka
LQ Newbie
 
Registered: Sep 2003
Location: Baltimore, MD, USA
Distribution: RedHat 9.0
Posts: 29

Original Poster
Rep: Reputation: 15
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.
 
Old 09-30-2003, 03:18 PM   #12
sabaka
LQ Newbie
 
Registered: Sep 2003
Location: Baltimore, MD, USA
Distribution: RedHat 9.0
Posts: 29

Original Poster
Rep: Reputation: 15
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.
 
Old 10-01-2003, 07:20 AM   #13
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
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.
 
Old 10-04-2003, 10:00 AM   #14
sabaka
LQ Newbie
 
Registered: Sep 2003
Location: Baltimore, MD, USA
Distribution: RedHat 9.0
Posts: 29

Original Poster
Rep: Reputation: 15
How I did this:

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.
 
  


Reply



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
Kernal modules on a Newly Compiled Kernal sethgeekx86 Slackware 4 05-03-2004 11:08 PM
Suse 9 Kernal Version location taic Linux - General 3 01-13-2004 09:04 AM
Help! Configuring Kernal failed, GRUB can't boot new kernal, help! sabaka Linux - Newbie 4 09-16-2003 09:12 PM
How to check kernal version? C1Plus Linux - Newbie 4 09-08-2003 01:34 PM
Kernal Version lackluster Linux - Newbie 9 05-14-2002 04:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:42 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration