6

I recently ran:

sudo apt-get update && sudo apt-get dist-upgrade

And that installed the latest version of the linux kernel for 15.10. However, once I ran:

sudo apt-get autoremove

I got this output:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED
  linux-headers-4.2.0-16 linux-headers-4.2.0-16-generic
  linux-image-4.2.0-16-generic linux-image-extra-4.2.0-16-generic
0 to upgrade, 0 to newly install, 4 to remove and 0 not to upgrade.
After this operation, 287 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 266582 files and directories currently installed.)
Removing linux-headers-4.2.0-16-generic (4.2.0-16.19) ...
Removing linux-headers-4.2.0-16 (4.2.0-16.19) ...
Removing linux-image-extra-4.2.0-16-generic (4.2.0-16.19) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.2.0-16-generic /boot/vmlinuz-4.2.0-16-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.2.0-16-generic /boot/vmlinuz-4.2.0-16-generic
dkms: WARNING: Linux headers are missing, which may explain the above failures.
      please install the linux-headers-4.2.0-16-generic package to fix this.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.2.0-16-generic /boot/vmlinuz-4.2.0-16-generic
update-initramfs: Generating /boot/initrd.img-4.2.0-16-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.2.0-16-generic /boot/vmlinuz-4.2.0-16-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.2.0-16-generic /boot/vmlinuz-4.2.0-16-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.2.0-16-generic /boot/vmlinuz-4.2.0-16-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.2.0-17-generic
Found initrd image: /boot/initrd.img-4.2.0-17-generic
Found linux image: /boot/vmlinuz-4.2.0-16-generic
Found initrd image: /boot/initrd.img-4.2.0-16-generic
Found memtest86+ image: /memtest86+.elf
Found memtest86+ image: /memtest86+.bin
done
Removing linux-image-4.2.0-16-generic (4.2.0-16.19) ...
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms 4.2.0-16-generic /boot/vmlinuz-4.2.0-16-generic
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.2.0-16-generic /boot/vmlinuz-4.2.0-16-generic
update-initramfs: Deleting /boot/initrd.img-4.2.0-16-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.2.0-16-generic /boot/vmlinuz-4.2.0-16-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.2.0-17-generic
Found initrd image: /boot/initrd.img-4.2.0-17-generic
Found memtest86+ image: /memtest86+.elf
Found memtest86+ image: /memtest86+.bin
done
The link /vmlinuz.old is a damaged link
Removing symbolic link vmlinuz.old 
 you may need to re-run your boot loader[grub]
The link /initrd.img.old is a damaged link
Removing symbolic link initrd.img.old 
 you may need to re-run your boot loader[grub]

In which this error stood out the most (I think I may have got the error during the installation as well but I can't really remember):

dkms: WARNING: Linux headers are missing, which may explain the above failures.
      please install the linux-headers-4.2.0-16-generic package to fix this.

I have had a look at this question already but it was of no help. So what exactly does this error mean and what should I do about it?


OS Information:

LSB Version:    core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:core-4.1-amd64:core-4.1-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 15.10
Release:    15.10
Codename:   wily
Flavour: GNOME
GNOME Version: 3.18

2 Answers2

5

The update to the 4.2.0-17-generic kernel did not contain the headers. Those come down later. The autoremove removed the older headers from the last kernel 4.2.0-16-generic which the script was not supposed to do.

Reinstall the older kernel header by typing in:

sudo apt-get install linux-headers-4.2.0-16-generic

Hope this helps!

Terrance
  • 41,612
  • 7
  • 124
  • 183
  • So if it was not meant to do this then is this some sort of bug that I should report? –  Nov 06 '15 at 21:23
  • @ParanoidPanda That is fine you ran it, but the apt-get autoremove removed the headers when it wasn't supposed to. Sometimes the script that controls it does not work as intended. It was supposed to skip the last kernel, and remove the older ones. I wrote an answer a while ago about this http://askubuntu.com/a/620281/231142 explaining it. You can try to hold the last kernel before you run autoremove. Which would be sudo apt-mark hold <kernel version> – Terrance Nov 06 '15 at 21:26
  • @ParanoidPanda And I have noticed that you get the kernel and the image before the headers gets installed. That is why it asks for a password when the last part comes in. I can't figure out why they don't push all three parts together. – Terrance Nov 06 '15 at 21:30
  • So the part that the script is not meant to do, is that a bug? –  Nov 06 '15 at 21:50
  • @ParanoidPanda I guess you could call it a bug since it let it go through. They would need to have it verified from more than one source to do it. I am wondering if somehow the part of apt-mark tagged the -16 kernel for removal even though it was the last kernel installed. – Terrance Nov 06 '15 at 21:55
  • A critical problem. I used update installer (ubuntu built in) and it had kernel headers in it. I reetarted using the restart button it shown an now - first time after the day when Ubuntu got installed - it shows the password input screen again( it was turned off) and now I can't input password, it just gives wird sound. The same when I try to get in guest session. So I just can't use ny computer. Help me! This is serious problem!:( – Adrians Netlis Nov 07 '15 at 07:38
2

"linux-headers-generic" package may not be installed.

You can check using

apt-cache policy linux-headers-generic

and fix it using

sudo apt-get install linux-headers-generic
ARG
  • 487