Kindly support DOTSLASHLINUX on Patreon to keep the website up and running while remaining ads free.

Part Section Link
1 Intro Click Here
2 [∗] Gentoo Linux support ---> Click Here
3 General setup ---> Click Here
4 [∗] Enable loadable module support ---> Click Here
5 [∗] Enable the block layer ---> Click Here
6 Processor type and features ---> Click Here
7 Power management and ACPI options ---> Click Here
8 Bus options (PCI etc.) ---> Click Here
9 Executable file formats / Emulations ---> Click Here
10 [∗] Networking support ---> Click Here
11 Device Drivers ---> Click Here
12 Firmware Drivers ---> Click Here
13 File systems ---> Click Here
14 Kernel hacking ---> Click Here
15 Security options ---> Click Here
16 -∗- Cryptographic API ---> Click Here
17 [∗] Virtualization ---> Click Here
18 Library routines ---> Click Here
Kernel Sources:       sys-kernel/gentoo-sources

Kernel Version:       4.14.12

Last Updated on:      06/01/2018

Update Notice:        1- Excluded 'CONFIG_PAGE_TABLE_ISOLATION' in 'Security options --->'
                      2- Included 'CONFIG_STANDALONE' in 'Device Drivers  --->'
                      3- Included 'CONFIG_PREVENT_FIRMWARE_BUILD' in 'Device Drivers  --->'
                      4- Included 'CONFIG_X86_5LEVEL' in 'Processor type and features  --->'
                      5- Included 'CONFIG_ORC_UNWINDER' in 'Kernel hacking  --->'
                      6- Excluded QEMU-virtualization-related options in favor of VirtualBox
                      7- Excluded swap-related options
                      8- Excluded 32-bit support
                      9- Switched from XFS to EXT4

Priorities:           1- high performance
                      2- minimal
                      3- low memory footprint
                      4- small size
                      5- power saving
                      6- security
                      7- low-latency

Total Options:        2469 (grep -c 'CONFIG_' DOTSLASHLINUX.config)

Included Options:     645 (grep -c '=y' DOTSLASHLINUX.config)

Excluded Options:     1761 (grep -c 'is not set' DOTSLASHLINUX.config)

Final Size (LZ4):     5,644,240 Bytes

Patches Applied:      1- UKSM-4.14 Patch (https://github.com/dolohow/uksm/blob/master/uksm-4.14.patch)

Contributors:         Firas Khalil Khana [irc: firas] [email: firasuke@gmail.com]

Side Notes:           1- Options that aren't listed here are excluded [ ].
                      2- These guides provide users with a solid starting setup to build on.
                      3- These guides are constantly being updated.
                      4- If there's something I didn't explain properly or I misexplained
                         then please do let me know either by kindly leaving a comment below
                         or by sending me an email on: firasuke@gmail.com

The Linux Kernel Configuration Guide Part 2 - [∗] Gentoo Linux support --->

kernel2
Firas Khalil Khana | 25/08/2017

Prerequisites

It’s preferrable if you were using a gnu/linux distro of any kind and have the ncurses library and make installed. I urge you to use one of the recommended distros and Gentoo is favored among others.

I highly recommend that you stick with the ncurses version make menuconfig, since it’s much better than the regular make config, as you can save your progress, go back and forth with options, can be opened in any terminal emulator with a proper size (when ncurses in installed) as well as on ttys and that’s extremely helpful when rescuing your system since you’ll be looking at the same interface wherever you go and whatever you choose.

Basic Controls

The and the arrows can be used to move between the configuration options shown.

The and the along with the (tab) button can be used to move between the options (Select, Exit, Help, Save and Load) in the horizontal menu below.

The / button can be used to search the available symbols. In order not to create a state of confusion, I’ll be using the word symbol for the capitalized underscore-separated version of the name. For example:

Symbol: CONFIG_MODULES
Name: Enable loadable modules support

The spacebar button can be used to include options in the kernel either as built-in [∗] or as modules [M] or exclude them [ ].

Similarly the y key can be used to include options [∗], and the n key can be used for excluding options [ ].

The (enter/return) button can be used to access the available nested child options for any single parent option.

The z key can be used to toggle hidden kernel options, this can be extremely useful if you’re searching for an excluded kernel option (it’ll make it easier to find that excluded option and include the options it requires to be enabled).

Below is an explanation of the symbols before the names of the kernel options:

Included, built-in, enabled: [∗], <∗>, (X), (STRING), (57), (0x1000000)
Forcibly included, forcibly built-in, forcibly enabled: -∗-

Excluded, disabled: [ ], < >, ()
Forcibly excluded, forcibly disabled: - -

and their relative types:

boolean: [ ], [∗], -∗-, - -

tristate: < >, <∗>, <M>, -∗-, - -

string: (STRING), ()

integer: (57), ()

hex: (0x1000000), ()

(Gentoo Specific Options) Gentoo Linux —>

The first section you’ll see in the menu options when using Gentoo Linux, will be the Gentoo Linux section (that was predictable =D). Select that option and you’ll see the following:

[∗] Gentoo Linux support
[∗]   Linux dynamic and persistent device naming (userspace devfs) support
[ ]   Select options required by Portage features
    Support for init systems, system and service managers  --->

[∗] Gentoo Linux support

Symbol:     CONFIG_GENTOO_LINUX

Help:       In order to boot Gentoo Linux a minimal set of config settings needs to
            be enabled in the kernel; to avoid the users from having to enable them 
            manually as part of a Gentoo Linux installation or a new clean config,
            we enable these config settings by default for convenience.

            See the settings that become available for more details and fine-tuning.

Type:       boolean

Choice:     built-in [∗]

Reason:     If you're on Gentoo Linux (or managed to get a copy of one of the sources
            available in the gentoo repos), then it's quite obvious that this option 
            should be built in.

