0

I am aware that similar questions have been asked countless times, but I have not been able so far to find an appropriate match for my case.

I am running a 32-bit, 14.04 server within an OpenVZ container, which provides this kernel:

$ uname -r
2.6.32-042stab116.2

Not sure how/why it started, but apt has been repeatedly trying (and failing) to upgrade to the 3.13 series, ending up like this:

$ dpkg -l |grep linux
ii  libselinux1:i386                     2.2.2-1ubuntu0.1                     i386         SELinux runtime shared libraries
ii  linux-firmware                       1.127.22                             all          Firmware for Linux kernel drivers
ii  linux-headers-3.13.0-100             3.13.0-100.147                       all          Header files related to Linux kernel version 3.13.0
ii  linux-headers-3.13.0-100-generic     3.13.0-100.147                       i386         Linux kernel headers for version 3.13.0 on 32 bit x86 SMP
ii  linux-headers-3.13.0-101             3.13.0-101.148                       all          Header files related to Linux kernel version 3.13.0
ii  linux-headers-3.13.0-101-generic     3.13.0-101.148                       i386         Linux kernel headers for version 3.13.0 on 32 bit x86 SMP
ii  linux-headers-3.13.0-91              3.13.0-91.138                        all          Header files related to Linux kernel version 3.13.0
ii  linux-headers-3.13.0-91-generic      3.13.0-91.138                        i386         Linux kernel headers for version 3.13.0 on 32 bit x86 SMP
ii  linux-headers-3.13.0-92              3.13.0-92.139                        all          Header files related to Linux kernel version 3.13.0
ii  linux-headers-3.13.0-92-generic      3.13.0-92.139                        i386         Linux kernel headers for version 3.13.0 on 32 bit x86 SMP
ii  linux-headers-3.13.0-93              3.13.0-93.140                        all          Header files related to Linux kernel version 3.13.0
ii  linux-headers-3.13.0-93-generic      3.13.0-93.140                        i386         Linux kernel headers for version 3.13.0 on 32 bit x86 SMP
ii  linux-headers-3.13.0-96              3.13.0-96.143                        all          Header files related to Linux kernel version 3.13.0
ii  linux-headers-3.13.0-96-generic      3.13.0-96.143                        i386         Linux kernel headers for version 3.13.0 on 32 bit x86 SMP
iF  linux-image-3.13.0-92-generic        3.13.0-92.139                        i386         Linux kernel image for version 3.13.0 on 32 bit x86 SMP
iF  linux-image-3.13.0-93-generic        3.13.0-93.140                        i386         Linux kernel image for version 3.13.0 on 32 bit x86 SMP
iF  linux-image-3.13.0-96-generic        3.13.0-96.143                        i386         Linux kernel image for version 3.13.0 on 32 bit x86 SMP
rH  linux-image-extra-3.13.0-100-generic 3.13.0-100.147                       i386         Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
rH  linux-image-extra-3.13.0-101-generic 3.13.0-101.148                       i386         Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
rH  linux-image-extra-3.13.0-92-generic  3.13.0-92.139                        i386         Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
iU  linux-image-extra-3.13.0-93-generic  3.13.0-93.140                        i386         Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
iU  linux-image-extra-3.13.0-96-generic  3.13.0-96.143                        i386         Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
ii  linux-libc-dev:i386                  3.13.0-101.148                       i386         Linux Kernel Headers for development
ii  syslinux                             3:4.05+dfsg-6+deb8u1                 i386         collection of boot loaders
ii  syslinux-common                      3:4.05+dfsg-6+deb8u1                 all          collection of boot loaders (common files)
ii  util-linux                           2.20.1-5.1ubuntu20.7                 i386         Miscellaneous system utilities

My understanding is that the kernel is entirely under the OpenVZ host's responsibility, and I have been advised to simply get rid of all these images, which are ignored by the system anyway. However, all my attempts to completely remove the packages have failed with various error messages.

This is what happened when I tried to explicitly purge all unwanted linux* packages.

Using aptitude instead of apt-get got rid of a a few packages and changed the status of all remaining images to pH, but did not resolve the problem:

