Do config file in /boot has any role other than an information about the modules presence?

Do .config file in /boot has any role other than an information about the modules’ presence? A .configXXXX in linux kernel source tree is used while building the kernel to ON/OFF a feature. But after installing what is it’s role in /boot?

Asked By: Franc M

||

Their only role is to provide the configuration of the corresponding kernel, for information purposes. They are not required for anything else.

(Note that they don’t only provide information about the presence of modules; they include all the kernel’s build configuration.)

Answered By: Stephen Kitt

In addition to Stephen’s answer I have to say that if your distro does that, that sounds old-fashioned and inefficient.

The preferred way of storing the kernel configuration nowadays is the vmlinuz file and then you can get the config from /proc/config or extract it from vmlinuz, so there’s no need to have/install an extra file on your disk.

The file itself is indispensable as it allows the user to understand what kernel features are enabled/disabled and this affects how the kernel works or what features are available (e.g. iptables which are disabled by many forward-looking distros).

For the kernel to work, there has to be zero files or storage devices. The bootloader may download/run vmlinuz and the root filesystem from the net/USB/ROM/whatever.

Answered By: Artem S. Tashkinov
Categories: Answers Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.