this also worked under debian9 stretch…

it now also works for Centos7/Redhat.

it seems to pretty much be always the same process:

  1. pull latest kernel
  2. try make menuconfig
  3. install missing packages until make menuconfig works

in this example i try to compile the latest kernel from on CentOS7

it compiles… and boots up…

hit ESC or other keys to see the verbose kernel output instead of the loading bar…

hostnamectl; # tested on
   Static hostname: CentOS7
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-514.26.1.el7.x86_64
      Architecture: x86-64

# also tested on
Kernel: Linux 3.10.0-693.11.6.el7.x86_64
# also tested 2018-02-06 on
Kernel: Linux 3.10.0-693.17.1.el7.x86_64
# also tested on 2018-07
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-862.6.3.el7.x86_64

su; # become root
yum update; # update system

yum search kernel-devel; # search for kernel headers
yum install kernel-devel.x86_64; # install kernel headers required by gcc
yum search ncurses; # search for devel and i386 (32bit) or 64Bit
yum install wget gcc ncurses-devel.x86_64; # install gcc and ncurses
cd /usr/src/
# now visit and get the link to the latest kernel

tar fxvJ linux-4.12.tar.xz
ln -sv linux-4.12 linux
cd linux
uname -r;
# this is our current kernel version
cp -v /boot/config-$(uname -r) .; # reuse the currently used kernel.config
make clean
make menuconfig;

# gave me this error:
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/mconf.o
YACC scripts/kconfig/
/bin/sh: bison: command not found
make[1]: *** [scripts/kconfig/] Error 127
make: *** [menuconfig] Error 2

yum install bison

# rerun
make menuconfig
# gave me this error
YACC scripts/kconfig/
LEX scripts/kconfig/zconf.lex.c
/bin/sh: flex: command not found
make[1]: *** [scripts/kconfig/zconf.lex.c] Error 127
make: *** [menuconfig] Error 2

yum install flex

# rerun
make menuconfig
# now finally worked:

# all i modified here is under General -> Custom string cuztom

# older versions look like this

# for compile to work one needs additional packages
yum install elfutils-libelf-devel.x86_64 openssl-devel.x86_64 bc screen

# screen package is optional
# allows you to start compilation and disconnect
# while installing the new kernel requires root
# according to this, you should not compile as root
screen -S compiling_kernel; # starting a new screen session with this name
make clean;
time make -j2; # compile using all 2 cores
# Ctrl+A then D = detach from current screen session
screen -ls; # show current screen sessions
screen -R compiling_kernel; # resume this screen session
compiling kernel 4.12.13 under centos7 with 8x xeon E5504 at 2.00GHz cores on supermicro X8DT3 server

compiling kernel 4.12.13 under centos7 with 8x xeon E5504 at 2.00GHz cores on supermicro X8DT3 server (2018-01) good way to stress test your system 😀  real: 24m48.755s … not too bad 😀

make modules_install
make install
reboot; # and test your new kernel
# if that worked you might want to make it boot the new kernel per default
vim /etc/default/grub; # make sure those orange lines are present
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"

# :wq save quit vim

# centos7 update grub config and menu
grub2-mkconfig -o /boot/grub2/grub.cfg
# reboot select new kernel and it should be set to default

modules and kernel install fine – after reboot i can select the new kernel 4.12 and it boots up fine.

[user@CentOS7 ~]$ hostnamectl
   Static hostname: CentOS7
         Icon name: computer-vm
           Chassis: vm
        Machine ID: ad6f3410bf2346ec97a6fdc05dc4a607
           Boot ID: 58e86772e8b34dab97bd2428e7592413
    Virtualization: microsoft
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 4.12.0cuztom
      Architecture: x86-64

 Static hostname: CentOSworkstation.localdomain
 Icon name: computer-laptop
 Operating System: CentOS Linux 7 (Core)
 CPE OS Name: cpe:/o:centos:centos:7
 Kernel: Linux 4.14.12 (recent in 2017-01)
 Architecture: x86-64


