Steps to Build and Install Latest Kernel
Step1: Download the latest stable version of Linux Kernel using the below command.
Step2: Extract the tar files and cd into the directory
$ tar -xvf linux-4.19.6.tar.xz && cd linux-4.19.6
Step3: Install the necessary packages required for build
$ sudo apt-get install git fakeroot build-essential ncurses-dev xz-utils libssl-dev bc bison flex libelf-dev
Step4: Configure the kernel to use already existing configuration by running the following command
$ cp /boot/config-$(uname -r) .config
$(uname -r) will give the current kernel version
If you want to make any modifications to Linux Kernel, you can run the below command.
$ make menuconfig
Step5: Run the following command to compile the kernel and its modules
$ make
Step6: Install the kernel modules into /lib/modules folder by running the below command
$ sudo make modules_install
Step7: Run the below command which copies the kernel, initrd image, System.map file into /boot folder
$ sudo make install
Step8: Update the grub menu and reboot
$ sudo update-grub && reboot
Comments
Post a Comment