4

I'm on Ubuntu 14.04. My kernel version is kernel: 3.16.0-031600rc4-generic. I must at some point, for some reason, have switched to a development kernel but I can't remember how. How do I switch back to the stable kernel in such a way that this will persist over updates?

Output of apt-cache policy linux-generic

$ apt-cache policy linux-generic
linux-generic:
  Installed: (none)
  Candidate: 3.13.0.63.71
  Version table:
     3.13.0.63.71 0
        500 http://nl.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     3.13.0.24.28 0
        500 http://nl.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
  • Edit your question and add the output of apt-cache policy linux-generic – A.B. Sep 28 '15 at 11:06
  • Try sudo apt-get install linux-generic to install the latest kernel for your distribution and test is. Give me a ping in the comments via @A.B. – A.B. Sep 28 '15 at 13:53
  • Oh, @A.B. you deleted your answer and my comment. Anyway, I think the 3.16rc4 kernel will still load by default, so I gave an answer to delete it. – Doug Smythies Sep 28 '15 at 14:28
1

The problem with trying/testing kernels from a series more recent than the series used in your version of Ubuntu is that it will be what grub loads by default. You will have to delete kernel the 3.16 series kernel for things to fall back to working by default.

First, make sure that you can easily get to grub during boot time, so that you can select which kernel you want the system to boot with. As sudo edit /etc/default/grub, and set a long enough timeout to ensure that you have time to access it during boot. Perhaps save a copy of the original file first. I use these settings:

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=20 

After the edit do:

sudo update-grub

Now, re-boot. During re-boot access the Advanced Options for Ubuntu line to open the secondary menu. From the list of kernels select the most recent 3.13 numbered kernel.

Once booted, proceed to deleting kernel 3.16.0-031600rc4-generic. For the RC kernels, typically this would be 3 packages. To confirm:

dpkg -l | grep linux-

then (I think):

sudo dpkg -r linux-headers-3.16.0-031600rc4-generic
sudo dpkg -r linux-headers-3.16.0-031600rc4
sudo dpkg -P linux-image-3.16.0-031600rc4-generic

Note: I always purge the kernel image.
re-boot, and let the grub timeout expire without doing anything. i.e. do a default boot. Do you know have a 3.13 series kernel? Now, you can go back to whatever grub timeouts, or lack thereof, you prefer.

| improve this answer | |
  • Cheers, that did it! $ uname -r gives me 3.19.0-28-generic (after installing that using Pilot6's answer below) – user2140693 Sep 28 '15 at 15:51
  • Why the low-level dpkg -r? apt remove would work fine. – fkraiem Oct 12 '16 at 15:59
  • @fkraiem: No reason, I just prefer primitive level commands. sudo apt remove linux-headers-3.16.0-031600rc4-generic linux-headers-3.16.0-031600rc4' and sudo apt purge linux-image-3.16.0-031600rc4-generic' would have also worked fine. – Doug Smythies Oct 19 '16 at 14:43
  • Any suggestion for doing this on remote server where I cannot connect to an interactive grub session during reboot? – cboettig Apr 28 at 0:43
  • @cboettig : Yes, there is a way to get grub to boot to not the default kernel. try here – Doug Smythies Apr 28 at 1:35
1

There are for major stable versions for Ubuntu 14.04.

They are: 3.13, 3.16, 3.19 and 4.4

You can install either of them by running:

sudo apt-get install linux-generic

for 3.13

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

for 3.16

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

for 3.19

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

You can have all these kernels installed, and they will get updates.

You need to know that the system always boot with the latest kernel by default. If you install 3.19 kernel, Ubuntu will boot with it no matter which 3.13 and 3.16 kernel images are installed.

You can always remove unneeded kernel images and headers using Synaptic.

Update: Now only 3.13 and 4.4 are supported and get updates.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.