SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I would like to recompile my kernel to add few modules to it but I would like to keep my current configuration so as not to have troubles with missing drivers for my hardware and stuff.
How do I do that?
(I did follow a kernel compile tutorial once but i am not sure if when i do that it deletes the current config)
Your current configuration (compressed) should be found at /proc/config.gz. Copy that to your kernel source tree, uncompress it, rename it to .config - and there's your base config file. Then you can "make menuconfig" to make changes.
As I understand it, "make oldconfig" is for when you have a .config from a kernel older than the one you are building. I assumed when OP said "recompile my kernel" that he would be staying at the same kernel version. Correct me if menuconfig (first) isn't appropriate here.
As I understand it, "make oldconfig" is for when you have a .config from a kernel older than the one you are building
Correct.
Code:
make oldconfig
sends out the new items added to a newer kernel than your currently running one (starting from the currently running config) to the console, asking what option you would like to set, while recompiling the same kernel version should get no output after this (anyway doing it does not harm).
Code:
make menuconfig
should be right here to go on reconfiguring your current setup.
Another tip:
Code:
zcat /proc/config.gz > .config
saves the current running kernel config in one step
Last edited by wargus; 03-24-2011 at 07:25 PM.
Reason: clarify
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.