What is the difference between 'make oldconfig' and 'make xconfig'
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
8.1. Using an existing configuration
When you installed your custom kernel, its configuration was copied to /boot/config-x.y.z. You may want to squirrel it away in another location (or several other locations) for safekeeping or later re-use.
Suppose that just last week you picked your way through the maze of options, and settled on a configuration that supports all the hardware and features you want. Today a new stable kernel is released and of course you want to upgrade right away. Is it necessary to start from scratch configuring the new kernel? Not at all.
Download and expand the new source tarball and make a new symlink. Then change directories to /usr/src/linux, copy your existing configuration there and do "make oldconfig":
bash:/usr/src/linux$ cp /boot/config-2.4.18.030320 .config
bash:/usr/src/linux$ make oldconfig
You'll be asked questions about new kernel options. It's generally safe to answer "no" to all the questions; make notes of the new options that interest you.
After you finish oldconfig you can run xconfig or menuconfig to review your selections, change your answers, or investigate the options you noted.
What is the difference if I just copy /boot/config-x.y.z. into /usr/src/linux/.config and do a make xconfig (skipping make oldconfig) ?
Because the old config, will not match up. The new kernel will have options the old kernel won't also the settings will change sometimes, so what was value 2 in the old config maybe value 3 in the new, so if you don't make oldconfig, some of the values maybe inaccurate.
Also stuff moves about, say the networking card options could be under another section, and won't be parsed, so no network card for you.
Distribution: Lots of distros in the past, now Linux Mint
Posts: 748
Rep:
Sometimes, especially if you're moving an entirely new minor version (2.4-2.6), it's better to read the config file and use it as a guideline to choosing your kernel options. No method is perfect, so being able to look at the options and decide if you want to make a change or not is sometimes a better choice than a simple config copy or letting a parser do the work for you. Takes a little more time, but kernel compiling isn't something you should rush through. It's also quite educational, especially if your distro makes a lot of modifications to the base kernel (custom patches and experimental stuff).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.