Grub not listing multiversion kernels

I’ve always followed the opensuse multiversion instructions of uncommenting multiversion in zypp.conf, and then listing “latest,latest-1,running” under multiversion.kernels.

However, recently I’ve found grub is only giving me the option of the 4.16.12-1 kernel. I can edit the option at boot time to boot into the latest 4.17.2-1 kernel, but the next time I restart grub goes back to only displaying 4.16.12-1 again.

Just wondering if there are new instructions on setting up multiversion? I notice zypp.conf now has a “multiversion.d” parameter that I had not worked with before. Do I need to pass some command to system.d now to set up multiversion? I don’t see any update in the official instructions. I searched the forums for “multiversion.d” and “multiversion” and did not see anything that addressed this.

Any advice would be greatly appreciated.

Thanks!
Andy Prough

I just checked. If I use the “Advanced Options” boot entry, I can select between

  • 4.17.2-1-default
  • 4.17.1-1-default

What do you see if you run “os-prober” (at root command line)?

Thanks, you helped me fix it for now. os-prober gave me no output, but a little research led me to this old forum post: https://forums.opensuse.org/printthread.php?t=483217&pp=10&page=1

As root, I ran
/etc/grub.d/30_os-prober
and then
grub2-mkconfig -o /boot/grub2/grub.cfg

That seemed to do the trick. Right away it recognized all my kernels:

suse-pc:/boot/grub2 # grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found theme: /boot/grub2/themes/openSUSE/theme.txt
Found linux image: /boot/vmlinuz-4.17.2-1-default
Found initrd image: /boot/initrd-4.17.2-1-default
Found linux image: /boot/vmlinuz-4.17.1-1-default
Found initrd image: /boot/initrd-4.17.1-1-default
Found linux image: /boot/vmlinuz-4.16.12-3-default
Found initrd image: /boot/initrd-4.16.12-3-default
Found linux image: /boot/vmlinuz-4.16.12-1-default
Found initrd image: /boot/initrd-4.16.12-1-default
done  

Now I’ve got all the kernels available at boot. I’ll be interested to see if I need to run this process again next time I add a kernel, or if its straightened out for good now.

So it turns out that as long as I run this command after installing a new kernel:

grub2-mkconfig -o /boot/grub2/grub.cfg

then I get all the multiversion kernels available in the grub menu at boot time.

If I don’t run that command, then I don’t get the new kernel in my grub menu options. So I must still be missing something regarding my setup.

How did you install Tumbleweed?

As far as I know, grub2-mkconfig should be automatically run after every kernel update. Well, okay, that’s not quite right. I think “/sbin/update-bootloader” is automatically run. And I believe that looks in “/etc/sysconfig/bootloader” to see what bootloader you are using. So if that file is not correct or is missing, you might run into the issue you are having.

You are right, of course, and I have no /etc/sysconfig/bootloader for some reason. The mystery deepens.

And you are right to question my installation - I went with Gecko just to give it a shot. Looks like Gecko is coming up a bit short. I have very little time invested in this install, I should just reinstall over it with straight TW. Even if I get past this issue with bootloader, there’s no telling what other config files I’m missing.

I found the “Probe Foreign OS” checkbox in the YaST Bootloader module was colored in, but not fully checked. I checked that box, and now /etc/sysconfig/bootloader exists and the grub menu is updating properly.

Very interesting. Thanks for the hints.

Yes, I think using Yast bootloader to change something can result in that file being created.

I’m glad that you now have working as it should.