LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Load present kernel-config when building a new? (https://www.linuxquestions.org/questions/linux-general-1/load-present-kernel-config-when-building-a-new-11059/)

grebbs 01-03-2002 04:43 AM

Load present kernel-config when building a new?
 
Hi!

Im new into linux and recently installed RedHat 7.2. With the kernel produced when installing, the system sems to work pretty well, but I also want to add ntfs-support so that I can mount my ntfs-partions which I also have on my system.

I read and followed the HOWTO-kernel, how to config and build a kernel. It went good, and I got my ntfs-support, BUT the network/ip-something didn't work with the kernel I configed. I suppose I must have missed some option?

* So, my first question is: How can I when I want to build a kernel, "load" the present kernel-config, and just change the options that I want to be changed? (for me just tick "Y" on ntfs-support)

* The kernel-source is in /usr/src/linux-2.4.7.10. If I want to install a newer kernel (ei 2.4.7.17). How do I do to use the present kernel-config and then being able to change all features , including new features for the new kernel?

//Regards Andreas

bluecadet 01-03-2002 05:49 AM

you *should* have the original config file in /boot/config-2.4.7-10 or such like, run 'make xconfig' in the kernel source and load it from there. it might also be the case that the source rpm you installed contains it as teh default .config file as well

mdobbs 01-25-2002 01:55 PM

.config file on redhat 7.2
 
Hi - I have the same question... I'm also new to building kernels, so bear with me here.

I want to do exactly what "grebbs" is asking above. However, the reply doesn't help me, because there is no .config file in the
/usr/src/linux-2.4.7-10 directory in my installation of redhat 7.2. (I've searched my whole disk for one (find . -name ".config"), and found nothing).

There is, however, a directory called:
/usr/src/linux-2.4.7-10/configs
which I *think* contains all the default configuration files for redhat 7.2. So I guess one of those files is the one that was used to build my kernel... but which one?? The files are:
kernel-2.4.7-athlon.config kernel-2.4.7-i586-smp.config
kernel-2.4.7-athlon-smp.config kernel-2.4.7-i686.config
kernel-2.4.7-i386-BOOT.config kernel-2.4.7-i686-debug.config
kernel-2.4.7-i386.config kernel-2.4.7-i686-enterprise.config
kernel-2.4.7-i386-smp.config kernel-2.4.7-i686-smp.config
kernel-2.4.7-i586.config


and I (embarrassingly) don't even know whether I should use i386 or i686, nor what smp means. (my processor is a PIII 1GHz).

Should I use one of these files as my .config? If I choose to upgrade to a newer kernel, can I still use one of these files (which I guess is intended ofr 2.4.7)?

Is there someway to ask my kernel to spit out a .config file ??

Thanks in advance if you have any solutions/suggestions!

ryanstrayer 01-25-2002 03:19 PM

Okay - here's what you guys need to do. You are correct in assumping that the /usr/src/linux-2.4.7-10/configs directory are the config files. Those config files contain the same options that shipped with the RH 7.2 built kernel.

When building a new kernel, either 2.4.7-10 or a completely new kernel, like 2.4.17, load one of those config files by selecting 'Load Stored Configuration" after typing 'make menuconfig' or 'make xconfig'. From there, you can then experment and find out what works with your system and what doesn't.

Note: It normally takes dozens of compiles to learn what works with your system and what doesn't. Assuming you know it all from the beginning is usually a bad assumption, even when you using the help inside the kernel config. Things are not as they appear.

Now to answer the question of WHICH file to use... i386 will work on almost all systems now-a-days (386 and higher), but if you have a fairly new system (Pentium II and higher) i686 is what I recommend. I have a IBM Laptop PII366mhz which I run the i686 kernel on. Again, you can run i586, or even i386, but it will not be optimized for your machine.

If this is your first experience with kernels, give it time. Like I said, it will take dozens of compiles and errors before you learn what works and what doesn't with your specific system. Every system is different.

When compiling, be sure you have a symbolic link of /usr/src/linux pointing to your version directory such as 2.4.7-10 or something else. If you are not familiair with symbolic links type 'man ln' and start reading :D .

Hope this helps you guys, I had to learn it all on my own.. :(

BTW, SMP is for multi-processor support. You don't want that.

mdobbs 01-25-2002 06:03 PM

thanks ryanstrayer,

that's helpful. I'll try the recompile with the
/usr/src/linux-2.4.7-10/configs/kernel-2.4.7-i686.config
file.

I'm discouraged that you say it may take many tries to figure out the correct options. My kernel works perfectly now, I just want to change one option.... if its really true that linux does not know how to tell me its current configuration (so as to allow me to change one option while leaving everything else untouched), ... then that's sad! But that's life, I guess-

I'll give it a whirl.

isajera 01-26-2002 03:47 AM

once you play around with the xconfig - it's not nearly as scary. generally the help button will let you know if a particular part is vital or not.

plus, you can always just save your new config to a different file, and work off the ones that red hat put there to make things easier for you. those will work probably without any real problem.


All times are GMT -5. The time now is 06:21 PM.