$ dpkg -l |grep linux
ii  libselinux1:i386                     2.2.2-1ubuntu0.1                     i386         SELinux runtime shared libraries
ii  linux-firmware                       1.127.22                             all          Firmware for Linux kernel drivers
ii  linux-headers-3.13.0-100             3.13.0-100.147                       all          Header files related to Linux kernel version 3.13.0
ii  linux-headers-3.13.0-100-generic     3.13.0-100.147                       i386         Linux kernel headers for version 3.13.0 on 32 bit x86 SMP
ii  linux-headers-3.13.0-91              3.13.0-91.138                        all          Header files related to Linux kernel version 3.13.0
ii  linux-headers-3.13.0-91-generic      3.13.0-91.138                        i386         Linux kernel headers for version 3.13.0 on 32 bit x86 SMP
ii  linux-headers-3.13.0-92              3.13.0-92.139                        all          Header files related to Linux kernel version 3.13.0
ii  linux-headers-3.13.0-92-generic      3.13.0-92.139                        i386         Linux kernel headers for version 3.13.0 on 32 bit x86 SMP
ii  linux-headers-3.13.0-93              3.13.0-93.140                        all          Header files related to Linux kernel version 3.13.0
ii  linux-headers-3.13.0-93-generic      3.13.0-93.140                        i386         Linux kernel headers for version 3.13.0 on 32 bit x86 SMP
ii  linux-headers-3.13.0-96              3.13.0-96.143                        all          Header files related to Linux kernel version 3.13.0
ii  linux-headers-3.13.0-96-generic      3.13.0-96.143                        i386         Linux kernel headers for version 3.13.0 on 32 bit x86 SMP
pH  linux-image-extra-3.13.0-100-generic 3.13.0-100.147                       i386         Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
pH  linux-image-extra-3.13.0-101-generic 3.13.0-101.148                       i386         Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
pH  linux-image-extra-3.13.0-92-generic  3.13.0-92.139                        i386         Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
pH  linux-image-extra-3.13.0-93-generic  3.13.0-93.140                        i386         Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
pH  linux-image-extra-3.13.0-96-generic  3.13.0-96.143                        i386         Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
ii  linux-libc-dev:i386                  3.13.0-101.148                       i386         Linux Kernel Headers for development
ii  syslinux                             3:4.05+dfsg-6+deb8u1                 i386         collection of boot loaders
ii  syslinux-common                      3:4.05+dfsg-6+deb8u1                 all          collection of boot loaders (common files)
ii  util-linux                           2.20.1-5.1ubuntu20.7                 i386         Miscellaneous system utilities

I ran aptitude again on the above list of 3.13 packages, and this time all headers were gone, but the "extra" images are still there.

$ dpkg -l |grep linux
pH  linux-image-extra-3.13.0-100-generic 3.13.0-100.147                       i386         Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
pH  linux-image-extra-3.13.0-101-generic 3.13.0-101.148                       i386         Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
pH  linux-image-extra-3.13.0-92-generic  3.13.0-92.139                        i386         Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
pH  linux-image-extra-3.13.0-93-generic  3.13.0-93.140                        i386         Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
pH  linux-image-extra-3.13.0-96-generic  3.13.0-96.143                        i386         Linux kernel extra modules for version 3.13.0 on 32 bit x86 SMP
[...]

I gave it yet another go, and this is the output. It looks as though in order to purge these extra images (with obvious unmet dependencies, since the corresponding images are gone) some files required by aptitude are missing:

depmod: FATAL: could not load /boot/System.map-3.13.0-100-generic: No such file or directory
Giuseppe
  • 203
  • Please provide the exact commands you are running, and the output you obtain. – fkraiem Nov 27 '16 at 21:17
  • @fkraiem, I have gone through several steps, please see my edits, and thanks a lot for your help! – Giuseppe Nov 28 '16 at 08:12
  • I just noticed that in your first dpkg -l command, for some versions you have the linux-image-extra packages installed but not the corresponding linux-image ones. That's not a good thing, those two packages should always go together. And now you have this for all versions, which is why you can't uninstall the linux-image-extra packages. You should reinstall the linux-image packages, and then be sure to always remove linux-image and linux-image-extra together. – fkraiem Nov 28 '16 at 08:24
  • A simple apt-get -f install may also help to install the missing linux-image packages, bringing you back to a stable state where you can then uninstall everything. – fkraiem Nov 28 '16 at 08:28
  • @fkraiem, yes, having extras without the matching images is clearly problematic, but I have only executed commands via apt-get or aptitude. I would not dare manually delete stuff. Now, do you mean apt-get -f install followed by the list of *image* and *image-extra* for all the versions? (92, 93, 96, 100, 101) – Giuseppe Nov 28 '16 at 08:41
  • No, apt-get -f install should be run by itself. – fkraiem Nov 28 '16 at 08:42
  • Given the state of things, apt-get -f install by itself will try to REMOVE/PURGE the image-extras, again resulting in errors. – Giuseppe Nov 28 '16 at 10:55
  • @fkraiem, hoping it's proper etiquette, I have reformulated my question in a more focused way here: http://askubuntu.com/questions/855755/force-removal-of-unwanted-linux-image-extra-packages – Giuseppe Dec 03 '16 at 14:39
  • Sorry, I had been busy. Proper etiquette would probably have been to edit this question, which would also have 'bumped' it to the top. – fkraiem Dec 03 '16 at 14:43
  • @Giuseppe, if the solution in your other question worked, it covers this issue too , we may close this one a duplicate. – user.dz Dec 11 '16 at 08:53

0 Answers0