How to keep kernel from upgrade?

Derek Broughton news at pointerstop.ca
Fri Oct 19 13:46:56 UTC 2007


Andrew Glen-Young wrote:

> On 19/10/2007, aries <aries1998 at gmail.com> wrote:
>> I use make-kpkg to create a kernel deb called
>> linux-image-2.6.22.14-digiman , and install it use the dpkg .
>> Now the menu.lst have two kernel entries: linux-2.6.22-14-generic  and
>> linux-image-2.6.22.14-digiman
>>
>> what i mean is just preventing linux-image/linux-header from upgrade,
>> unless i do it manually(with dpkg) but not apt-get .
>>
> 
> I think what you want is known as 'apt-pinning'. Check the
> apt_preferences(5) man page to show you how to do this.
> 
> Whether this is a good idea is left up to you ;-)

Heavens, no.  That's serious overkill.

Basically, kernel images are upgraded without being removed by two
processes:

1) The package linux-image-generic has it's dependencies changed so that it
now relies on the newest kernel image;

2) /etc/apt/apt.conf.d/01ubuntu specifically prevents autoremoval of the
no-longer-depended old kernel

So the simple way to prevent upgrading the kernel is to either "hold"
linux-image-generic, or to remove it (note, if you remove it, you'll lose
the *-desktop package, thus potentially breaking future upgrades).
-- 
derek





More information about the ubuntu-users mailing list