Choose style:

Author Topic: Upgrading the Linux Kernel  (Read 2713 times)

0 Members and 1 Guest are viewing this topic.

Offline Kyle

  • Member
  • ***
  • Posts: 140
  • Karma: 13
  • Microshaft cannot compete...
    • View Profile
  • Peppermint version(s): 7 (x64)
Upgrading the Linux Kernel
« on: July 22, 2016, 10:12:37 am »
If you have issues with hardware compatibility or you want the latest improvements you have the choice to manually upgrade your kernel. The process of doing so is smooth and can usually be done without issues. There are some good reasons of upgrading your Linux kernel often, to the latest stable version. They include security fixes, stability improvements, updated drivers, new kernel functions and increased speed. With that being said... Let's jump into the process!

So first, you must know if you are running a 32bit or 64bit operating system. Do to this, type the following into Terminal:

Code: [Select]
arch

If it shows i686 or i386 you are running 32bit and if it shows x86_64 you are running 64bit.

With that out of the way, we now know what type of kernel to download and install. Proceed to Ubuntu's Kernel Repository. Next, look for the latest kernel that is a non-"RC" release. It should just look like v4.6.3-yakkety/ or 4.6.4, for example. Choose the latest one (which is currently 4.6.4). If you are running 64bit, look under the amd64 builds. If you are running 32bit, look under the i386 builds. First, download the following files. We will use the 4.6.4 kernel for example, as it is the latest stable kernel. This is an example of the files you should download if you are using 32bit (i386).

Code: [Select]
http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.6.4/linux-headers-4.6.4-040604_4.6.4-040604.201607111332_all.deb
http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.6.4/linux-headers-4.6.4-040604-generic_4.6.4-040604.201607111332_i386.deb
http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.6.4/linux-image-4.6.4-040604-generic_4.6.4-040604.201607111332_i386.deb

Firstly, download the first file for your system architecture. The file name should begin with "linux-headers" and end with "_all".

Secondly, choose the file listed under the first one you have downloaded. The file name should begin with "linux-headers" and end in "amd64" if you are running 64bit, or "i386" if you are running 32bit. It should have "generic" in the file name, do not download the lowlatency version(s) if you do not know what it means. If you download a generic version now, you must stick with a generic kernel for the following step.. The next file you download would then have to be the same type of kernel of the file you downloaded now which is either generic or lowlatency.

Lastly, download the file thats' name starts with "linux-image". If you have downloaded a generic kernel (recommended) for the second step, you should download the generic kernel type.

Save all of the files into one folder (you can make a folder for this and then delete it after you upgrade the kernel). The folder should only contain the three files you have downloaded in order to upgrade your Linux kernel.

Go into the terminal into that folder and navigate to where you have saved the files. For example:

Code: [Select]
cd Downloads

If you have saved it to your downloads folder. Folder names are case sensitive. Keep the terminal open as we will need it for the next step.

Once you are in the folder (via terminal) that you have saved the files to, type the following into the terminal:

Code: [Select]
ls

This will show the files in that folder. Make sure there is no other files in that folder and ensure that you have downloaded the correct files needed to upgrade the kernel. Keep the terminal open for the next step.

Finally, it is time to upgrade the Linux kernel. To do so, make sure you are in the folder (via terminal) and type the following into terminal:

Code: [Select]
sudo dpkg -i *.deb

This will automatically install all the .deb files in the folder (which is all of the files you have downloaded). When you are done installing the new kernel, keep the terminal open.

Lastly, type the following into terminal:

Code: [Select]
sudo update-grub

This will update your GRUB bootloader in order to ensure that it uses the kernel you have just installed. You may close all of your open application(s) and reboot.

When your computer is finished rebooting, type the following into the terminal:

Code: [Select]
uname -r

And you should see the latest kernel installed (which for this tutorial, we used 4.6.4).

To clean up the old kernel, you can go into terminal and type the following:

Code: [Select]
sudo apt-get autoremove

Removing the old kernel files will save you some disk space.

And that's it! Now you're running the latest Linux kernel and have the best optimizations possible at the current moment.

Note: it is important to remember that after you manually install a kernel (which is what this tutorial showed you how to do) you will no longer receive automatic updates for your kernel (which was the case if you were on a LTS kernel). You will need to manually install new kernel releases as you wish.
« Last Edit: July 22, 2016, 10:37:48 am by Kyle »
[] Dell Latitude E6400 []
[] CPU: Intel Core 2 Duo P8600 [] RAM: 4GB DDR2 [] HDD: 1TB 5400RPM WD Black []

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26277
  • Karma: 2855
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Upgrading the Linux Kernel
« Reply #1 on: July 22, 2016, 10:34:50 am »
Whilst "dir" does work in Linux .. the accepted norm for file/directory listing is the "ls" command .. ls also gives colour coded returns such as blue for directories, green for executable files, etc.
« Last Edit: July 22, 2016, 10:37:16 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline Slim.Fatz

  • Trusted User
  • Veteran
  • *****
  • Posts: 1812
  • Karma: 474
  • Where's the mouse?
    • View Profile
  • Peppermint version(s): Peppermint 7, 8.5 & 10 - 64bit
Re: Upgrading the Linux Kernel
« Reply #2 on: July 22, 2016, 10:36:09 am »
Hi Kyle,

On the contrary, after doing what you described (I've been doing it for several years now) you still get notified of kernel updates and can permit them to be automatically installed. It is just that the kernel updates refer to your Peppermint's stock kernel (for Peppermint 7 that is the 4.4.0 series). When you install, for example, kernel 4.6.4 you will not get automatic updates to that  version, just those for the original 4.4.0 series.

And, as PCNetSpec often tells those with not much knowledge about upgrading or downgrading kernels (paraphrased here): if it's not broken then there is no need to fix it.

The kernel updates to the stock 4.4.0 series for Peppermint 7 are pretty much all you need to do unless you are having specific hardware problems that might benefit from one of the newer series of kernels.

Regards,

-- Slim
"Life first -- Peppermint a close 2nd!" -- Zeb

Tread lightly: Fluxbox, JWM, i3, Openbox, awesome

Offline Kyle

  • Member
  • ***
  • Posts: 140
  • Karma: 13
  • Microshaft cannot compete...
    • View Profile
  • Peppermint version(s): 7 (x64)
Re: Upgrading the Linux Kernel
« Reply #3 on: July 22, 2016, 10:36:52 am »
Hi Kyle,

On the contrary, after doing what you described (I've been doing it for several years now) you still get notified of kernel updates and can permit them to be automatically installed. It is just that the kernel updates refer to your Peppermint's stock kernel (for Peppermint 7 that is the 4.4.0 series). When you install, for example, kernel 4.6.4 you will not get automatic updates to that  version, just those for the original 4.4.0 series.

And, as PCNetSpec often tells those with not much knowledge about upgrading or downgrading kernels (paraphrased here): if it's not broken then there is no need to fix it.

The kernel updates to the stock 4.4.0 series for Peppermint 7 are pretty much all you need to do unless you are having specific hardware problems that might benefit from one of the newer series of kernels.

Regards,

-- Slim

Thank you for your feedback! While I do agree somewhat with "don't fix what isn't broken" I personally, like to tinker and if I have the chance to get the latest version of something, I try my best to do it. I do know there are many people using Peppermint with newer hardware that may not be 100% compatible with the 4.4.0 kernel and they may wish to try the latest kernel even if they don't have hardware issues, the beauty of Linux is choice and freedom  :). Nonetheless, if PCNetSpec is worried about users damaging their OS with my guide he is free to edit or remove it. I am just trying to give back to the community.


Whilst "dir" does work in Linux .. but the accepted norm for listing files is the "ls" command .. it also gives colour coded returns such as blue for directories, green for executable files, etc.

Thanks for the suggestion! I have updated it and replaced it with ls instead of dir.
« Last Edit: July 22, 2016, 10:43:35 am by Kyle »
[] Dell Latitude E6400 []
[] CPU: Intel Core 2 Duo P8600 [] RAM: 4GB DDR2 [] HDD: 1TB 5400RPM WD Black []

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26277
  • Karma: 2855
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Upgrading the Linux Kernel
« Reply #4 on: July 22, 2016, 10:48:07 am »
Can I also add that anyone whose moved away from the stock kernel version please mention it when asking for assistance on this forum.

EXAMPLE
I've just finished typing up instructions to compile a panel plugin for someone .. I cannot guarantee that plugin would compile against the 4.6 kernel series .. it might, it might not, I only tested it against the stock 4.4 kernel

As Slim.Fatz pointed out, there's usually little or no benefit to a more recent kernel unless you have some new hardware that requires drivers that have only just been added to the newer kernel.

Unless this is the case I'd generally advise people stick with the stock kernel series .. so support all starts from a common baseline.
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline zebedeeboss

  • Global Moderator
  • Hero
  • *****
  • Posts: 3135
  • Karma: 567
  • Life first... Peppermint a close 2nd :)
    • View Profile
  • Peppermint version(s): P10 / P9 Respin
Re: Upgrading the Linux Kernel
« Reply #5 on: July 22, 2016, 11:04:42 am »
Hi Kyle

Thanks for taking the time to put this forum post in place.  I hope I am not talking out of turn but I don't think PCNetSpec would ever take down someones post just because he disagreed with it.  Like here, he simply adds pertinent suggestions and information.

Please keep doing this.  This is what Linux, for me, is all about. People trying to extend their knowledge and trying to be helpful to others.  Just remember some of the more generic information you get off of the internet won't always fit in with the Peppermint way of doing this.   Team Peppermint spent months and months fine tuning P7 and that is why it is as good as it is.

Regards Zeb...
Be Kind Whenever Possible...   It is Always Possible - Dalai Lama

Linux User #565092
P10 x64 Desktop - AMD Threadrippe 2950X - 64Gb RAM - NVIDIA RTX2080Ti 11Gb - 1 x 43" 1 x 27" 4k 3840x2160 - 1 x 34" 5120x2160
P10 x64 Laptop - i7-7700HQ - 8Gb RAM - Nvidia GTX1050 4Gb - 15.6" HD 1920x1080

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26277
  • Karma: 2855
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Upgrading the Linux Kernel
« Reply #6 on: July 22, 2016, 01:27:34 pm »
What Slim said .. precisely :)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec