Keeping the current kernel when doing a kernel update through yast

Hello,

After the usb-keyboard and mouse problems with the previous kernel update I’m a bit reluctant to just install the new kernel.

Is there a Yast way to keep the currently installed kernel when you do a kernel update with Yast?

Of course I could make a backup of /boot and after the update, and before the reset, copy back the current kernel and edit /boot/grub/menu.lst to add an entry for the backup kernel. But that is something I’m likely to forget with future updates, so it would be nice if it was automatic…

Yes, it is possible to keep both your old and new kernels. You need to change how YaST Software Management works with kernel updates, to allow you to maintain both the old kernel and the newer kernel.

edit the file /etc/zypp/zypp.conf to say:

##
## Packages which can be installed in different versions at the same time.
##
## Packages are selected either by name, or by provides. In the later case
## the string must start with "provides:" immediately followed by the capability.
##
## Example:
##    kernel                - just packages whith name 'kernel'
##    provides:multiversion(kernel)   - all packages providing 'multiversion(kernel)'
##                      (kenel and kmp packages should do this)
## Valid values:
##    Comma separated list of packages.
##
## Default value:
##    empty
##
# multiversion = provides:multiversion(kernel)

**multiversion = kernel-desktop**

If you use KDE, you can use the menu Run Command:

kdesu kwrite /etc/zypp/zypp.conf