[∗] Linux dynamic and persistent device naming (userspace devfs) support

Symbol:     CONFIG_GENTOO_LINUX_UDEV

Help:       In order to boot Gentoo Linux a minimal set of config settings needs to
            be enabled in the kernel; to avoid the users from having to enable them
            manually as part of a Gentoo Linux installation or a new clean config,
            we enable these config settings by default for convenience.
            
            Currently this only selects TMPFS, DEVTMPFS and their dependencies.
            TMPFS is enabled to maintain a tmpfs file system at /dev/shm, /run and
            /sys/fs/cgroup; DEVTMPFS to maintain a devtmpfs file system at /dev.

            Some of these are critical files that need to be available early in the
            boot process; if not available, it causes sysfs and udev to malfunction.

            To ensure Gentoo Linux boots, it is best to leave this setting enabled;
            if you run a custom setup, you could consider whether to disable this.

Type:       boolean

Choice:     built-in [∗]

Reason:     Include this option in for a bootable gentoo installation =D.

[ ] Select options required by Portage features

Symbol:     CONFIG_GENTOO_LINUX_PORTAGE

Help:       This enables options required by various Portage FEATURES.
            Currently this selects:

            CGROUPS     (required for FEATURES=cgroup)
            IPC_NS	(required for FEATURES=ipc-sandbox)
            NET_NS	(required for FEATURES=network-sandbox)
            SYSVIPC     (required by IPC_NS)

            It is highly recommended that you leave this enabled as these FEATURES
            are, or will soon be, enabled by default.

Type:       boolean

Choice:     excluded [ ]

Reason:     It's highly recommended that you build this set of options in your kernel.
            
            Users who want to exclude CONFIG_CGROUPS, may want to exclude this option
            and build CONFIG_NAMESPACES, CONFIG_IPC_NS, CONFIG_NET_NS and CONFIG_SYSVIPC
            into the kernel (which is what I did).

Support for init systems, system and service managers —>

[∗] OpenRC, runit and other script based systems and managers

Symbol:     CONFIG_GENTOO_LINUX_INIT_SCRIPT

Help:       The init system is the first thing that loads after the kernel booted.
            
            These config settings allow you to select which init systems to support;
            instead of having to select all the individual settings all over the
            place, these settings allows you to select all the settings at once.
            
            This particular setting enables all the known requirements for OpenRC,
            runit and similar script based systems and managers.
            
            If you are unsure about this, it is best to leave this setting enabled.

Type:       boolean

Choice:     built-in [∗]

Reason:     It's highly recommended that you include this option in your kernel if
            you're using OpenRC or runit as your init system.

            You can safely exclude this option only if you're using systemd instead.

[ ] systemd

Symbol:     CONFIG_GENTOO_LINUX_INIT_SYSTEMD

Help:       The init system is the first thing that loads after the kernel booted.
            
            These config settings allow you to select which init systems to support;
            instead of having to select all the individual settings all over the
            place, these settings allows you to select all the settings at once.
            
            This particular setting enables all the known requirements for systemd;
            it also enables suggested optional settings, as the package suggests to.

Type:       boolean

Choice:     excluded [ ]

Reason:     You can safely exclude this option if you're using OpenRC or runit as your
            init system.
            
            Include this option only if you're using systemd instead.

Chinese Translation

One of DOTSLASHLINUX followers 杨鑫 (Yang Mame) from China, decided to follow up with the series and provide Chinese translation of the kernel configuration guides on his blog.

To read this guide in Chinese click here.

Leave A Comment