Link to home
Start Free TrialLog in
Avatar of jgarr
jgarr

asked on

Kernel Compilation

I'm screwing around with the kernel on my PC. I'm running redhat 6.2 and using xconfig to make the kernel. I was successful doing what I initially attempted to do (emulate SCSI Cdroms for my CDR drive so cdrecord would work), but I want to find out if there is a way to get the current kernel setup and import it into xconfig.

If there was a way to do this, I would be a little more confident in making changes to only what I wanted to change and not have to worry about forgetting to turn off SMP support, etc.

Any suggestions?

thanks in advance.
Avatar of olidel
olidel

Hi,

    You just have to find a file which is called .config in the directory where you compiled your kernel, so if you want to have the parameter of your original kernel, you must find a .config file in the kernel source of RH 6.2. You probably have a RPM which contains all that stuff e.g. kernel-source.

Hope this help.

Bye.
Avatar of jgarr

ASKER

I'll poke around for it and let you know if I succeed. Thanks
Okay, you are using RedHat, and they graciously include the configs for the kernels they ship. If you look in /usr/src/linux/configs you'll see several kernel config files for the various CPU types. To duplicate the stock kernel you'd use the i386 config. But, it makes more sense to pick the config file that matches your CPU type, as shown by 'uname -m'.

You can copy the appropriate file to where "make xconfig" can see it, or you can load the config into the xconfig tool. To copy it do:

chaos# cd /usr/src/linux
chaos# make mrproper
chaos# uname -m
i686
chaos# cp configs/kernel-2.2.19-6.2.7-i686.config .config
chaos# make xconfig
 don't worry about where is the original place where hold the config file. I think you just need to store the current configuration as a alternative config file to the folder you already know while you stay in xconfig. then you can modify any thing in the xconfig as you want and do your test.
when you wana restore back just need reload the alternative
config file at xconfig then all the reliable setting will be back. teh do what you want.
Avatar of jgarr

ASKER

Here's the problem. I have a machine that I installed a long while ago. I can run through xconfig or menuconfig, but I really don't recall everything that I added into the kernel way back then. But I liked the way it worked. I would like to be able to use the kernel config that I boot the machine with and make changes to that one. For example, I have APM on my kernel and while rebuilding the last time, SMP support was enabled (which breaks things). I wouldn't even have visited those sections of the config if hadn't had to start from scratch. I saved off the current one before I compiled it for next time, but there has to be a way to look at what I have.
Ideally you could take bzImage and run the sausage machine backwards to show what is in the compiled version for xconfig.

Netskywalker- I can't accept that as an answer because it doesn't answer the question. It does provide a way to maintain the kernel configs after you change them.
jlevie- Does red hat only use those kernels? Or will it let you make changes during the install that alter the kernel?



thanks
ASKER CERTIFIED SOLUTION
Avatar of jlevie
jlevie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jgarr

ASKER

Thanks, Jlevie.
I'm going to keep the question open for a couple of days to see if there is any other comments. If that's where I have to start, then thats what I'll do.

jgarr:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.