cleaning up:

# to avoid overwriting your custom compiled kernel with the next update add this
vim /etc/yum.conf 
# if it is a desktop workstation you might also want to
exclude=icedove* firefox* libreoffice*


a quadcore Intel(R) Core(TM) i5-3470T CPU @ 2.90GHz needs real 36m58.294s to compile linux-4.15.1

….not sure what those messages are about:

full error message:

SELinux is preventing /usr/libexec/accounts-daemon from using the dac_read_search capability.

*****  Plugin dac_override (91.4 confidence) suggests   **********************

If sie berprfen wollen, ob Domne diesen Zugriff bentigt oder Sie eine Datei mit den falschen Berechtigungen auf Ihrem System haben
Then aktivieren Sie die vollstndige Audit-Funktion, um die Pfad-Information der problematischen Datei zu erhalten. Dann reproduzieren Sie den Fehler erneut.

Volle Audit-Funktion aktivieren
# auditctl -w /etc/shadow -p w
Versuchen Sie AVC zu reproduzieren. Fhren Sie dann folgendes aus
# ausearch -m avc -ts recent
Falls PATH record ersichtlich ist, berprfen Sie Eigentmer/ Berechtigungen der Datei und korrigieren Sie dies,
anderenfalls melden Sie dies an Bugzilla.

*****  Plugin catchall (9.59 confidence) suggests   **************************

If sie denken, dass accounts-daemon standardmig dac_read_search Berechtigung haben sollten.
Then sie sollten dies als Fehler melden.
Um diesen Zugriff zu erlauben, knnen Sie ein lokales Richtlinien-Modul erstellen.
allow this access for now by executing:
# ausearch -c 'accounts-daemon' --raw | audit2allow -M my-accountsdaemon
# semodule -i my-accountsdaemon.pp

Additional Information:
Source Context                system_u:system_r:accountsd_t:s0
Target Context                system_u:system_r:accountsd_t:s0
Target Objects                Unknown [ capability ]
Source                        accounts-daemon
Source Path                   /usr/libexec/accounts-daemon
Host                          CentOS7
Source RPM Packages
Target RPM Packages
Policy RPM                    selinux-policy-3.13.1-102.el7_3.16.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     CentOS7
Platform                      Linux CentOS7 4.12.0cuztom #1 SMP Mon Jul 3
                              12:01:05 CEST 2017 x86_64 x86_64
Alert Count                   6
First Seen                    2017-07-03 15:13:18 CEST
Last Seen                     2017-07-03 15:13:52 CEST
Local ID                      286945cd-6cfc-4233-a5b4-747cfe5afe79

Raw Audit Messages
type=AVC msg=audit(1499087632.710:111): avc:  denied  { dac_read_search } for  pid=782 comm="accounts-daemon" capability=2  scontext=system_u:system_r:accountsd_t:s0 tcontext=system_u:system_r:accountsd_t:s0 tclass=capability permissive=0

Hash: accounts-daemon,accountsd_t,accountsd_t,capability,dac_read_search

important or simply cool and probably related links 🙂

watch Linus Torvalds at work at

Among the material likely coming for Linux 4.13 that we have already covered on Phoronix includes:

– Initial AMD Raven Ridge graphics support (sans no display due to no DC/DAL yet), Vega fixes, and other updates.

Many Allwinner DRM changes.

DRM sync objects are landing.

Raspberry Pi / VC4 improvements.

Various updates to the Intel DRM driver.

Large directory support for EXT4.

XPad updates and Google Rose Touchpad support.

AES-128-CBC support in Fscrypt, the file-system generic crypto code currently utilized by EXT4 and F2FS.

– Possibly the AMD SME/SEV security features supported by new EPYC CPUs.

– Continued push for more HDMI CEC drivers.

Stay tuned for thorough Linux 4.13 kernel feature coverage once the merge window opens following the 4.12 debut.