By default, when zypper upgrades your kernel, it treats the package like any other package. The old kernel is removed and the new kernel is installed. There are three ways to get your old kernel back (or keep it).
- You can re-install it with RPMS. This is involves manually updating your /boot/grub/menu.lst files when you are done.
In order to boot on your previous kernel - After the upgrade, you can use zypper to install the kernel packages that it removed by throwing various flags on there to force it to ignore conflicts. You still have to go mess with /boot/grub/menu.lst because your old kernel will now be the new default
- The best way: Tell zypper to leave your old kernel alone, but install the new kernel as the new default.
Number three is easily done by adding two lines to the /etc/zypp/zypp.conf file before upgrading your kernel.
Add or update these lines in the [main] section of /etc/zypp/zypp.conf
multiversion = provides:multiversion(kernel)
multiversion.kernels = latest,latest-1,running
multiversion
defines which packages are allowed to exist with multiple versions of the same package name. Just specifying kernel will allow you to retain all of the available kernel packages. You can restrict which packages by being more specific. For instance: multiversion = kernel-default,kernel-default-base,kernel-source
multiversion.kernels
defines package specific retention rules. In this case we defined three to retain:
latest
The kernel with the highest version number.latest-1
The kernel with the next highest version number. This is defined as latest-N where N is the Nth highest version numberrunning
The running kernel version.
If we have three kernels, I would expect to see three after the next update with the oldest of the three falling off the list. If we have two kernels installed, I would expect to see three after the update. If we have one, I would expect two.
The extra, double-cool thing is that the old kernel retain their kdump configurations so you can crash-dump any installed kernel.