How can I use Kernel 3.19 in 14.04 now?

64,474

Solution 1

You can install a newer kernel

  • as described in Kernel/MainlineBuilds or

  • in this case more simply with the packages built from linux-lts-vivid from the trusty-updates repository:

    sudo apt-get install linux-generic-lts-vivid
    

    This meta-package always depends on the most recent version of Canonical's v3.19 kernel branch.

    The equivalent for the v4.4 kernel branch of Ubuntu Xenial is linux-generic-lts-xenial (what a surprise).

Since kernel packages of different branches don't replace each other, there is virtually no danger, that either of the above steps will make your system unbootable¹. If the newly installed kernel doesn't run, you can select to boot different/previous kernels in the GRUB menu during boot.

¹ The most notable exception is a broken GRUB configuration. If update-grub (called by the kernel package post-installation and post-removal scripts) doesn't work without the new kernel, it won't work with the new kernel either.

Solution 2

You can now install the "latest" (3.19) Ubuntu kernel directly from the repositories:

sudo apt-get install linux-image-generic-lts-vivid linux-headers-generic-lts-vivid

This will install stable Ubuntu kernel for Vivid. And the headers that are needed for building several modules on your system.

Hope this helps!

Solution 3

The easiest way to upgrade kernel to 3.19 in Ubuntu 14.04 is to run:

sudo apt-get install linux-generic-lts-vivid

This will install meta package, that will pull everything else. Image and headers will be installed.

This method is good, because 3.19 kernel will get security updates and bug fixes through routine update & upgrade process.

Old kernels 3.13 or 3.16 will not be removed. They will be bootable using grub menu. And they will get updates too.

If you do not want 3.13 or 3.16 kernel to be updated, you can remove meta packages:

linux-image-generic linux-headers-generic for 3.13

linux-image-generic-lts-utopic linux-headers-generic-lts-utopic for 3.16

Solution 4

  1. Go to http://kernel.ubuntu.com/~kernel-ppa/mainline/
  2. Enter the most recent v3.19 directory (today it is v3.19.2-vivid)
  3. Download 3 files:

    linux-headers-3.19.X-ZZZZZZ_3.19.X-ZZZZZZ.YYYYMMDDHHMM_all.deb
    linux-headers-3.19.X-ZZZZZZ-generic_3.19.X-ZZZZZZ.YYYYMMDDHHMM_ARCH.deb
    linux-image-3.19.X-ZZZZZZ-generic_3.19.X-ZZZZZZ.YYYYMMDDHHMM_ARCH.deb
    

    Be careful, one of the linux-headers is common to all architectures (_all.deb). The other linux-headers and the linux-image must match your machine's architecture (_i386.deb or _amd64.deb).

  4. From the terminal, install all of them by running:

    sudo dpkg -i linux-{image,headers}-3.19.*.deb
    

    Or just use the TAB auto-completion to help you typing the full file names.

Share:
64,474

Related videos on Youtube

Degenerate
Author by

Degenerate

Updated on September 18, 2022

Comments

  • Degenerate
    Degenerate almost 2 years

    So I'm rebuilding my storage server. For stability, I want to use Ubuntu server 14.04 LTS as the OS. However, I'm planning to use Btrfs with RAID 5, and this has been greatly improved in kernel 3.19. So I want to use that kernel with 14.04.

    I know that 3.19 is the kernel that will be used in 15.04, and is scheduled to be released in August as a HWE kernel and the default for 14.04.3. But I need to build this server now.

    I don't want to get into funky custom set-ups that will break things in future. So what is the most trouble free way I can use that kernel now on top of a 14.04.2 installation, that can be easily reverted to standard in August, when I can dist-upgrade to 14.04.3 and get the kernel I want as standard?

    • Admin
      Admin over 9 years
      One way to do it is get the 3.19 packages from this PPA, and install them manually with dpkg -i. I don't know if this is the most (or the second/third most) trouble free way, but it is something to try.
    • Admin
      Admin over 9 years
      I'm actually facing this exact same issue myself at the moment. The question I had is: is upgrading to kernel 3.19 enough to get the better support, or is it also necessary to upgrade btrfs-tools?
    • Admin
      Admin over 9 years
      @TobyJ That's a good point about btrfs-utils, I think the answer is yes, I'll have to look into upgrading that package too.
    • Admin
      Admin almost 9 years
      Yes, you can. Follow official instructions at wiki.ubuntu.com/Kernel/LTSEnablementStack
  • Degenerate
    Degenerate over 9 years
    Thanks David, I'll go with this, then use ppa-purge to clean up in August before I dist-upgrade.
  • Ljiljan Veselinovic
    Ljiljan Veselinovic about 9 years
    I would like to update kernel as well. However, can you write commands (or instructions) how to restore to old one in case my update fail? Currently I am using Ubuntu 14.04.2 with linux kernel 3.16.
  • David Foerster
    David Foerster about 9 years
    Kernel updates don't replace previous kernels. You can select to boot different/previous kernels in the GRUB menu during boot.
  • Pilot6
    Pilot6 about 9 years
    Now there is no need to use this ppa. 3.19 kernel is in trusty-updates repository. It can be installed by sudo apt-get install linux-generic-lts-vivid.
  • Pilot6
    Pilot6 about 9 years
    It is not recommended to install mainline kernels with no specific reason. Especially when Ubuntu kernel is available.
  • dezso
    dezso over 8 years
    @Pilot6 I guess when someone ventures into installing kernels, they know they have a specific reason.
  • Eric Carvalho
    Eric Carvalho over 8 years
    Also, linux-generic-lts-vivid wasn't available at the time of this answer.
  • smac89
    smac89 over 8 years
    Is this still the latest? What about wily?
  • David Foerster
    David Foerster over 8 years
    @Smac89: You can install the kernel of Wily (v4.2) in a similar fashion, but that's outside the scope of this question.
  • syntaxerror
    syntaxerror over 8 years
    @EricCarvalho To my knowledge, linux-headers is only necessary if you want to compile your own kernel. If you just want to use the kernel, linux-image will be perfectly sufficient.
  • syntaxerror
    syntaxerror over 8 years
    @Pilot6 In my case, I actually had to. On my old machine, nothing before 4.4.0 made my PATA controller initialize and the drive(s) boot (LP bug 1536397). And at the time of writing, 4.3.4 is latest available in Xenial. However, I can now prove that any kernel from 4.2.0 to last before 4.4.0 is unusable. Sometimes the Ubuntu folks really take WAY TOO long to release a kernel to the public. 4.4.0 is really excellent; but I don't expect it to be included in 16.04 final in April. So bug reports will accumulate in no time, instead of them ditching 4.2 and 4.3 once and for all.
  • syntaxerror
    syntaxerror over 8 years
    @DavidFoerster Thank you. Didn't expect that, but...it really looks squeaky clean now after removing all that struckthrough stuff. Cheers. ( If the user really does want to know what was previously there, they can look in answer history.)
  • Auspex
    Auspex over 8 years
    @syntaxerror Actually, you frequently need linux-headers if you want to compile anything. Certainly if you need to compile any kernel modules (say, for instance, you have a USB dongle that isn't in the mainline kernel). Also, 4.4.0 is now available in Trusty, and linux-image-generic still doesn't depend on it. What's up with that? So much for "will always depend on latest..."