12

Somehow I got a 12.04 server to stop updating the kernel. It's stuck at 3.2.0-24-generic and doesn't want to fetch any new updates. The new kernel at the moment is 3.2.0-29

apt-get clean && sudo apt-get autoremove 
apt-get -f install
apt-get update
apt-get dist-upgrade

Shows "0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." There were no failed installs. /var/log/aptitude doesn't show any errors

My sources.list:

###### Ubuntu Main Repos
deb http://ca.archive.ubuntu.com/ubuntu/ precise main restricted
deb-src http://ca.archive.ubuntu.com/ubuntu/ precise main restricted

###### Ubuntu Update Repos
deb http://ca.archive.ubuntu.com/ubuntu/ precise-security main restricted
deb http://ca.archive.ubuntu.com/ubuntu/ precise-updates main restricted
deb-src http://ca.archive.ubuntu.com/ubuntu/ precise-security main restricted
deb-src http://ca.archive.ubuntu.com/ubuntu/ precise-updates main restricted

###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu precise partner
deb-src http://archive.canonical.com/ubuntu precise partner

Anyone know what's wrong? Thanks

RolandiXor
  • 51,541
Budric
  • 295
  • 2
  • 6
  • 15

1 Answers1

20

You have probably removed linux metapackage by accident. If so, that should be fixed by:

sudo apt-get install linux


Further explanation:

Because of technical reasons it's not wise for the kernels to be upgraded and replaced with the new one (i.e. let's say if the new one fails you may still boot into the old one).
Thus they are packaged under the names like linux-image-3.2.0-24-generic.

So, if you upgrade the system, technically there is no update to this version! Unless you install the linux metapackage which always depends on the latest kernel, meaning that whenever an update to the kernel is available, linux will change version, and it will depend on the newer kernel, and thus the new kernel will be automatically installed.

Remember that your older kernel won't be removed this way, which is a good thing. If you find anything odd you may boot into the old one (grub -> Previous versions or something like that) and remove the new kernel.

RolandiXor
  • 51,541
semekh
  • 569
  • At the very least this installed the new kernel. I'll see when the next kernel comes out if dist-upgrade works, but I think you're right. Thanks. – Budric Aug 13 '12 at 17:48
  • 7
    By default, the linux metapackage is actually not installed. But the linux-image-generic metapackage (or whatever other metapackage for the particular flavor of kernel the OS was installed with). In this case, linux-image-generic was probably uninstalled to produce this problem. – Eliah Kagan Aug 13 '12 at 20:26
  • I have had the same issue on ubuntu 12.04.1 on a clean install which probably means linux was not packaged as part of the release to begin with. – Azizur Rahman Oct 21 '12 at 12:12
  • 11
    For me it it was apt-get install linux-generic that solved this problem for me on 14.04. http://askubuntu.com/questions/451171/on-14-04-my-kernel-version-is-3-11-0-18 – David Oct 12 '14 at 13:33
  • For me it it was apt-get install linux-generic as well – Karl Forner May 11 '16 at 15:14