2

I'm running version 16.0.4 server.

I was having some strange problems with lockups with one of the newer kernels so I wanted to downgrade and stick to one that I knew was going to be fine for me and not cause problems.

I came across this question (Kernel downgrade after update broke my system). I followed the advice in this answer.

He notes:

Please note, that also package linux-image-generic-lts-raring will be removed. That means that your kernel version will not be upgraded in future with apt-get upgrade. Only when you reinstall linux-image-generic-lts-raring will the kernel version get upgraded. So this is a permanent solution.

How can I reinstall linux-image-generic-lts-raring or so that I can get the latest kernel once again?

Currently when I run an apt-get update apt-get upgrade I get nothing. I'd like to update all of my packages to the latest versions again.

Here's the output of apt-cache policy linux-image-generic

linux-image-generic:
  Installed: (none)
  Candidate: 4.4.0.77.83
  Version table:
     4.4.0.77.83 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
     4.4.0.75.81 500
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
     4.4.0.21.22 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

After apt-get install linux-image-generic -> reboot the output of apt-cache policy linux-image-generic:

linux-image-generic:
  Installed: 4.4.0.77.83
  Candidate: 4.4.0.77.83
  Version table:
 *** 4.4.0.77.83 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     4.4.0.75.81 500
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
     4.4.0.21.22 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

Here's the output of Output of dpkg -l linux-image*:

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                                  Version                         Architecture                    Description
+++-=====================================================-===============================-===============================-===============================================================================================================
un  linux-image                                           <none>                          <none>                          (no description available)
rc  linux-image-4.4.0-31-generic                          4.4.0-31.50                     amd64                           Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-53-generic                          4.4.0-53.74                     amd64                           Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-57-generic                          4.4.0-57.78                     amd64                           Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-59-generic                          4.4.0-59.80                     amd64                           Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-62-generic                          4.4.0-62.83                     amd64                           Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-63-generic                          4.4.0-63.84                     amd64                           Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-64-generic                          4.4.0-64.85                     amd64                           Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-65-generic                          4.4.0-65.86                     amd64                           Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-66-generic                          4.4.0-66.87                     amd64                           Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-67-generic                          4.4.0-67.88                     amd64                           Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-70-generic                          4.4.0-70.91                     amd64                           Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.4.0-71-generic                          4.4.0-71.92                     amd64                           Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-72-generic                          4.4.0-72.93                     amd64                           Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-75-generic                          4.4.0-75.96                     amd64                           Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-77-generic                          4.4.0-77.98                     amd64                           Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-31-generic                    4.4.0-31.50                     amd64                           Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-53-generic                    4.4.0-53.74                     amd64                           Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-57-generic                    4.4.0-57.78                     amd64                           Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-59-generic                    4.4.0-59.80                     amd64                           Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-62-generic                    4.4.0-62.83                     amd64                           Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-63-generic                    4.4.0-63.84                     amd64                           Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-64-generic                    4.4.0-64.85                     amd64                           Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-65-generic                    4.4.0-65.86                     amd64                           Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-66-generic                    4.4.0-66.87                     amd64                           Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-67-generic                    4.4.0-67.88                     amd64                           Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-70-generic                    4.4.0-70.91                     amd64                           Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-extra-4.4.0-71-generic                    4.4.0-71.92                     amd64                           Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-72-generic                    4.4.0-72.93                     amd64                           Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-75-generic                    4.4.0-75.96                     amd64                           Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-77-generic                    4.4.0-77.98                     amd64                           Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-generic                                   4.4.0.77.83                     amd64                           Generic Linux kernel image

When I run apt-get update and apt-get upgrade it still shows zero updates available. I'm quite sure there should be updates available.

  • what is the output of apt-cache policy linux-image-generic – Charles Green May 09 '17 at 15:32
  • have you tried to install it with 'sudo apt-get install linux-image-generic-lts-raring' – hatterman May 09 '17 at 15:34
  • @hatterman The raring refers to Ubuntu Raring Ringtail, which is Ubuntu 13.04 - that package will not be available, as 13.04 reached end-of-life quite some time ago. – Charles Green May 09 '17 at 15:37
  • 2
    so sudo apt-get install linux-image-generic-lts-xenial – hatterman May 09 '17 at 15:58
  • @CharlesGreen I added the output. – Michael Ecklund May 09 '17 at 16:13
  • Thanks. The meta-package 'linux-image-generic' is generally used to get the lastest kernel for your OS. However, there have been a lot of reported problems with 4.4.0.77, and most people have rolled back to 4.4.0.75. I would suggest you run sudo apt-get install linux-image-4.4.0.75-generic which will bring you to a believed good version. Follow this with a reboot, and uname -r to check that you are running the new kernel version. – Charles Green May 09 '17 at 18:55
  • @CharlesGreen I did apt-get install linux-image-generic -> reboot. When I run uname -r, it says 4.4.0-77-generic, but when I try to run apt-get install linux-image-generic again, it says linux-image-generic is already the newest version (4.4.0.77.83).. Is that accurate? The versions don't match up 100%. Also when I log into SSH it says Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-77-generic x86_64). Further more, it's been quite some time since I've seen any packages available for update. I just tried to update again, and it still says nothing needs to be updated. Seems odd. – Michael Ecklund May 11 '17 at 14:59
  • K - you are now running the lastest version of the kernel for Ubuntu 16.04. I don't know what packages have been updated in that repository, or when, so I can't really answer that question. I generally run my updates manually via sudo apt-get update && sudo apt-get upgrade, so that I can see what will be upgraded prior to committing. – Charles Green May 11 '17 at 21:02
  • @CharlesGreen Would you like to compose an answer based on our discussion? It's working. I'm getting updates again. – Michael Ecklund May 16 '17 at 14:43
  • Glad to hear that your got things working again! – Charles Green May 16 '17 at 15:04

1 Answers1

1

The removal of the package linux-image-generic-lts-raring (or it's equivalent) prevents your system from obtaining the latest version of kernel updates. In your specific case, running sudo apt-get install linux-image-generic will load the meta-package designed to install the lastest kernels for your distribution.

After the installation of this package, you should reboot and ensure that you are running the lastest version using the command uname -r, as you may have also pinned your kernel in a manner similar to How to skip kernel update?. You may have also set a specific kernel version to use as boot, in a manner similar to How do I set Windows to boot as the default in the boot loader?

Finally, the output of dpkg -l linux-image* indicates that you are carrying a lot of older kernel versions. This is not by itself a problem, but can cause issues if you have a separate /boot partition or limited disk space. If you have satisfied yourself that the kernel is operating properly and you are not having problems, please consider running sudo apt-get autoremove, as mentioned in How do I remove old kernel versions to clean up the boot menu? and How do I free up more space in /boot?

Charles Green
  • 21,339
  • Can you tell me how to reduce the number of kernels listed from dpkg -l linux-image* ? I've used apt-get autoremove and rebooted. However, there's still a huge list of kernels when I send the command dpkg -l linux-image*. – Michael Ecklund May 16 '17 at 16:07
  • @MichaelEcklund Did you remember the sudo bit? There are some alternatives mentioned here (Bikeshed is a neat set of programs) and here – Charles Green May 16 '17 at 16:15