Linux Lite kernel update HOWTO - Printable Version +- Linux Lite Forums (https://www.freecinema2022.gq/forums) +-- Forum: Software - Support (https://www.freecinema2022.gq/forums/forumdisplay.php?fid=5) +--- Forum: Tutorials (https://www.freecinema2022.gq/forums/forumdisplay.php?fid=21) +--- Thread: Linux Lite kernel update HOWTO (/showthread.php?tid=5412) |
Linux Lite kernel update HOWTO - kpanic - 06-23-2018 IMPORTANT: Please, do not use this HOWTO if you have installed proprietary drivers from the installation package! (Yes, this is why Open Source is so cool! ) This HOWTO is mainly for LL power users and I recommend that if you don't have experience how to update (or create a customized) Linux kernel from the source, then please don't use this guide or use it on your own responsibility - as always. Before doing anything, you need to make sure that you have the developer tools installed. So, open the terminal, become root and install them.. Code: sudo su Code: apt-get install build-essential libncurses5-dev libssl-dev ccache wget bison flex Then close all the unnecessary applications, except the web browser. Then, open the terminal and become root, this should be obvious and cd to /usr/src If that directory does not exist, then create it and cd to it. Make also your terminal window bigger, so that it is easier to read. Then go to www.kernel.org with your web browser and see what is the latest stable kernel. In this example we assume that the latest stable release is 4.17.2 So, in your terminal, download the kernel (you can copy the download link location from there) to your /usr/src directory using command (assuming the kernel is 4.17.2): Code: wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.17.2.tar.xz Then wait... it will take some time to download it. When the download is finished, extract the package: Code: tar -xf linux-4.17.2.tar.xz You may now close the web browser, if it is still open. Create a symbolic link to the source tree, cd into the source and copy the configuration there and begin the customization of your specific hardware - So first, while still in /usr/src directory, do: Code: ln -s linux-4.17.2 linux Code: cd linux Code: cp /boot/config-$(uname -r) ./.config Code: make menuconfig Here you may make any modifications as you please. For example, if you have a multicore Intel processor, then you can take the most out of it by selecting it here, instead of running a "generic x86_64" configuration. But if you don't have previous experience how to choose these options consistently, then I suggest that you just click the 'TAB' button a few times until the 'SAVE' is highlighted, and press 'ENTER'. Then the same to 'EXIT'. Now, you can compile your kernel, command: (If your processor has 2 cores, the make option is -j3) (If your processor has 4 cores, the make option is -j5) (Just number of cores +1 ) You may find the number of cores like this, for example: Code: echo Nr Cores: `expr $(lscpu | grep Socket\(s\) | awk '{print $2}') \* $(lscpu | grep Core\(s\) | awk '{print $4}')` This 'make' command builds your own kernel ! Code: make -j3 2&>1 > /root/compile.log Now, this may take over an hour or more to finish, so let your computer be and go watch TV or something (and remember to eat). If everything did NOT went fine and you got some error message in the end, then there is no problem. But your kernel did not update and you don't need to read the rest of this HOWTO. Or you may send me a post of your error message and IF I HAVE TIME, I will answer to it. Or, maybe some helpful LL user will reply.. Anyway, you will find the log file of the whole process in the file: /root/compile.log You may open it with a text editor and try to find warning- and/or error messages. But if everything went fine and there are no error messages on the last lines, then you may install the new modules: Code: make modules_install Then wait until it installs... and finally install the new kernel Code: make install Again, wait until it finishes.. Reboot and see how it works. After reboot, check the kernel version: Code: uname -r Well done, you are running the latest stable kernel - like mama used to made 'em! Well, If your kernel version is still the old one, it may be that you need to run: Code: sudo update-initramfs -u ...and wait a moment ...and reboot again That's all this time folks! |