Compile your own kernel and install
I have updated my Ubuntu kernel from 5.0.* -> 5.6.13 This note is a backup of How to compile and install Linux Kernel 5.6.9 from source code. Environment: Ubuntu 18.04 Kernel: 5.0.*
Step 0. Install the required compilers and tools
1
$ sudo apt-get install build-essential libncurses-dev bison flex libssl-dev libelf-dev
Copied!
Step 1. Get source code from kernel.org​
1
$ wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.13.tar.xz
Copied!
Step 2. Extract tar.xz file
1
$ unxz -v linux-5.6.13.tar.xz
Copied!
Step 3. Verify signature
1
$ wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.13.tar.sign
Copied!
1
$ gpg --verify linux-5.6.13.tar.sign
Copied!
output: using RSA key [email protected]%^*#^%^*
1
$ gpg --recv-keys [email protected]%^*#^%^*
Copied!
1
$ gpg --verify linux-5.6.13.tar.sign
Copied!
Step 4. Configure the Linux kernel features and modules
1
$ cd linux-5.6.13
2
$ cp -v /boot/config-$(uname -r) .config
Copied!
1
make menuconfig
Copied!
Step 5. Compile
1
$ make -j4
Copied!
Step 6. Install kernel modules
1
$ sudo make modules_install
Copied!
Step 7. Install kernel
1
$ sudo make install
Copied!
Step 8. Update grub config
1
$ sudo update-initramfs -c -k 5.6.13
2
$ sudo update-grub
Copied!
Step 9. Reboot and check version
1
$ reboot
2
$ uname -mrs
Copied!
1
Linux 5.6.13 x86_64
Copied!
Copy link