11.2 - How install alternative kernel without deinstall old

I would like to probe the new feature “kernel-desktop”
without uninstalling “kernel-default”.
(I do have an old centrino notebook, I do not know if pae-enabled kernels run)

How can I command zypper to let old kernels stay ?

ulenrich wrote:
> I would like to probe the new feature “kernel-desktop”
> without uninstalling “kernel-default”.
> (I do have an old centrino notebook, I do not know if pae-enabled
> kernels run)
>
> How can I command zypper to let old kernels stay ?

I don’t know the answer to your question, or if it is possible, but I
have a work around.

Before any new kernel is installed, open YaST => System => Boot
Loader. Pull down “Other” and select “Edit Configuration Files”. Pull
down “Filename” and select “/boot/grub/menu.lst”. Copy the stanza that
contains your current default boot and paste it at the end. To do
this, highlight it and use CTRL/C to copy and CTRL/V to paste. In the
stanza that was just pasted in, find the place that describes the
kernel. It will end with something like
“vmlinuz-2.6.27.25-0.1-default”. Edit this to say “vmlinuz-backup”.
There will be a similar entry for initrd that will end with something
like “initrd-2.6.27.25-0.1-default”. Edit this to say “initrd-backup”.
Now edit the title line for this stanza to say “openSUSE 11.2 backup
kernel”.

Finally save the result. Please be careful not to change the existing
stanzas of this file.

The last step is to do the following:


sudo cp /boot/vmlinuz-XXXXX /boot/vmlinuz-backup
sudo cp /boot/initrd-XXXXX /boot/initrd-backup

In both cases, the XXXXX should be replaced by the actual string found
above. For my example, it would be “2.6.27-0.1-default”. Yours will be
different!!

To boot the backup kernel, use the arrow keys in the GRUB menu to
select it and press enter. After you do the above, please test it.

If you only want to keep one level of backup kernel in this fashion,
you will only need to do the “sudo cp” steps. The GRUB menu will not
have to be changed again.

Larry

What you don’t think about is, if I

  1. cp vmlinz vmlinzbackup
  2. cp initrd initrdbackup
  3. create a new entry in /boot/grub/menu.lst for backup kernel

I should not forget to
4. backup /lib/modules/MyOldKernel
5. install new kernel
6. mv /lib/modules/MyOldKernelBackup /lib/modules/MyOldKernel

But isn’t there a simpler /etc/zypper.conf entry for that?

I added in /etc/zypp/zypp.conf

multiversion = kernel-default,kernel-desktop,kernel-default-base,kernel-desktop-base,kernel-default-extra,kernel-desktop-extra

and made /etc/zypp/systemCheck:

requires:glibc
requires:kernel-default
requires:kernel-default-base
requires:kernel-default-extra
requires:zypper

… zypper did install kernel-desktop without removing kernel-default :slight_smile:

… and kernel-desktop 2.6.30.2-1 runs wonderful on an old centrino notebook :slight_smile:

ulenrich wrote:
> What you don’t think about is, if I
> 1. cp vmlinz vmlinzbackup
> 2. cp initrd initrdbackup

Yes, these will work as long as you cd to /boot.

> 3. create a new entry in /boot/grub/menu.lst for backup kernel

> I should not forget to
> 4. backup /lib/modules/MyOldKernel

Not needed as updating the kernel will not remove the /lib/modules. It
cannot as those modules are needed until the system is rebooted.

> 5. install new kernel
> 6. mv /lib/modules/MyOldKernelBackup /lib/modules/MyOldKernel

This is not needed, nor will it work. The directory for the modules is
/lib/modules/uname -r. It does not depend on the name you call the
vmlinuz file.

> But isn’t there a simpler /etc/zypper.conf entry for that?

I don’t know.

How do I go the other way? Every time I update the kernel, I get 2 new lines in the grub menu: one for the new kernel and one for the failsafe version of the kernel. My lab rat has 4 kernels listed.

It seems every time I do zypper up (almost never do zypper dup) if there is a kernel out there I get it! On that machine I have two each of the latest kernel default and kernel pae.:stuck_out_tongue:

Prexy wrote:
> How do I go the other way? Every time I update the kernel, I get 2 new
> lines in the grub menu: one for the new kernel and one for the failsafe
> version of the kernel. My lab rat has 4 kernels listed.
>
> It seems every time I do zypper up (almost never do zypper dup) if
> there is a kernel out there I get it! On that machine I have two each
> of the latest kernel default and kernel pae.:stuck_out_tongue:

With YaST => System => Boot Loader under the Section Management tab,
you can delete any entry you no longer want. This action does NOT
delete the corresponding vmlinuz and initrd files in /boot, nor does
it delete the modules in the /lib/modules/<kernel version>/ tree.
Deleting these must be done manually (as root).

I test lots of kernel versions and periodically I have to do the above
steps, particularly after bisecting to locate a kernel regression. I
don’t usually delete the files until /boot (I have it on a separate
partition) or / start to get full as shown by ‘df’.

in grub1 /boot/grub/menu.lst - here some commented entries:
(comment is double## - config to update-grub is one# )


## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=resume=LABEL=swap rootflags=data=ordered,commit=90 nosplash

## should update-grub lock old automagic boot options
## e.g. lockold=false
##      lockold=true
# lockold=false

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(single-user) single
# altoptions=(single-user mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

Could you explain the options?

This is a complicated mess. I would like to post screen captures to show all the different info. What is most useful?

For example: there are 20 lines in my Section Management, looking like a lot of duplication. lib/modules has folders for kernels not it this list.

I did explain:

“# alternative=false”

is what you want