make oldconfig — How to Update Linux Kernel Config
make oldconfig updates an existing .config file by prompting only about new options that appeared in a newer kernel version. Everything already set in the old config is preserved.
How does it work?
Let’s say you have a working .config file from an older kernel version and you’ve downloaded the source for a newer version. When you run make oldconfig, the script will parse your current .config file and compare it to the options available in the new kernel.
For each new option that doesn’t exist in your old file, make oldconfig will ask you if you want to enable it. You typically have the choice of:
- Y (Yes): Enables the option and compiles it directly into the kernel image.
- M (Module): Enables the option as a module that can be loaded and unloaded while the system is running.
- N (No): Disables the option.
- ? (Help): Displays a short description of the option.
This process ensures that you only have to make a decision on the new options, which saves a lot of time compared to make menuconfig or make xconfig, where you would have to go through all the options again.
Example usage
Here’s a typical scenario:
-
You are in the main directory of the Linux kernel source.
-
You have a
.configfile copied from an older, working kernel version. -
You run the command:
make oldconfig -
Questions about new options will start to appear on the screen:
Btrfs POSIX Access Control Lists (BTRFS_FS_POSIX_ACL) [Y/n/?] (NEW) -
You answer each question, and at the end, your
.configfile will be updated and ready to be used in the compilation process of the new kernel.
For repeated kernel upgrades, make oldconfig is the fastest way to keep your .config current without reviewing thousands of unchanged options.