The file zypp.conf has a whole lot more in it than the small portion shown above. You are adding only the line shown in bold (and it will not be in bold in your file after being added. So be careful not to mess anything else up. caf 4926, posted a page from Software Management showing how to then select the added kernel, though this is from the newer openSUSE 11.4, in beta testing right now.

http://dl.dropbox.com/u/10573557/SUSE%20Misc/kernel-radio-switch.png

After making the change, restart your computer and then do the following after you are logged back into openSUSE:

menu / System / YaST & Enter Root User Password, then in YaST Select:

Software Management / View (top Left) / Package Groups / Multiversion Packages

There will be a listing for your loaded kernel. Now select the Versions Tab. Notice on the versions tab that instead of having a Bullet to select, where only one bullet can be active, you now have check blocks and more than one check can be selected.

Now when you select more than one kernel to be loaded, each installed kernel will have two (or more) entries made in your grub, menu.lst file. Thus allowing you to select both the old and new kernel loads. If you install a new kernel and normally install a binary video driver, the hard way, you must reinstall the video driver for each new kernel that you install.

Finally, I have a script file that you can use to compile and install the very latest kernel which also maintains (and does not replace) your old kernel. This thread is located at:

S.A.K.C - SuSE Automated Kernel Compiler

This is not something a new user would do, but I don’t really know your user level here. Be aware that if you load many kernels, you may begin to forget just what kernel does what, so take it easy and don’t blow yourself up which a bunch of kernel installs.

Thank You,

Ok, this isn’t a Yast way, but ok… :wink:

Is the “restart your computer” necessary? Because without it the bullets already changed to checkmark blocks in the version tab?

And shouldn’t you use the “multiversion = provides:multiversion(kernel)” so you can also install multiple versions of “preload kmp desktop”, which seems to be tied to kernel versions?

wvv Ok, this isn’t a Yast way, but ok… :wink:

Is the “restart your computer” necessary? Because without it the bullets already changed to checkmark blocks in the version tab?

And shouldn’t you use the “multiversion = provides:multiversion(kernel)” so you can also install multiple versions of “preload kmp desktop”, which seems to be tied to kernel versions?
The restart request is just normal procedure. If the changes show up with out it, then even better.

The changes you making just modifies how the YaST Software Management treats multiple versions of the kernel, so that you can have more than one version, just in case the latest one you does not work. I consider this using YaST, just being modified in how it works.

As for “multiversion = provides:multiversion(kernel)”, I asked the same question and I was told that the right one was to use**** “multiversion = kernel-desktop”. ****Which does work as stated.You are welcome to try any other options that you like and report back as to if that is better or not to use.

Thank You,

To have multiple kernels, one just installs the different flavours (default, desktop, pae) - But you didn’t initially ask that. You wanted to keep your original kernel and get the New one too.

Which was explained for you. You can see a post about it here
Keyboard & mouse freezes

preload kmp desktop: Is a module that ‘Preloads’ stuff to speed up booting

I’m just cautious. The preload-kmp-desktop package requires a particular kernel. So when you boot the other kernel version. Is you’re system still in working order, because the kernel that is required by preload-kmp-desktop, isn’t booted. If the kernel version isn’t a requirement for the preload-kmp-desktop, why is it specified in the rpm? This doesn’t seem logical to me, one way or another…

preload-kmp-desktop is not a kernel, but a kernel module and I am sure it is designed to work with some sort of kernel version range. Since most kernel updates are for the same base version, you may only have a problem if you decide to jump up from kernel 2.6.34 to 2.6.35 or 2.6.36, so it does not appear to be a problem when you getting security updates installed. Further, now you can have both the old and new kernels to try or drop back to if required.

Thank You,

Just to report back on this:

I did the kernel update, and kept the current kernel in Yast. After this Yast update, both kernels were in /boot and /boot/grub/menu.lst had both kernels as menu selections. So everything worked as expected. The new kernel is working fine, so I didn’t test if the old kernel still works. :wink:

A suggestion, as this seems to be a recurring theme in this forum: Maybe keeping the current kernel should be the default and automatic behaviour for a kernel update through Yast! (Provided there is enough space on the partition that holds /boot)

I’ve also thought that keeping the current kernel should be the default, but what could then happen is the /boot partition will fill up with very old kernels. There would be just as many questions in this forum on how to delete old kernels, so the sum result would be the same. I still think you’re correct, keeping kernels should be the default. It’s less traumatic to the user.

A suggestion, as this seems to be a recurring theme in this forum: Maybe keeping the current kernel should be the default and automatic behaviour for a kernel update through Yast! (Provided there is enough space on the partition that holds /boot)
Actually I like that idea wvv. Perhaps that should be suggested to the guys (and gals) working on the next release of openSUSE 11.4.

Thank You,

Of course you should only keep the current kernel, because obviously that one is working. And all older kernels beyond that should be deleted. Or it could be a setting somewhere to keep the last X number of previous installed kernels (where X should default to 1).

wvv says: Of course you should only keep the current kernel, because obviously that one is working. And all older kernels beyond that should be deleted. Or it could be a setting somewhere to keep the last X number of previous installed kernels (where X should default to 1).
I don’t see this as being a solution. There no way to know what works, what did not work and what you want to keep to fall back on. Once you make the changes to /etc/zypp/zypp.conf, all kernels you install from YaST have a check box instead of a bullet. I assume if you uncheck a kernel, it will be removed, but I am not sure about that. Still, kernels do not take up that much room and the only real problem is a cluttered grub menu.lst file a new user may be unable to deal with. Even so, we don’t end up with a lot of kernel updates in the life of a openSUSE release.

Like all things though, everyone may suggest anything they like and your suggestion might have merit to others. It is surely good to keep thinking about the subject wvv. Thanks so much for your comments.

Thank You,

Actually I would keep more then one as you might get two in a row that break your install.

These are almost always security updates and lots of these are “local exploits” I prefer having a working GUI etc. Anyone locally trying to exploit this machine would have to worry about getting shot by me first.

I usually kept two or three working kernels on all twenty six servers that I managed.

I made it an openFATE item: https://features.opensuse.org/310665
(Which can be voted on!)

I voted it up too as I see it as desirable.

I also voted it up. I like this feature and it could come in useful

I added my vote up. I’m watching this outcome.

I added my vote up too, will pass the link to the german and french forums.

The thread in the German language part of this forums can be found under
Den alten Kernel beim Update standardmaessig nicht deinstallieren! (Umfrage)
Regards
pistazienfresser