LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-14-2004, 06:02 AM   #1
murphaph
Member
 
Registered: Mar 2004
Location: Dublin, Ireland.
Distribution: redHat 7.2
Posts: 36

Rep: Reputation: 15
Simple Kernel Compile Question.


Hey all,
I've just got a quick one concerning kernel compiling,
How do I save a config file from a known good and working kernel (2.4.7-10) and then load it into xconfig when compiling my new kernel (2.4.25) or is this even possible? The reason I ask is that I'm getting a few problems after booting my new kernel, things not working as they did (adsl in particular). I just need to remove one thing from the old kernel (pcmcia support) as I want to use pcmcia-cs externally you see, so the easiest thing for me to do is use the config from the perfectly working kernel and justremove that one little thing.

Thanks in advance guys, I know there'll be a solution.
 
Old 03-14-2004, 06:41 AM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
It's actually pretty easy.....In fact there are a couple of ways I can think of. The first way is using the make oldconfig command. In theory, that reads your current .config file and uses it. If there are any new settings not addressed by your current .config, it asks. The reason I say "in theory" is that I've been having a lot of trouble with make oldconfig and the 2.6.x series of kernels. It seems to import some, but not all, of my current settings. So that's why I usually go for approach number two. Both make menuconfig and make xconfig give you the option to save your config to a separate file and to read your config from a different file than .config. So I tend to keep a copy of my .config in my /usr/src directory and just have make menuconfig read that. When I'm done making any changes, I save both to the .config in the kernel directory and to my separate config file in /usr/src.
 
Old 03-14-2004, 07:05 AM   #3
murphaph
Member
 
Registered: Mar 2004
Location: Dublin, Ireland.
Distribution: redHat 7.2
Posts: 36

Original Poster
Rep: Reputation: 15
Thanks a lot hangdog,
One more thing though.....(newbie here)

What's the full path to the existing .config file (the working one the distribution installed) look like?

Can I just install the kernel source RPMs from the redHat CD (as i don't really need to update the kernel, just want to strip out pcmcia card services) and will the .config file be under /usr/src/linux-2.4.7-10/configs ?

Last edited by murphaph; 03-14-2004 at 08:25 AM.
 
Old 03-14-2004, 08:56 AM   #4
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
I'm not so sure about RH, but in Slackware the installation program drops the config file in /boot. Have a look there. Otherwise, you should always find it in your kernel source directory (since that is where the compiler would look) and I would assume that RH would provide the file used by their kernel. However, at least on my system, the .config file is in the top kernel source directory, not in the config directory. Since it is preceded by the . you have to use ls -a to see it.
 
Old 03-14-2004, 10:57 AM   #5
murphaph
Member
 
Registered: Mar 2004
Location: Dublin, Ireland.
Distribution: redHat 7.2
Posts: 36

Original Poster
Rep: Reputation: 15
Thanks again hangdog,

I'll give that a try when I get home this evening. I do know that the default RH installation (workstation type) does not install the source code for the kernel, as I had to install it myself last time I (re)compiled. Like I say, I'll take a look later and report on how it goes!
 
Old 03-15-2004, 05:48 PM   #6
murphaph
Member
 
Registered: Mar 2004
Location: Dublin, Ireland.
Distribution: redHat 7.2
Posts: 36

Original Poster
Rep: Reputation: 15
Good evening,
well, I didn't get arond to replying last night, cos it took a very long time to recompile all those modules!

Ok, the status is much better than last time. Here's how I stand:

Installed the kernel-source from CD and I tried 'make oldconfig' (did a bit of googling to make sure I was giving it the correct .config file!) and did all the other makes and everything seemed to go ok, save a couple of things I did notice at the end of 'make modules' and make modules_install' - I saw a couple of harmless(?) errors there at the end, though I'm sure I'm going to be told nothing is a harmless error! Anyways, it was late so I said I'd chance making the kernel image and away it went. It compiled without reporting errors. Fine, so I edited LILO and she booted into the new kernel, BUT: I got three 'unresolved symbols' errors upon booting. These are:

Mar 15 22:05:04 localhost depmod: *** Unresolved symbols in /lib/modules/2.4.7-10custom/kernel/abi/cxenix/abi-cxenix.o
Mar 15 22:05:04 localhost depmod: depmod: *** Unresolved symbols in /lib/modules/2.4.7-10custom/kernel/abi/ibcs/abi-ibcs.o
Mar 15 22:05:04 localhost depmod: depmod: *** Unresolved symbols in /lib/modules/2.4.7-10custom/kernel/abi/sco/abi-sco.o

I did read PRIOR to compiling that I should move the /lib/modules/2.4.7-10 (my distribution kernel) into /lib/oldmodules/ which i did, or I thought i did but on reflection I think I actually typed: cp /lib/modules/2.4.7-1 /lib/oldmodules without the '/' at the end..............would this make a difference and is there anything I can do about it?

At least this is being written in Mozilla, not IE6, on my booting custom kernel with my working ADSL so thanks for your help on all of that hangdog. If yourself of anyone else can help me 'tidy things up' around here (I don't like seeing error messages on boot) I'd genuinely appreciate it. Thanks again.

Last edited by murphaph; 03-15-2004 at 05:49 PM.
 
Old 03-15-2004, 06:23 PM   #7
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
I'm pretty sure that you can solve the problem by a careful combing of the kernel configuration, but I have no idea where to look. This thread suggests that those modules are needed to run Unixware and SCO binares.......which probably means you don't need them. It also appears to be a hold-over from the 2.2.x kernels. I just grepped my 2.6.3 config file and there is no mention of ibcs, so it may have been yanked.

As for you oldmodules problem, if you created the oldmodules directory before copying, the old modules should be there. Just go have a look and see. However, the best approach is simply to start tweaking your custom kernel until the dependancy problems are solved.


And congrats on compiling your kernel. It is the first step towards a genuine addiction
 
Old 03-16-2004, 03:49 PM   #8
murphaph
Member
 
Registered: Mar 2004
Location: Dublin, Ireland.
Distribution: redHat 7.2
Posts: 36

Original Poster
Rep: Reputation: 15
the kernel booted cleanly second time around, don't ask me-I'm new here!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
A simple question:how to compile java applet in linux? nickhx Programming 5 08-11-2004 04:11 AM
Simple kernel question zalmox Programming 4 04-20-2004 12:33 AM
simple kernel compile question Zerodark Slackware 2 09-08-2003 11:23 PM
Need a SIMPLE CONFIG file for Kernel compile bongski55 Linux - Newbie 1 09-02-2003 09:54 AM
Slack9-simple kernel compile question? BearClaw Slackware 4 06-16-2003 12:36 PM


All times are GMT -5. The time now is 04:09 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration