How to Install Linux Kernel 4.9 in Ubuntu / Linux Mint

December 12, 2016 — 7 Comments

Linux Kernel

Linux Kernel 4.9 was finally released last night as ‘the biggest release’ said in the announcement. Linus Torvalds wrote on lkml.org:

So Linux 4.9 is out, and the merge window for 4.10 is thus open.

With the extra week for 4.9, the timing for the merge window is obviously a bit awkward, and it technically closes in two weeks on Christmas Day. But that is a pure technicality, because I will certainly stop pulling on the 23rd at the latest, and if I get roped into xmas food prep, even that date might be questionable.

I could extend the merge window rather than cut it short, but I’m not going to. I suspect we all want a nice calm winter break, so if your stuff isn’t ready to be merged early, the solution is to just not merge it yet at all, and wait for 4.11. Just so you all know (I already bcc’d the main merge window suspects in a separate mailing last week, I’m just repeating myself here to avoid anybody being confused about timing).

Anyway, back to 4.9 itself.

I’m pretty sure this is the biggest release we’ve ever had, at least in number of commits. If you look at the number of lines changed, we’ve had bigger releases in the past, but they have tended to be due to specific issues (v4.2 got a lot of lines from the AMD GPU register definition files, for example, and we’ve had big re-organizations that caused a lot of lines in the past: v3.2 was big due to staging, v3.7
had the automated uapi header file disintegration, etc). In contrast, 4.9 is just big.

Admittedly a chunk of that is the new greybus staging support, but that really isn’t the bulk of it – it’s just another small detail in the overall “yes, v4.9 is big” picture.

Other than just the size, 4.9 looks fairly normal. A bit over two thirds drivers (staging, GPU and networking are the bulk of it, but it’s all over), with the rest looking fairly normal too: arch updates, documentation, generic networking, filesystems..

The shortlog (16k+ commits, with another 1100 merge commits to round things out) is obviously much too big to put here, and wouldn’t be legible anyway. So as is my wont, I’m appending just the log of my merges.

New Features in Linux Kernel 4.9:

  • Virtual Display Support and improved GPU reset for AMDGPU.
  • Various fixes and improvements to Intel DRM.
  • Memory protection keys (MPK) support.
  • Support for vmapped kernel stacks.
  • 29 more ARM machines support, including Raspberry Pi Zero, LG Nexus 5, etc.
  • Various file-system improvements and more.

How to Install Linux Kernel 4.9:

The Ubuntu kernel team has build the new kernel release, and the binaries are available for download at the link below:

Download Kernel 4.9 (.deb)

Depends on your OS type, grab and install the packages below one by one:

  • linux-headers-4.9.0-xxxxxx_all.deb
  • linux-headers-4.9.0-xxx-generic(/lowlatency)_xxx_amd64(/i386).deb
  • linux-image-4.9.0-xxx-generic(/lowlatency)_xxx_amd64(/i386).deb

Select generic for common system, and lowlatency for a low latency system (e.g. for recording audio), amd64 for 64bit system, i386 for 32bit system, or armhf, arm64, etc for other OS types.

To get the Kernel 4.9 from the command console, run the commands below one by one:

For 64-bit OS:

cd /tmp/

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9/linux-headers-4.9.0-040900_4.9.0-040900.201612111631_all.deb

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9/linux-headers-4.9.0-040900-generic_4.9.0-040900.201612111631_amd64.deb

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9/linux-image-4.9.0-040900-generic_4.9.0-040900.201612111631_amd64.deb

sudo dpkg -i *.deb

for 32-bit OS:

cd /tmp/

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9/linux-headers-4.9.0-040900_4.9.0-040900.201612111631_all.deb

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9/linux-headers-4.9.0-040900-generic_4.9.0-040900.201612111631_i386.deb

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9/linux-image-4.9.0-040900-generic_4.9.0-040900.201612111631_i386.deb

sudo dpkg -i *.deb

After installed these .debs, restart and enjoy!

Uninstall Linux Kernel 4.9:

Start/restart your machine and select boot with the previous kernel in Grub2 -> Advanced menu. Then use Ubuntu Tweak, or other system tool to remove the Kernel 4.9, or you may see this post that teach you how to remove old kernels.

I'm a freelance blogger who started using Ubuntu 5+ years ago and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me on Google Plus or email to ubuntuhandbook1@gmail.com

7 responses to How to Install Linux Kernel 4.9 in Ubuntu / Linux Mint

  1. Great article, thank you! Kernel 4.9 seems to be working very well on my Ubuntu 16.10 machine. It even works perfect with the latest Nvidia Driver.

  2. Allen Manana Graham December 27, 2016 at 1:48 am

    Very useful site, thanks for your efforts.
    Installing a kernel separately has always been intimidating , and I have not done this for some years. I had to re-read the install instructions to realize that we would create a temporary directory (tmp) first. That helps.

  3. Seyed Ali Roshan January 7, 2017 at 12:19 am

    I can’t upgrade to each lowlatency or generic version.
    my laptop is acer aspire 5750g,

    the log show me this error on installing linux-headers-4.9.0-040900-generic_4.9.0-040900.201612111631_amd64

    sudo dpkg -i generic/linux-headers-4.9.1-040901-generic_4.9.1-040901.201701060531_amd64.deb
    Selecting previously unselected package linux-headers-4.9.1-040901-generic.
    (Reading database … 506798 files and directories currently installed.)
    Preparing to unpack …/linux-headers-4.9.1-040901-generic_4.9.1-040901.201701060531_amd64.deb …
    Unpacking linux-headers-4.9.1-040901-generic (4.9.1-040901.201701060531) …
    Setting up linux-headers-4.9.1-040901-generic (4.9.1-040901.201701060531) …
    Examining /etc/kernel/header_postinst.d.
    run-parts: executing /etc/kernel/header_postinst.d/dkms 4.9.1-040901-generic /boot/vmlinuz-4.9.1-040901-generic
    ERROR (dkms apport): kernel package linux-headers-4.9.1-040901-generic is not supported
    Error! Bad return status for module build on kernel: 4.9.1-040901-generic (x86_64)
    Consult /var/lib/dkms/virtualbox/5.1.6/build/make.log for more information.

    anyone can help?

  4. ZFS failed to mount on my Ubuntu system after this upgrade to the 4.9 kernel.

    • On Linux Mint 18 the 32 bit versions resulted to a rescue shell (at bootup), something is seriously wrong on those packages.

Leave a Reply

*

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>