My Tumbleweed went on a few latest upgrades in past a few weeks, and there’re latest kernel versions installed during those upgrades - the latest version instelled is 5.2.2-1.2 as I checked with zypper se -si ‘kernel*’. However, at each boot since the upgrades, the kernel version at boot window is still version 5.1.16, no 5.2.x versions shown at boot window to choose from. My question is how to activate the latest kernel version installed on the system and make it the default kernel at the boot.
Unfortunately the latest kernel versions are not in the list as I mentioned previously. On the default boot section, it only lists version 5.1.16 and below such as 5.1.15, 5.1.10. No kernel versions of 5.2.x are on the list. So can’t make it default.
erlangen:~ # grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found theme: /boot/grub2/themes/openSUSE/theme.txt
Found linux image: /boot/vmlinuz-5.2.2-1-default
Found initrd image: /boot/initrd-5.2.2-1-default
Found linux image: /boot/vmlinuz-5.2.1-1-default
Found initrd image: /boot/initrd-5.2.1-1-default
done
erlangen:~ #
Well, when executing sudo grub2-mkconfig -o /boot/grub2/grub.cfg. I got
/usr/sbin/grub2-mkconfig: line 275: /usr/bin/rm: parameters too long
and then returns to the prompt
It looks like I need to fresh install the new tumbleweed release again instead of rolling upgrading. This happens after a fresh install goes on rolling upgrades a couple of months, then the boot list of kernels stops at a certain version of kernel and no longer upgrades to newer version. I have had this situation a few times.
Never observed this behavior on my machines. You may try to verify grub2:
erlangen:~ # rpm -V grub2
.M....... g /boot/grub2/grub.cfg
S.5....T. c /etc/default/grub
S.5....T. c /etc/grub.d/40_custom
erlangen:~ #
Move files listed above and perform a forced install of grub2:
erlangen:~ # zypper install --force grub2
Loading repository data...
Reading installed packages...
Forcing installation of 'grub2-2.02-48.1.x86_64' from repository 'Haupt-Repository (OSS)'.
Resolving package dependencies...
The following package is going to be reinstalled:
grub2
1 package to reinstall.
Overall download size: 2.7 MiB. Already cached: 0 B. No additional space will be used or freed after the operation.
Continue? [y/n/v/...? shows all options] (y):
Retrieving package grub2-2.02-48.1.x86_64 (1/1), 2.7 MiB ( 21.5 MiB unpacked)
Retrieving: grub2-2.02-48.1.x86_64.rpm ..................................................................................................................................................................................[done (820.3 KiB/s)]
Checking for file conflicts: ..........................................................................................................................................................................................................[done]
(1/1) Installing: grub2-2.02-48.1.x86_64 ..............................................................................................................................................................................................[done]
erlangen:~ #
Now reinstall grub2 and run grub2-mkconfig:
erlangen:~ # grub2-install
Installing for x86_64-efi platform.
Installation finished. No error reported.
erlangen:~ # grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found theme: /boot/grub2/themes/openSUSE/theme.txt
Found linux image: /boot/vmlinuz-5.2.2-1-default
Found initrd image: /boot/initrd-5.2.2-1-default
Found linux image: /boot/vmlinuz-5.2.1-1-default
Found initrd image: /boot/initrd-5.2.1-1-default
done
erlangen:~ #
If you have two different linux system installed – say Tumbleweed and Leap, and the booting is controlled by Leap, then you would have to boot to Leap and update the bootloader before it would see the new kernels installed in Tumbleweed.
I don’t know if that is what you are doing. But it is something to check.
This shows the current kernel is symlinked, aka the kernel you wish to boot. You can boot this kernel without having to figure out what is wrong with grub first by striking the E at the grub menu, scrolling down to the lines where you see -5.2.2-1-default, and removing those characters, leaving only vmlinuz and initrd when finished. Then you can proceed to boot kernel 5.2.2-1 via the instruction at the bottom of that screen, and be running 5.2.2-1 to find and fix your Grub menu problem.
99.7+% of my openSUSE booting is done from kernel and initrd lines with no version numbers.
No, the Tumbleweed is the only system on the notebook, nothing else. The Tumbleweed just went on the latest upgrade a moment ago. I’ll post some extra outputs on the terminal during the upgrading that occurred repeatedly in recent rolling upgrades.
Ok, the Tumbleweed on my notebook just went on the latest rolling upgrade from 20190726 to 20190730 using the ‘zypper dup’ command. Here’re some extra outputs on the terminal during the upgrading that occurred repeatedly in recent rolling upgrades.
(134/211) Executing:kernel-default-5.2.3-1.1.x86_64 ..................................................................[Done]
Extra RPM output:
Creating initrd: /boot/initrd-5.2.3-1-default
dracut: Executing: /usr/bin/dracut --logfile /var/log/YaST2/mkinitrd.log --force /boot/initrd-5.2.3-1-default 5.2.3-1-default
dracut: dracut module 'caps' will not be installed, because command 'capsh' could not be found!
dracut: dracut module 'stratis' will not be installed, because command 'stratisd-init' could not be found!
dracut: dracut module 'caps' will not be installed, because command 'capsh' could not be found!
dracut: dracut module 'stratis' will not be installed, because command 'stratisd-init' could not be found!
dracut: *** Including module: bash ***
dracut: *** Including module: systemd ***
dracut: *** Including module: systemd-initrd ***
dracut: *** Including module: i18n ***
dracut: *** Including module: drm ***
dracut: *** Including module: plymouth ***
dracut: *** Including module: kernel-modules ***
dracut: *** Including module: kernel-modules-extra ***
dracut: *** Including module: resume ***
dracut: *** Including module: rootfs-block ***
dracut: *** Including module: suse-btrfs ***
dracut: *** Including module: suse-xfs ***
dracut: *** Including module: terminfo ***
dracut: *** Including module: udev-rules ***
dracut: Skipping udev rule: 40-redhat.rules
dracut: Skipping udev rule: 50-firmware.rules
dracut: Skipping udev rule: 50-udev.rules
dracut: Skipping udev rule: 91-permissions.rules
dracut: Skipping udev rule: 80-drivers-modprobe.rules
dracut: *** Including module: biosdevname ***
dracut: *** Including module: dracut-systemd ***
dracut: *** Including module: haveged ***
dracut: *** Including module: ostree ***
dracut: *** Including module: usrmount ***
dracut: *** Including module: base ***
dracut: *** Including module: fs-lib ***
dracut: *** Including module: shutdown ***
dracut: *** Including module: suse ***
dracut: *** Including modules done ***
dracut: *** Installing kernel module dependencies ***
dracut: *** Installing kernel module dependencies done ***
dracut: *** Resolving executable dependencies ***
dracut: *** Resolving executable dependencies done ***
dracut: *** Hardlinking files ***
dracut: *** Hardlinking files done ***
dracut: *** Stripping files ***
dracut: *** Stripping files done ***
dracut: *** Generating early-microcode cpio image ***
dracut: *** Constructing GenuineIntel.bin ***
dracut: *** Store current command line parameters ***
dracut: Stored kernel commandline:
dracut: resume=UUID=1d2153b0-50cc-49f2-9191-ce829080acf6
dracut: root=UUID=2446dba1-0f30-4503-96f1-e997bda1faa8 rootfstype=ext4 rootflags=rw,relatime
dracut: *** Creating image file '/boot/initrd-5.2.3-1-default' ***
dracut: *** Creating initramfs image file '/boot/initrd-5.2.3-1-default' done ***
update-bootloader: 2019-08-01 00:09:34 <3> update-bootloader-3938 run_command.294: '/usr/lib/bootloader/grub2/config' failedwith exit code 126, output:
<<<<<<<<<<<<<<<<
+ /usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
/usr/sbin/grub2-mkconfig: line 275: /bin/rm: Argument list too long
>>>>>>>>>>>>>>>>
Updating bootloader failed
bootloader_entry: 2019-08-01 00:09:37 <3> bootloader_entry-1391 run_command.294: '/usr/lib/bootloader/grub2/config' failed with exit code 126, output:
<<<<<<<<<<<<<<<<
+ /usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
/usr/sbin/grub2-mkconfig: line 275: /bin/rm: Argument list too long
>>>>>>>>>>>>>>>>