5

I ran the following a week ago to upgrade from 16.04.1 to 16.04.2 with HWE:

sudo apt install --install-recommends xserver-xorg-hwe-16.04

It installed a 4.8 kernel which I'm running now. Just now, I ran the following:

sudo apt update && sudo apt dist-upgrade

This installed the 4.4.0-62-generic kernel and made that the kernel that will be booted into, I think, because it's pointed to by /initrd.img and /vmlinuz. How do I stop future updates of the 4.4 kernel series and set the kernel that will be booted into next time back to the 4.8 kernel series?

  • Very timely because @cl-netbox recommended your line 1 to me today and I mentioned there are negative impacts reported in Ask Ubuntu. You should be able to see 4.8 kernels under Advanced Options menu in grub but more importantly the highest numbered kernel should always be the default. – WinEunuuchs2Unix Feb 21 '17 at 0:15
5

I encountered this this morning, fortunately I stopped it before it installed the new kernel. The HWE instructions should have covered this IMHO.

To prevent future problems of this nature, just delete the linux-generic entries. Until you do this, you will have two sets of packages that can be updated with different kernels.

sudo apt remove linux-generic linux-headers-generic linux-image-generic

Future kernel updates will come through the linux-generic-hwe-16.04 package.

  • I've tried this, and it stops the kernel, but it doesn't stop the following: The following NEW packages will be installed: linux-tools-4.4.0-65 linux-tools-4.4.0-65-generic. How do I stop those? – Chai T. Rex Mar 2 '17 at 16:37
  • I don't have any linux-tools* installed, but from messing around in a virtual machine, it looks like you should remove linux-tools-generic and install linux-tools-generic-hwe-16.04. But caveat, I have no experience with this. – Organic Marble Mar 2 '17 at 16:50
  • It looks like removing those two packages also removed linux-tools-virtual—so I think that's the main package—and installing linux-tools-virtual-hwe-16.04 put in the tools packages for the 4.8 kernel version. – Chai T. Rex Mar 2 '17 at 17:51
1

If you manually choose desired kernel, it wont reverse it back. So far 4.8 HWE was installed as dependency, as far as I understad. Try:

$ sudo apt-get install linux-image-generic-hwe-16.04

Then you may try dist-upgrade again.

  • Those commands (install and dist-upgrade) set the HWE kernel package to manually installed, but don't do anything to unset the 4.4 kernel. /initrd.img and /vmlinuz still both point to the 4.4 kernel. – Chai T. Rex Feb 21 '17 at 0:17
  • apt policy linux-generic also still shows as installed with the 4.4 kernel's version. Should I apt remove linux-generic? – Chai T. Rex Feb 21 '17 at 0:20
  • Have you tried to reboot? I suspect that links to right kernel is set somewhere in boot process, because most time you have more than one kernel availabl to boot, but links are not with versions. – wk. Feb 21 '17 at 0:23
  • As removing generic kernel I would not rush with it. And if you ask about linux-generic apt policy tells you aboout linux-generic ;) – wk. Feb 21 '17 at 0:25
  • 1
    @ChaiT.Rex you were on the right track with your comment about removing linux-generic. See my answer. – Organic Marble Feb 21 '17 at 1:09

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.