Best way to mantain old kernels ?

I originally posted a question mixed between kernel build and virtual box installation, which was moved to a different forum.

I am now able to ask a more up-to-the-point “distilled” question. How does one dispose correctly of old unwanted kernels ?

My original installation had a kernel labelled 2.6.37-rc5-desktop.
As a result of the (incorrect ?) procedure described in the other thread I ended with a (non-bootable) kernel labelled
2.6.34.10-0.6-desktop, and a working one labelled 2.6.34.10-0.6-default. For some reasons the non-bootable one was selected as default at boot, but this was easy to change with yast (this operation just resets the /boot/vmliunz softlink, doesn’t it ?).

I found that for each kernel there are vmlinuz* config* initrd* and System.map* files in /boot.
There are also various .gz files in /boot, and they are not only for the three kernels above, but also labelled 2.6.34.10-0.6-xen (with no corresponding kernel).

For each kernel or label there is also a subdir in /lib/modules. There are/were also other subdirs there also with other labels (at a time I had some 2.6.34-12-* which went away as I disinstalled some pkg with yast, now appeared 2.6.34.10-0.2-debug 2.6.34.10-0.2-default 2.6.34.10-0.2-trace.

I wanted to get rid at least of the non-bootable kernel. I tried to delete it from within yast, but apparently this simply removes the entry in /boot/grub/menu.lst, but does not delete any of the files or directories. So I manually moved elsewhere all /boot files and /lib/modules subdir labelled 2.6.34.10-0.6-desktop.

Is this correct/safe ?

Also what are the impact of running with 2.6.34.10-0.6-default instead of 2.6.37-rc5-desktop ?

On 2012-04-05 10:46, luciochiappetti wrote:

> I wanted to get rid at least of the non-bootable kernel. I tried to
> delete it from within yast, but apparently this simply removes the entry
> in /boot/grub/menu.lst, but does not delete any of the files or
> directories. So I manually moved elsewhere all /boot files and
> /lib/modules subdir labelled 2.6.34.10-0.6-desktop.

Removing the appropriate kernel rpm from yast or CLI should be enough. If
the files are not removed, it is because you are removing the wrong rpm.

Do:


rpm -qa | grep -i kernel

and post here, between code tags.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

here is the output


kernel-desktop-base-2.6.34.10-0.6.1.x86_64
kernel-default-devel-2.6.34.10-0.6.1.x86_64
kernel-desktop-2.6.37-rc5.23.1.x86_64
kernel-xen-devel-2.6.34.10-0.6.1.x86_64
nfs-kernel-server-1.2.1-8.3.1.x86_64
kernel-desktop-devel-2.6.34.10-0.6.1.x86_64
kernel-default-2.6.34.10-0.6.1.x86_64
kernel-devel-2.6.34.10-0.6.1.noarch
kernel-syms-2.6.34.10-0.6.1.x86_64
kernel-source-2.6.34.10-0.6.1.noarch

this is after I disinstalled the stuff incorrectly loaded for the tests with virtualbox (see thread mentioned in first message)and installed it from the Oracle repository

in /boot I have


System.map-2.6.34.10-0.6-default  symsets-2.6.34.10-0.6-default.tar.gz
System.map-2.6.37-rc5-desktop     symsets-2.6.34.10-0.6-xen.tar.gz
backup_mbr                        symtypes-2.6.34.10-0.6-default.gz
boot                              symtypes-2.6.34.10-0.6-xen.gz
boot.readme                       symvers-2.6.34.10-0.6-default.gz
config-2.6.34.10-0.6-default      symvers-2.6.37-rc5-desktop.gz
config-2.6.37-rc5-desktop         vmlinux-2.6.34.10-0.6-default.gz
grub                              vmlinux-2.6.34.10-0.6-xen.gz
initrd                            vmlinux-2.6.37-rc5-desktop.gz
initrd-2.6.34.10-0.6-default      vmlinuz
initrd-2.6.37-rc5-desktop         vmlinuz-2.6.34.10-0.6-default
message                           vmlinuz-2.6.37-rc5-desktop

in /lib/modules I have


2.6.34.10-0.2-debug    2.6.34.10-0.2-trace    2.6.34.10-0.6-xen
2.6.34.10-0.2-default  2.6.34.10-0.6-default  2.6.37-rc5-desktop

The stuff I manually moved out of the way (copied to user scratch area) concerning the wrong kernel is


System.map-2.6.34.10-0.6-desktop      symtypes-2.6.34.10-0.6-desktop.gz
config-2.6.34.10-0.6-desktop          symvers-2.6.34.10-0.6-desktop.gz
initrd-2.6.34.10-0.6-desktop          vmlinux-2.6.34.10-0.6-desktop.gz
symsets-2.6.34.10-0.6-desktop.tar.gz  vmlinuz-2.6.34.10-0.6-desktop

and /lib/modules/2.6.34.10-0.6-desktop

On 2012-04-05 16:56, luciochiappetti wrote:
>
> here is the output
>
> Code:
> --------------------
>
> kernel-desktop-base-2.6.34.10-0.6.1.x86_64
> kernel-default-devel-2.6.34.10-0.6.1.x86_64
> kernel-desktop-2.6.37-rc5.23.1.x86_64
> kernel-xen-devel-2.6.34.10-0.6.1.x86_64
> nfs-kernel-server-1.2.1-8.3.1.x86_64
> kernel-desktop-devel-2.6.34.10-0.6.1.x86_64
> kernel-default-2.6.34.10-0.6.1.x86_64
> kernel-devel-2.6.34.10-0.6.1.noarch
> kernel-syms-2.6.34.10-0.6.1.x86_64
> kernel-source-2.6.34.10-0.6.1.noarch
>
> --------------------

Ok, so as you want to remove the desktop kernel, you can see in that list
that you have several kernel rpms with the word “desktop” on them - so you
have to remove those. Simple! You did not remove them all.

The command line would be:


rpm --erase kernel-desktop-base kernel-desktop kernel-desktop-devel


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

[QUOTE=robin_listas;2453973]
Ok, so as you want to remove the desktop kernel,


rpm --erase kernel-desktop-base kernel-desktop kernel-desktop-devel

{/QUOTE]

Actually I do not want to remove the 2.6.37-rc5-desktop, which was the original kernel generated at system integration time.

I did want to remove the 2.6.34.10-0.6-desktop which was created alongside with 2.6.34.10-0.6-default (during the procedure presented in the link referred at the beginning of the thread) and was not bootable. So far I removed all its files out of the way (mv).

I also wonder about the precise difference between a desktop and default one. I am currently running with the 2.6.34 default and haven’t noticed any degraded performance.

On 2012-04-06 09:36, luciochiappetti wrote:

> Actually I do not want to remove the 2.6.37-rc5-desktop, which was
> the original kernel generated at system integration time.
>
> I did want to remove the 2.6.34.10-0.6-desktop which was created
> alongside with 2.6.34.10-0.6-default (during the procedure presented
> in the link referred at the beginning of the thread) and was not
> bootable. So far I removed all its files out of the way (mv).

Then you need to remove those rpms.


rpm --erase  kernel-desktop-base-2.6.34.10-0.6.1.x86_64 \
kernel-xen-devel-2.6.34.10-0.6.1.x86_64 \
kernel-desktop-devel-2.6.34.10-0.6.1.x86_64

>> I also wonder about the precise difference between a desktop and
>> default one. I am currently running with the 2.6.34 default and
>> haven’t noticed any degraded performance.

Changes are small, you only notice them in some situations. For the exact
changes, you have to look at the kernel configuration file used for its
compilation (/boot/config-something)


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)