dist-upgrade wants to remove current kernel and it's modules

Asked by Anders Paulsen

When running apt-get dist-upgrade on a fully upgraded Ubuntu Feisty installation, which has gutsy sources in /etc/apt/sources.list, apt-get is proposing to remove linux-image-2.6.17-11-386, and not upgrade it, or install a newer version. Why does this occur, and how can I work around it?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
Bhavani Shankar
Solved:
Last query:
Last reply:
Revision history for this message
Anders Paulsen (anders-sce) said :
#1

I tried installing linux-image-2.6.22-15-386 before doing a dist-upgrade, but dist-upgrade just wants to remove that as well, and not install a new kernel this time either.

Revision history for this message
Bhavani Shankar (bhavi) said :
#2

This is apt-get's normal behaviour - since the old kernel isn't in conflict with the new kernel, nothing gets removed. Normally, aptitude would actually remove the old kernel since it was automatically installed
by another virtual package and that package no longer depends on it.

There's a special config file in /etc/apt/apt.conf.d/05aptitude that prevents that:

aptitude::Keep-Unused-Pattern "^linux-image.*$ | ^linux-restricted-modules.*$ | ^linux-ubuntu-modules.*$";

Regards

Revision history for this message
Anders Paulsen (anders-sce) said :
#3

Thank you for your answer! Last week I upgraded another server from feisty to gutsy, and didn't experience this, so before closing this question, I'd like to ask, why wasn't there a new kernel image to be installed when upgrading to gutsy? I'm kinda curious :)

Anders

Revision history for this message
Best Bhavani Shankar (bhavi) said :
#4

See if your kernel package is locked in synaptic package manager....

and reply back!....

Revision history for this message
Anders Paulsen (anders-sce) said :
#5

No, the package is not locked as far as I can see, but I discovered that the meta-package linux-image-386 wasn't installed. After I installed that, everything seemed fine. Thank you again for your help!

Revision history for this message
Anders Paulsen (anders-sce) said :
#6

Thanks Bhavani Shankar, that solved my question.