11

I'm pretty sure that all Red Hat and Debian based distributions follow the convention of shipping the kernel configuration in /boot/config-*, but what of other distributions? Or, if this convention is extremely common, which distributions don't follow it?

5
  • 2
    This, I think, is a which distribution... question which does not rely on opinion for answer. Kind of a breath of fresh air - there aren't too many of those. Also, it's interesting. Thanks.
    – mikeserv
    Commented Dec 28, 2014 at 18:22
  • 1
    @mikeserv too broad might fit, though. :P On-topic: I think Arch Linux doesn't. But I don't have a installation handy to check.
    – muru
    Commented Dec 28, 2014 at 18:23
  • 1
    @muru - I don't think so - it's pretty damn specific from where I sit.
    – mikeserv
    Commented Dec 28, 2014 at 18:23
  • 1
    @muru - arch here: ls: cannot access /boot/config*: No such file or directory. But, then again, an archer's /boot is a very personal thing. On the other hand, ls /proc/config.gz is entirely successful.
    – mikeserv
    Commented Dec 28, 2014 at 18:39

2 Answers 2

16

Debian and derivatives (Ubuntu, Linux Mint, …)

The configuration for the kernel /boot/vmlinuz-VERSION is stored in /boot/config-VERSION. The two files ship in the same package, linux-VERSION or kernel-VERSION.

Arch Linux, Gentoo (if enabled)

The configuration for the running kernel is stored in the kernel binary and can be retrieved with zcat /proc/config.gz.

This file exists when the CONFIG_IKCONFIG option is set when compiling the kernel - and so can be true (or not) regardless of distribution, though the default kernel configuration for the two named does enable it.

Incidentally, arch linux's default configuration does not name the kernel (or its initramfs image) by version even in /boot - the files there are named only for their corresponding packages. For example, a typical arch linux boot kernel is named /boot/vmlinuz-linux where linux is the package one installs for the default kernel.

2

The linux kernel source comes with an installation mechanism, make install. This installs files into /boot (vmlinuz-version, System.map-version, and config-version).

The option to make the running kernel's config available via /proc/config.gz is part of the kernel too, so if this config option has been enabled the file will exist in the /proc filesystem. Almost all distributions have this enabled these days, even Android kernels, and as such, this is the most standard location.

Neither of these locations is dependent on the distribution though. Many distributions take advantage of the 'default' location when packaging, as it's probably convenient to prepare packages this way, but even within a single distribution it's possible that non-standard kernel packages might place the files elsewhere, or name them differently, although this is unlikely.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .