Where can I see current kernel config?
I'm yet another Linux newbie and I'm having trouble discovering how to find out what the default kernel settings are on RedHat's 7.2 distro of kernel 2.4.7-10.
I went to www.linuxiso.org and burned the 2 Redhat 7.2 cd's from their .iso images. Next, I loaded this version of Linux onto my machine. It recognized all my hardware and everything works fine. However, I'm planning on adding an asynchronous multiport serial card (one from Cyclades) and I wanted to make sure support for this card is enabled in the kernel. Immediately after installing from the cd's I burned, I don't see any .config file from which to examine the kernel properties (that only appears after I install the kernel source and then run make xconfig or make menuconfig and then, I assume, it only reflects the defaults of the kernel source I just installed). Is it safe to assume the the kernel source's default settings are the same as those on the kernel(s) distributed with RedHat 7.2? How does one determine the settings on a precompiled kernel? All I'd really like to do is to keep all my current kernel settings except for the addition of setting up kernel support for new hardware (when necessary).
Well this is not a really good solution but it might work...
Type updatedb to update the locate database (it'll take a while) then type locate .config and you should get a list of all .config files (ugh very big) im sure there is an option to find only exact matches of .config do a man locate or man find and use locate or find to find where exactly the .config file is. This will probably be somewhere in /usr/src/linux. Then do a make menuconfig and at the end it there is a option to load a config file, so point it to .config that you found before and just add support for whatever you need.
Also i think all this trouble is unneeded since if you do a normal make menuconfig and look around im sure you will figure out what to include in your kernel and what not to. I also heard that kernels that ome with RH are quite large so compiling a kernel from 'scratch' will also make it smaller since you will compile only what you need. Even if you mess up, just load your old kernel and compile again. I recompiled my kernel 6 times this weekend because i forgot to include some things.
Anywayz i made a long reply that is mostly useless, well i hope it will help you at least a bit.
I'm afraid I rambled too much in that first posting. But, as stated in my original message (buried somewhere in there ;) ), when you install off the original cd image, you get NO .config file at all, so there isn't anything to search for (just to be sure, I reinstalled from the disk images and searched once again before replying here. To search, I used the find command, Konqueror, and locate as you specified in your earlier post). I was wondering if there is any other way of determining the current kernel parameters (again the current kernel came from the installation cd). As you say, it may be evident if I set up the kernel from scratch, and I'll do that if necessary, but I am a bit of a newbie and the hardware on the machine at work is different than I've worked with before. Since this is going to be a semi-production machine at work, the current kernel is working perfectly, and performance is good, I wanted to leave everything as intact, as possible.
p.s. I found the answer to my question. After you install the kernel source from the installation cd, you run the command make oldconfig. If you are using RedHat 7.2, this places the RedHat default .config file in /usr/src/linux-<kernel version>
I think this "make oldconfig" is something a lot of HOWTO's forget to mention...at least in my experience in setting IP MASQ and in dealing with other people in forums.
Everytime I ask someone about compiling kernels...why I am having problems after compilation...etc...
...they all mention doing:
But I think the problem with doing "make xconfig" or menuconfig is that it gives you a menu that does not reflect your current setting!!!!!!!!!!!!!!!!!!!!!!!!!!!
I'm new at this Linux thing...but if you are merely wanting to add more features and support to your kernel...why the heck would you want to start from a blank configuration???? ..such as what "make xconfig" gives you!!!!!! Why not start with a configuration showing what you currently have...and then going from there....seemingly what "make oldconfig" give you.
Why is it that no one ever bothered mentioning "make oldconfig" before??? I had to dig pretty deep for answers before I finally ran into this post mentioning "make oldconfig".
Sorry, I've been trying to setup IP MASQ...and I have to patch my kernel with iptables1.2.5...and of course that entails compiling...but ever time I compile....everything else gets messed up...like my NICs.....
If anyone can correct me on this notion...please do so....I would love nothing more than to understand this whole compiling concept....
Anyhow.....thanks for this post!!!!
|All times are GMT -5. The time now is 07:41 PM.|