PDA

View Full Version : compile a kernel the "Debian" way: apt-get "downgrade"


slimhering
28th August 2007, 10:49
Hi all,

I've installed a 2.6.21 kernel the "Debian" way using Falkos great tutorial.

Now a few weeks later I want to run "apt-get dist-upgrade" to keep the system updated. But the only action I would trigger by doing so is to downgrade to a standard kernel:

slim:~# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Calculating upgrade... Done
The following packages will be upgraded:
linux-image-2.6-686
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 2256B of archives.
After unpacking 0B of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.
slim:~#

How can I get rid of this attempt to "downgrade" the kernel? How can I tell the package manager, that my kernel is 1) newer and 2) intentionally there?

Thanks a lot,
cheers Hering

jonasjansson
29th August 2007, 18:53
You can use aptitude to tell apt which packages you want to keep and not upgrade. Under "Virtual Packages", choose packages "kernel-image" and "kernel-image-2.6" by pressing "=" on them.

slimhering
29th August 2007, 20:55
Hi jonasjansson,

thanks for your help!

Unfortunately I cannot find a package named "kernel-image" or "kernel-image-2.6" in aptitude. The only packaes under "Virtual Packages" that start with "kernel" are:
kernel-manual-2.6,
kernel-patch-evms, and
kernel-patch-openswan


I've never used aptitude before, so, whats wrong?
Cheers,
Hering

falko
30th August 2007, 22:34
Take a look here: http://www.howtoforge.com/forums/showthread.php?t=7765&highlight=apt-pinning

slimhering
30th August 2007, 22:49
Thanks Falko, the following line did it:

slim:~# echo linux-image-2.6-686 hold | dpkg --set-selections
slim:~# apt-get upgrade
Reading package lists... Done
Building dependency tree... Done
The following packages have been kept back:
linux-image-2.6-686
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
slim:~#


Take a look here: http://www.howtoforge.com/forums/showthread.php?t=7765&highlight=apt-pinning